Repository navigation
Done
Labels
Description
Owner: Franklin (suggested)
Linked ticket: Jarn FE: Match the Command Panel theme on the Jarngreipr board. That ticket needs this one shipped first.
Report
Jarn FE should be able to use the same theme as the Command Panel overlay when Command Panel is installed. Today no other app can read the theme.
Verified
Confirmed from code reading, not built or device-tested (Command Panel f408f7b).
- The companion gets its theme in three steps in
ui/settings/CompanionTheme.kt:rememberOverlayLookcallsresolveLookPalette(theme mode, LED accent, Theme Studio pinned colors),companionPaletteFrommaps that to 14 color roles, andCompanionThemeprovides them. - The inputs are private or split:
overlay_lookandcustom_looksare in the app's private prefs (Prefs),tcc_theme_modeis a system setting, and the LED accent comes fromThorRgbController.accentOverride. - Step 1 is inside a composable, so a provider can't call it as is.
- A signature permission can't protect this: Command Panel (
8ebd8e6f...) and Jarngreipr (a9a6e462...) use different signing keys.
Fix
- Move the non-Compose part of step 1 into a shared function that returns the resolved
TccColors. The overlay and companion keep their current behavior. - Add an exported, read-only
ThemeProviderat${applicationId}.theme. Inserts, updates and deletes are refused. Theme colors aren't secret, so it needs no permission. - Return one row: contract version,
isDark, and theCompanionPaletteroles as ARGB ints (bg,rail,surface,surfaceHigh,border,accent,accentSoft,accentFocused,onAccent,textPrimary,textSecondary,textTertiary,danger,success). - Call
notifyChangewhen the theme mode, active look, custom looks, LED accent sync or LED color changes. - Publish the theme whether or not "Companion follows overlay look" is on. Never publish Theme Studio's unsaved draft.
- Document the contract next to
docs/PANEL_PLUGINS.md. Never rename or renumber a column; a breaking change means a new version.
Keep in mind: a provider can be created before Application.onCreate, so read prefs lazily in query and don't rely on Hilt injection.
How to verify
- Unit tests for the shared resolver and the row encoding.
- On device:
content queryreturns the same colors the companion shows for light, black, a custom look and LED accent sync. - Writes through
content insert/update/deleteare refused. - Changing the look fires a change notification.
Out of scope
Shapes, fonts and look renderers. The first version shares colors only.
Activity
BrianJr03 commentedon Nov 24, 2026
Merged in #86 (96d753a, bac347b) and shipped in v0.14.0: https://github.com/BrianJr03/command-panel/releases/tag/v0.14.0
Verified on the Thor against the release APK: signed by the single release signer (SHA-256 8ebd8e6f...988927),
content queryonjr.brian.commandpannel.theme/palettereturns contract version 1, and insert and delete are refused as read-only. The look checks from #86's test plan were done by hand.