refactor(mobile): compile semantic themes for Uniwind - #7327
Conversation
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
closing because this is explicitly marked |
24177f7 to
9904182
Compare
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This is a broad 110-file mobile theming migration that changes shared runtime theme selection, native appearance synchronization, compiled theme registration, and rendering across most screens. The generated assets and tests help constrain the change, but its production blast radius and new theming infrastructure are too substantial for an automated approval recommendation. You can add or adjust custom eligibility rules. Learn more. |
9904182 to
7655a9d
Compare
7655a9d to
9a2f759
Compare
9a2f759 to
5c2519a
Compare
5c2519a to
113da07
Compare
8620732 to
7f68a2a
Compare
f8b0097 to
fe12832
Compare
f4f7bb6 to
222deb2
Compare
5e55533 to
47ff252
Compare
8aa218f to
a77ec4c
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
Bugbot Autofix is ON, but a cloud agent failed to start.
Reviewed by Cursor Bugbot for commit a77ec4c. Configure here.
a77ec4c to
3aca002
Compare
3aca002 to
2d94231
Compare
Co-authored-by: codex <codex@users.noreply.github.com>
2d94231 to
c39f3e4
Compare
## What's Changed * fix(grok): improve skills, plans, usage, and turn reliability by @t3dotgg in pingdotgg/t3code#8358 * fix(server): recover stale Codex approval callbacks by @luckyPipewrench in pingdotgg/t3code#5195 * test(server): remove duplicate missing worktree test by @t3-code[bot] in pingdotgg/t3code#8252 * fix(server): replay all un-applied events during projection bootstrap by @krutftw in pingdotgg/t3code#7538 * test: remove low-signal test files by @t3-code[bot] in pingdotgg/t3code#8397 * test: prune trivial error and layout tests by @t3-code[bot] in pingdotgg/t3code#8400 * Fix Android adaptive launcher icon by @colonelpanic8 in pingdotgg/t3code#4332 * feat(web): split provider settings into list and editor by @t3dotgg in pingdotgg/t3code#8380 * fix(codex): accept Codex 0.150 account plans by @gsimone in pingdotgg/t3code#8447 * fix(tooling): allow ignored-only staged changes by @juliusmarminge in pingdotgg/t3code#8468 * fix(mobile): keep iOS home header stable by @juliusmarminge in pingdotgg/t3code#8467 * fix(web): stop showing red x summaries for ordinary tool failures by @t3dotgg in pingdotgg/t3code#8395 * fix(mobile): refine Git action toast glass styling by @juliusmarminge in pingdotgg/t3code#8399 * fix(desktop): allow preview automation in agent-created threads by @t3dotgg in pingdotgg/t3code#8483 * test(web): remove redundant cache key test by @t3-code[bot] in pingdotgg/t3code#8484 * fix(release): move nightly schedule to minute 38 by @t3dotgg in pingdotgg/t3code#8509 * fix(web): stabilize the provider settings editor by @t3dotgg in pingdotgg/t3code#8472 * fix(web): open GitHub pull requests in browser when loading fails by @t3dotgg in pingdotgg/t3code#8507 * fix(codex): show sub-agent models by @t3dotgg in pingdotgg/t3code#8502 * feat(analytics): report connected client platforms by @t3dotgg in pingdotgg/t3code#8481 * feat(server): accept PDF, ZIP, and other file uploads up to 50MB by @t3dotgg in pingdotgg/t3code#8235 * feat(web): toggle a thread's pin from the keyboard by @ipanasenko in pingdotgg/t3code#8440 * fix(web): add back button to project settings by @StiensWout in pingdotgg/t3code#8168 * refactor(mobile): compile semantic themes for Uniwind by @juliusmarminge in pingdotgg/t3code#7327 * fix(desktop): Cache Runtime locally on WSL Filesystem, dramatically improving launch times by @ikifar2012 in pingdotgg/t3code#5769 * fix(mobile): show OpenCode model sources in picker by @juliusmarminge in pingdotgg/t3code#8573 * fix(clients): honor project default models in new threads by @anirudhsama in pingdotgg/t3code#6011 * fix(mobile): show file actions on Android by @none23 in pingdotgg/t3code#8215 * fix(connect): explain DPoP connection failures by @extoci in pingdotgg/t3code#8351 * feat(web): make the sidebar project filter a searchable combobox by @SunkenInTime in pingdotgg/t3code#5931 * fix(server): a draft can retry its first send after a failed bootstrap by @shivamhwp in pingdotgg/t3code#8226 * fix(desktop): stop hidden previews draining battery by @Bil0000 in pingdotgg/t3code#8567 * fix(desktop): oauth popups open from the browser preview by @walid-baharwal in pingdotgg/t3code#8435 * fix(web): keep long task drawers usable on small screens by @shivamhwp in pingdotgg/t3code#8313 * fix(opencode): handle child approvals, stops, and model catalogs by @t3dotgg in pingdotgg/t3code#8480 * fix: make thread auto-settling opt-in by @shivamhwp in pingdotgg/t3code#8321 * fix(web): stop session activity timing test from blocking releases by @t3dotgg in pingdotgg/t3code#8585 * fix(mobile): show composer menus when starting a task by @juliusmarminge in pingdotgg/t3code#8587 * fix(web): show the configured stash shortcut by @UtkarshUsername in pingdotgg/t3code#8437 * feat(web): add toggleable confirmation before unpinning a thread by @UtkarshUsername in pingdotgg/t3code#7313 * fix: restore automatic thread settling defaults by @t3dotgg in pingdotgg/t3code#8596 * fix(mobile): restore composer glass and rounded shadows by @juliusmarminge in pingdotgg/t3code#8597 ## New Contributors * @luckyPipewrench made their first contribution in pingdotgg/t3code#5195 * @krutftw made their first contribution in pingdotgg/t3code#7538 * @colonelpanic8 made their first contribution in pingdotgg/t3code#4332 * @ikifar2012 made their first contribution in pingdotgg/t3code#5769 * @walid-baharwal made their first contribution in pingdotgg/t3code#8435 **Full Changelog**: pingdotgg/t3code@v0.0.35...v0.0.36 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.36
Upstream compiled the mobile palettes into Uniwind themes (pingdotgg#7327), which collided with the fork's D3 branding and its D3-code default. The palette upstream reads out of global.css and writes to generated-uniwind-default-theme-variables.json is the standard T3 Code one, so every place upstream tests for DEFAULT_MOBILE_THEME_ID now tests for STANDARD_MOBILE_THEME_ID. The fork's default is D3-code, a built-in with generated theme variants of its own. The generated Uniwind outputs and uniwind-types.d.ts came from upstream without D3-code and are regenerated here, so the app can scope to d3-code-light and d3-code-dark. The mobile file tree keeps the fork's workspace search and controlled expansion, and drops useThemeColor, which upstream replaced with Uniwind class names. The web theme library keeps the D3-code card ahead of the standard cards and gains upstream's environment-published palettes. Co-Authored-By: Claude Fable 5.0 <noreply@anthropic.com>

Problem
Mobile theme colors were resolved through per-component CSS variable subscriptions and scattered JavaScript color props. Palette changes therefore reconciled across many React consumers, and custom registered themes could miss
dark:orlight:utility branches.Solution
light/darkCSS variants, and compile the other five palettes in both appearances as registered Uniwind themes.global.cssis now the sole source for T3 Code’s default color values.className,colorClassName, andtintColorClassNamestyling.dark:/light:utilities, CSS-variable subscriptions, or undocumented palette bridges.uniwinddependency and native fingerprint frommain; this PR contains no Pro package, license, Nitro bump, or evaluation binary.Verification
vp run --filter @t3tools/mobile generatevp test run apps/mobile/scripts/generate-uniwind-themes.test.ts apps/mobile/src/lib/mobileTheme.test.ts apps/mobile/src/lib/mobileThemeRuntime.test.ts apps/mobile/src/features/review/nativeReviewDiffAdapter.test.ts apps/mobile/src/features/terminal/terminalTheme.test.ts— 35 tests passedvp test run oxlint-plugin-t3code— 71 tests passedvp run --filter @t3tools/mobile typecheckvp run --filter oxlint-plugin-t3code typecheckvp lint apps/mobile oxlint-plugin-t3code --report-unused-disable-directivesvp run lint:mobile— SwiftLint, ktlint, and Detekt passedUI evidence
main)Split light/dark selection:
Interaction demo: https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/75369d3b7dfc982f/t3code-free-uniwind-theme-demo.mp4
Built with GPT-5 Codex.
Note
Medium Risk
Wide UI refactor touching theming across most mobile screens; incorrect generated tokens or theme registration could cause subtle contrast or palette bugs, though behavior is covered by generator and theme runtime tests.
Overview
This PR replaces per-component
useThemeColorsubscriptions with Uniwind-driven styling so palette switches reconcile through CSS variants instead of many React color props.A new
generate-uniwind-themesscript (wired viapnpm generate) emitsgenerated-uniwind-themes.css, theme name list, and default-variable JSON. It registers five built-in palettes (T3 Chat, Grove, Ocean, Ember, Iris) as{palette}-light/{palette}-darkUniwind variants, adds adaptive semantic tokens for values that used to rely ondark:/light:utilities, and keeps T3 Code’s default colors authored only inglobal.css. Metro loadsextraThemesfrom the generated manifest and imports the generated CSS.Across the app, surfaces move to
className,tintColorClassName, andcolorClassName(includingwithUniwindonSymbolView, glass, wordmark, and similar).useUniwindThemeremains for native/third-party APIs that need raw CSS variables (markdown, diff themes, swipe backgrounds).useMobileNavigationThemeno longer takes a theme argument; status bar background color props are dropped in favor of translucent styling.Reviewed by Cursor Bugbot for commit c39f3e4. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Migrate mobile theming from
useThemeColorto Uniwind semantic classesuseThemeColorhook calls withuseUniwindThemeand class-based tint props (tintColorClassName,colorClassName) across nearly all mobile components, so icon, text, and surface colors resolve via CSS class tokens instead of computed runtime valuesapps/mobile/src/lib/useThemeColor.tsand adds generated Uniwind theme assets: a build script (generate-uniwind-themes.mts), CSS variable definitions (generated-uniwind-themes.css), and JSON theme maps loaded via Metro configAppearancePreferencesProviderto wrap the app inScopedTheme, apply theme runtime operations granularly (including nativeAppearance.setColorScheme), and apply theme switches urgently while deferring non-theme preference savesuseMobileNavigationThemeparameterless — it now reads appearance from the provider and derives colors from a single Uniwind paletteno-mobile-uniwind-theme-escape-hatchesto flag unapproved escape hatches likeuseCSSVariableand appearance variants in mobile sourcegetMobileThemeVariablesno longer accepts the default theme id and always derives variables from the theme palette; callers ofcreateNativeReviewDiffThememust now pass an explicitappTheme: MobileThemeVariables.useMobileNavigationThemesignature changed to take no arguments, so existing call sites passingthemeAppearanceare updated in-treeMacroscope summarized c39f3e4.