hermes-agent/apps
brooklyn! 9b1e0d6f70
feat(desktop): assignable themes per profile (#42286)
* feat(desktop): assignable themes per profile

The desktop skin was a single global preference, so every profile shared
one look. Make the theme assignment per profile: picking a theme assigns it
to the profile that's currently live, and switching profiles paints that
profile's own skin. A profile with no assignment inherits the global default,
so single-profile installs and existing setups are unchanged.

- themes/context.tsx: per-profile skin record in localStorage; ThemeProvider
  follows $activeGatewayProfile; boot paint uses the last active profile's
  theme to avoid a flash on a non-default relaunch; setTheme assigns to the
  live profile (default profile also seeds the legacy global fallback).
- settings/appearance-settings.tsx: caption noting the theme is saved per
  profile, shown only when more than one profile exists.
- i18n: themeProfileNote string across en/zh/zh-hant/ja.
- themes/profile-theme.test.ts: resolution + inheritance coverage.

* feat(desktop): make light/dark mode per profile too

The command palette / theme picker sets skin + mode together on each pick,
so leaving mode global meant a profile couldn't actually remember the full
look it was given (e.g. "Ember Dark" in one profile would render Ember Light
if another profile last flipped the global mode). Mirror the per-profile skin
record for light/dark mode: ThemeProvider resolves and applies the active
profile's mode on switch, the boot paint uses it, and setMode assigns to the
live profile (default profile also seeds the legacy global mode fallback).

* refactor(desktop): collapse per-profile skin/mode into one helper

Skin and mode were near-identical resolve/assign pairs with hand-rolled
try/catch around localStorage. Fold both into a single profilePref<T>
factory (resolve + assign, default profile seeds the legacy global) and
lean on storedString/persistString for the error-swallowing. Tests go
table-driven over both prefs since they share one contract. No behavior
change; -89 LOC.

* refactor(desktop): treat default profile as the global slot directly

"default" isn't a real profile — it is the legacy global value. Stop
double-writing (record['default'] + global) on assign; route default
straight to the global. resolve is unchanged: a profile with no record
entry already falls back to the global, so default reads it for free.
2026-06-08 17:42:17 +00:00
..
bootstrap-installer test(bootstrap-installer): cover PowerShell path layout cross-platform 2026-06-06 19:59:16 -07:00
desktop feat(desktop): assignable themes per profile (#42286) 2026-06-08 17:42:17 +00:00
shared fix(desktop): guard reconnect sockets and keep branch search precise 2026-06-03 13:13:21 -05:00