Skip to content

feat(mobile): use Android wallpaper colors - #10691

Merged
juliusmarminge merged 5 commits into
mainfrom
t3code/update-android-material-theming
Sep 8, 2026
Merged

feat(mobile): use Android wallpaper colors#10691
juliusmarminge merged 5 commits into
mainfrom
t3code/update-android-material-theming

Conversation

@juliusmarminge

@juliusmarminge juliusmarminge commented Sep 8, 2026

Copy link
Copy Markdown
Member

Android users can select Material You alongside T3 Code, T3 Chat, and the other themes on Android 12+. It uses the live wallpaper palette, with independent light and dark choices. Selecting another theme immediately replaces wallpaper colors. The preview reflects the current Android palette, which refreshes when the app regains focus.

Continues Alex / @PixPMusic's system-color work from #6081, retaining the original author on the ported commit. The optional layout is separate in #10692.

Verified on an Android API 36 emulator with a disposable environment and seeded conversation:

  • Selected Material You, then T3 Chat: the selected theme and visible colors change together.
  • Selected Material You for light and T3 Chat for dark, then switched appearance modes.
  • Changed the actual wallpaper between Google Green and Vivid Pink; returning to T3 refreshes the palette and preview without restarting.
  • Checked light, dark, system appearance, conversation contrast, Markdown, and composer colors. Native Android build passed.
  • Focused theme, persistence, terminal, and review tests, mobile typecheck, and scoped lint pass.
Before: main, dark mode After: system colors, green wallpaper
Before: standard T3 Code conversation After: green Material You conversation
Material You: green wallpaper, light Material You: pink wallpaper, dark
Green Material You theme Pink Material You theme
T3 Chat replaces Material You Independent light and dark choices
T3 Chat selected Material You light and T3 Chat dark

Model: GPT-6 | Harness: Codex in T3 Code

Note

Add material-you theme and Android wallpaper colors to mobile

  • Adds a material-you theme that derives mobile runtime variables from Android dynamic-color palettes in AppearancePreferencesProvider.tsx
  • The provider tracks system palettes, refreshes them on app focus, and derives variables separately for light and dark appearances
  • Updates the T3ComposerEditorView native bridge to use the Material You primary color for text selection, cursor, and handle tinting on Android Q+
  • Fixes parseColor to convert CSS RRGGBBAA to Android AARRGGBB order so eight-digit colors render with correct opacity
  • Behavioral Change: The ThemeAppearanceSection hides the material-you theme option when the platform does not support system colors

Macroscope summarized b62ffde.

Summary by CodeRabbit

  • New Features
    • Added Material You theming for Android 12+, using wallpaper-derived system colors.
    • Added independent light and dark appearance support for Material You.
    • Updated editor selections, cursor, and handles to follow the active accent color.
    • Material You is hidden when system colors are unavailable.
  • Bug Fixes
    • Improved accessibility by labeling settings switches.
  • Documentation
    • Documented selecting and configuring the Material You theme.
  • Tests
    • Added coverage for theme conversion and independent appearance preferences.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). 📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. labels Sep 8, 2026
@juliusmarminge juliusmarminge changed the title t3code/update android material theming feat(mobile): use Android wallpaper colors Sep 8, 2026

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All clear

Posted via Macroscope — Effect Service Conventions

@macroscopeapp

This comment has been minimized.

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.6 KiB 13.6 KiB −30 B (−0.2%) 15.1 KiB
Codex Thread snapshot wire 7.0 KiB 7.0 KiB −2 B (−0.0%) 7.3 KiB
Codex Live turn WebSocket wire 6.6 KiB 6.5 KiB −28 B (−0.4%) 7.8 KiB
Codex Live turn WebSocket decoded 57.1 KiB 57.1 KiB 0 B (0.0%) 66.4 KiB
Codex Live turn messages 10 10 0 (0.0%) 21
Claude Total thread wire 13.6 KiB 13.6 KiB −41 B (−0.3%) 15.1 KiB
Claude Thread snapshot wire 7.0 KiB 7.0 KiB 0 B (0.0%) 7.3 KiB
Claude Live turn WebSocket wire 6.6 KiB 6.5 KiB −41 B (−0.6%) 7.8 KiB
Claude Live turn WebSocket decoded 57.9 KiB 57.8 KiB −44 B (−0.1%) 66.4 KiB
Claude Live turn messages 10 9 −1 (−10.0%) 21

Baseline: 3b6ce93 · PR result: b62ffde · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@juliusmarminge
juliusmarminge marked this pull request as ready for review September 8, 2026 08:02
@macroscopeapp

macroscopeapp Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a new Material You theme with Android dynamic-color integration across appearance state, previews, terminal styling, and native editor selection controls. Although existing defaults remain unchanged and the feature is user-selected, the cross-layer platform integration and substantial palette/runtime logic warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 0387ae7c-4be5-4836-ae7f-be8820484091

📥 Commits

Reviewing files that changed from the base of the PR and between f23169c and b62ffde.

📒 Files selected for processing (9)
  • apps/mobile/src/features/review/nativeReviewDiffAdapter.test.ts
  • apps/mobile/src/features/settings/appearance/AppearancePreferencesProvider.tsx
  • apps/mobile/src/features/settings/appearance/sections/ThemeAppearanceSection.tsx
  • apps/mobile/src/features/terminal/terminalTheme.ts
  • apps/mobile/src/lib/mobileTheme.ts
  • apps/mobile/src/lib/mobileThemeRuntime.ts
  • apps/mobile/src/lib/mobileThemeVariables.ts
  • apps/mobile/src/lib/storage.test.ts
  • docs/user/appearance.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/user/appearance.md

Limit details: You’ve used all 10 included reviews currently available.


📝 Walkthrough

Walkthrough

The mobile app adds Android Material You support. It reads system palettes, converts them into appearance-specific theme variables, applies them to previews and UI, and passes the active primary color to the native editor for selection styling.

Changes

Material You system colors

Layer / File(s) Summary
Palette contracts and theme conversion
apps/mobile/src/lib/materialYouPalette.ts, apps/mobile/src/lib/materialYouPalette.android.ts, apps/mobile/src/lib/materialYouTheme.ts, apps/mobile/src/lib/materialYouTheme.test.ts, apps/mobile/package.json
The app defines Material You palette contracts, reads Android light and dark palettes, converts palette tones into mobile theme variables, and tests the conversion behavior.
Appearance state and persistence
apps/mobile/src/features/settings/appearance/AppearancePreferencesProvider.tsx, apps/mobile/src/lib/useUniwindTheme.ts, apps/mobile/src/lib/mobileTheme.ts, apps/mobile/src/lib/mobileThemeRuntime.ts, apps/mobile/src/lib/mobileThemeVariables.ts, apps/mobile/src/lib/storage.test.ts, apps/mobile/src/features/review/nativeReviewDiffAdapter.test.ts, apps/mobile/src/features/terminal/terminalTheme.ts
The appearance provider refreshes system palettes and applies variables per appearance. Material You uses the default runtime paths, and light and dark theme selections persist independently.
Settings and editor integration
apps/mobile/src/features/settings/appearance/sections/ThemeAppearanceSection.tsx, apps/mobile/src/features/settings/components/SettingsSwitchRow.tsx, apps/mobile/src/native/T3ComposerEditor.native.tsx, apps/mobile/modules/t3-composer-editor/android/src/main/java/expo/modules/t3composereditor/T3ComposerEditorView.kt
Settings previews use scoped appearance variables and hide Material You when unavailable. The native editor applies the active system primary color to selection styling, cursor, and handles.
Appearance documentation
docs/user/appearance.md
The documentation describes Android 12+ Material You colors and separate light and dark selections.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: ⚪ Minimal · up to b62ff

This adds opt-in Android 12+ wallpaper-based system colors while preserving separate saved light and dark themes. The supplied implementation and coverage indicate the setting, appearance switching, previews, and fallback behavior are ready to merge.

Sequence Diagram(s)

sequenceDiagram
  participant AppearanceSettings
  participant AppearancePreferencesProvider
  participant AndroidSystemColors
  participant ThemeConverter
  participant NativeEditor
  AppearanceSettings->>AppearancePreferencesProvider: select Material You
  AppearancePreferencesProvider->>AndroidSystemColors: read light and dark palettes
  AndroidSystemColors-->>AppearancePreferencesProvider: return system palettes
  AppearancePreferencesProvider->>ThemeConverter: convert palette for each appearance
  ThemeConverter-->>AppearancePreferencesProvider: return theme variables
  AppearancePreferencesProvider->>NativeEditor: provide active primary color
  NativeEditor->>NativeEditor: apply selection styling
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.41% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 27 functions across 17 files. (1 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely describes the main change: using Android wallpaper colors in the mobile app.
Description check ✅ Passed The description explains what changed and why, documents Android and light/dark behavior, includes UI screenshots, and lists verification results. The repository checklist is not explicitly included, …
Full details: Docstring Coverage

Explanation

Docstring coverage is 7.41% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 27 functions across 17 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch t3code/update-android-material-theming

Comment @coderabbitai help to get the list of available commands.

@juliusmarminge
juliusmarminge force-pushed the t3code/update-android-material-theming branch from f23169c to 59f0112 Compare September 8, 2026 08:13
@juliusmarminge
juliusmarminge force-pushed the t3code/update-android-material-theming branch from 59f0112 to b62ffde Compare September 8, 2026 08:15

@macroscopeapp macroscopeapp Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All clear

Posted via Macroscope — Effect Service Conventions

@juliusmarminge
juliusmarminge merged commit 579266c into main Sep 8, 2026
25 checks passed
@juliusmarminge
juliusmarminge deleted the t3code/update-android-material-theming branch September 8, 2026 16:27
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 8, 2026
## What's Changed
* feat(web): accept file drops into sidebar threads by @UtkarshUsername in pingdotgg/t3code#7892
* fix(mcp): keep preview snapshots usable by the agent and let it save them by @t3dotgg in pingdotgg/t3code#10501
* fix(server): stop Windows terminal processes when closing by @SunkenInTime in pingdotgg/t3code#10771
* feat(mobile): use Android wallpaper colors by @juliusmarminge in pingdotgg/t3code#10691
* feat(mobile): add optional Material You layout by @juliusmarminge in pingdotgg/t3code#10692
* feat(web): show project favicon in new-thread project picker by @gsimone in pingdotgg/t3code#10790
* fix(desktop): use official logo in macOS installer by @t3-code[bot] in pingdotgg/t3code#10819


**Full Changelog**: pingdotgg/t3code@v0.0.41-nightly.20260908.1400...v0.0.41-nightly.20260908.1414

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.41-nightly.20260908.1414
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📱 Native Change Changes the native fingerprint; merging blocks production OTAs until a new store build ships. size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants