Skip to content

The agent that grows with you

fix(desktop): register classic default skin palette in Appearance

686f6c61743d3a4119e3
diff --git a/apps/desktop/src/themes/backend-sync.test.ts b/apps/desktop/src/themes/backend-sync.test.ts
index fe8f5170587..aa7594780a3 100644
--- a/apps/desktop/src/themes/backend-sync.test.ts
+++ b/apps/desktop/src/themes/backend-sync.test.ts
@@ -69,19 +69,32 @@ describe('ingestBackendSkin', () => {
expect($pendingSkinApply.get()).toBeNull()
})
- it('never registers default in the backend store (desktop keeps its own palette)', () => {
- ingestBackendSkin(skin('default'), { apply: true })
-
- expect($backendThemes.get().default).toBeUndefined()
+ it('registers the classic default skin so Appearance can select gold/navy (#76579)', () => {
+ ingestBackendSkin(
+ {
+ name: 'default',
+ description: 'Classic Hermes — gold and kawaii',
+ colors: { background: '#1a1a2e', ui_accent: '#FFBF00', banner_text: '#FFF8DC' }
+ },
+ { apply: true }
+ )
+
+ const registered = $backendThemes.get().default
+ expect(registered?.name).toBe('default')
+ expect(registered?.label).toBe('Classic Hermes')
+ expect(registered?.description).toContain('gold')
+ expect($pendingSkinApply.get()).toBe('default')
})
it('does not apply default on the connect-time seed', () => {
ingestBackendSkin(skin('default'), { apply: false })
expect($pendingSkinApply.get()).toBeNull()
+ // Seed still registers the palette so the theme grid can show it.
+ expect($backendThemes.get().default?.name).toBe('default')
})
- it('applies a runtime switch back to default (repaints the desktop to its own default)', () => {
+ it('applies a runtime switch back to default (classic gold palette)', () => {
ingestBackendSkin(skin('neon'), { apply: false }) // gateway.ready seed on some skin
ingestBackendSkin(skin('default'), { apply: true }) // Hermes switched back to default
diff --git a/apps/desktop/src/themes/backend-sync.ts b/apps/desktop/src/themes/backend-sync.ts
index dc855b06aca..0a5f745904b 100644
--- a/apps/desktop/src/themes/backend-sync.ts
+++ b/apps/desktop/src/themes/backend-sync.ts
@@ -91,24 +91,35 @@ export function ingestBackendSkin(skin: HermesSkin | undefined | null, { apply }
return
}
- // `default` is "no opinion" on the PALETTE — the desktop keeps its own default
- // (nous), so we never register a converted theme under `default`. It is still a
- // valid apply TARGET though: a runtime switch back to `default` must repaint the
- // desktop to its own default (setTheme normalizes `default` → nous). So we only
- // skip the registry step here and let it flow through the apply logic below.
- // Built-in names (mono/slate/…) already have a hand-tuned desktop palette — we
- // never shadow it, but the name is still a valid apply target.
- if (name !== 'default' && !BUILTIN_THEMES[name]) {
+ // Built-in names (mono/slate/…) already have a hand-tuned desktop palette —
+ // never shadow them, but they remain valid apply targets. The CLI `default`
+ // skin ("Classic Hermes — gold and kawaii") is *not* a desktop built-in, so
+ // we register the converted palette under `default` and let it appear in the
+ // Appearance grid / `/skin list` (#76579). Desktop's own boot default remains
+ // `nous` via DEFAULT_SKIN_NAME; selecting `default` paints the classic gold.
+ if (!BUILTIN_THEMES[name]) {
const theme = skinToDesktopTheme(skin as HermesSkin)
if (!theme) {
return
}
+ // Prefer the CLI description for the classic default skin so the grid
+ // shows "Classic Hermes — gold and kawaii" rather than a bare "Default".
+ const description =
+ name === 'default' && typeof (skin as HermesSkin).description === 'string'
+ ? String((skin as HermesSkin).description).trim() || theme.description
+ : theme.description
+ const label =
+ name === 'default'
+ ? 'Classic Hermes'
+ : theme.label
+ const registered = { ...theme, description, label }
+
const current = $backendThemes.get()
- if (JSON.stringify(current[name]) !== JSON.stringify(theme)) {
- $backendThemes.set({ ...current, [name]: theme })
+ if (JSON.stringify(current[name]) !== JSON.stringify(registered)) {
+ $backendThemes.set({ ...current, [name]: registered })
}
} else {
// Built-in/default-named user skins never shadow the desktop palette, but
diff --git a/apps/desktop/src/themes/use-skin-command.ts b/apps/desktop/src/themes/use-skin-command.ts
index 72af1934644..e6178b9d5a2 100644
--- a/apps/desktop/src/themes/use-skin-command.ts
+++ b/apps/desktop/src/themes/use-skin-command.ts
@@ -2,12 +2,13 @@ import { useCallback } from 'react'
import { useTheme } from './context'
-// Retired skin names land on the canonical Nous skin so old muscle memory works.
+// Retired skin names land on a still-shipped theme so old muscle memory works.
+// `default` is intentionally NOT aliased: when the backend registers the classic
+// Hermes gold palette under that name (#76579) it must be selectable.
const ALIASES: Record<string, string> = {
ares: 'ember',
- default: 'nous',
- gold: 'nous',
- hermes: 'nous',
+ gold: 'default',
+ hermes: 'default',
'nous-light': 'nous'
}