[Feature]: Mobile: themes and custom themes — parity with the desktop theme system #6973
amanthanvi
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Before submitting
Area
apps/mobile
Problem or use case
Web/desktop now ships a full theme system (visible today in nightly desktop builds; it is ungated on
main):apps/web/src/themePalette.ts), each with light and dark variants.useTheme.ts, "pair model").ThemeEditorPanel.tsx, 58 color roles), JSON import/export (ThemeFilev1 format), VS Code theme file conversion (vscodeThemeImport.ts), and Open VSX marketplace search ("try dracula, nord, catppuccin..." —ThemeSearchSection.tsx,openVsxThemes.ts).The mobile app has none of it. Its Appearance screen (
apps/mobile/src/features/settings/SettingsAppearanceRouteScreen.tsx) is typography-only — "Text" (Text size), "Terminal" (font size), "Code & Diffs" (font size, word break). There is:apps/mobile);useColorScheme(), with a hardcoded two-mode token set inapps/mobile/global.css(@variant dark).So a user who has set up Ocean dark with a custom accent on desktop picks up their phone and gets the stock palette with no way to change anything. Theming is one of the most user-visible personalization features the product now has, and mobile is entirely left out.
There is also a structural blocker worth naming: the entire theme state lives in browser
localStorage(t3code:theme,t3code:theme-appearance-mode,t3code:theme-halves:v1,t3code:themes:v1) and has no representation inpackages/contracts—ClientSettingsSchemahas appearance-adjacent keys (glassOpacity, font settings, …) but no theme/color-scheme/appearance-mode key. Nothing can sync to a native client even in principle today.Proposed solution
Bring the theme system to mobile, staged:
themePalette.ts; mobile needs a mapping from the core roles onto its uniwind CSS variables (apps/mobile/global.css,useThemeColor.ts) instead of the hardcoded light/dark token blocks. Device-local persistence viamobile-preferences.tsmatches how mobile stores other prefs today.ThemeFilev1 JSON (import from file/paste, like web's "Add a theme" dialog). The parser (parseThemeFile) and OKLCH canonicalization already live in web code and could move to a shared package.localStorageintoClientSettingsinpackages/contractsso all clients share one theme setup. This benefits web/desktop multi-device users too and is the natural end state, but items 1–2 don't have to wait for it.Why this matters
Personalization is now a headline feature of the product on desktop (theme editor, VS Code import, Open VSX search), and prior demand for it was strong enough that several issues asked for exactly this before the web system shipped (#418, #1279, #1567 — all closed once web got themes). Mobile users currently can't even force dark mode independently of the OS. Cross-client visual consistency — same theme on desktop and phone — is the obvious expectation once themes exist at all.
Smallest useful scope
Item 1 only, minimal form: a light/dark/system override plus a picker over the five built-in themes (core color roles mapped; terminal/code accent roles can lag), stored device-locally. No editor, no import, no sync.
Alternatives considered
Risks or tradeoffs
themeAllowsSidebarArtwork); mobile can simply skip artwork initially.Examples or references
Related issues:
Key code references:
apps/web/src/themePalette.ts(theme definitions,ThemeFilev1, 58 color roles, localStorage keys)apps/web/src/components/settings/ThemeSettings.tsx(ThemeLibrary),ThemeEditorPanel.tsx,ThemeImportDialog.tsx,ThemeSearchSection.tsx,openVsxThemes.ts,vscodeThemeImport.tsapps/web/src/hooks/useTheme.ts(appearance mode + theme mixing)packages/contracts/src/settings.ts(ClientSettingsSchema— no theme keys today)apps/mobile/src/features/settings/SettingsAppearanceRouteScreen.tsx,apps/mobile/global.css,apps/mobile/src/lib/useThemeColor.ts,apps/mobile/src/persistence/mobile-preferences.tsScreenshots (captured on current
main@ac1264e2c; web via local dev server at 1440×900, mobile via the iOS dev client on an iOS 26.5 simulator):Web/desktop — Settings → Appearance: mode tiles, theme cards (T3 Code, T3 Chat, Grove, Ocean, Ember, Iris), Create/Import theme:
Web/desktop — theme editor ("Create theme") and the "Add a theme" import dialog with Open VSX search:
Web/desktop — a built-in theme (Ocean, dark) applied:
Mobile — the entire Appearance screen: typography only, no theme or light/dark/system controls (top and bottom):
Contribution
All reactions