feat(desktop): add theme import and backdrop accessibility controls - #54276
feat(desktop): add theme import and backdrop accessibility controls#54276grepmykeys wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds desktop Appearance customization and accessibility controls by introducing calmer built-in themes, a persisted decorative-backdrop intensity preference, and a Hermes-native JSON theme import path (with tests).
Changes:
- Added two new built-in desktop themes (Graphite, Paper) to the presets registry.
- Introduced a persisted decorative backdrop mode (Off/Subtle/Full) and wired it into the Backdrop rendering and Appearance settings UI.
- Added Hermes-native theme JSON import support (single theme or
{ themes: [...] }pack) with new unit tests.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/desktop/src/themes/presets.ts | Adds Graphite/Paper themes and registers them as built-ins. |
| apps/desktop/src/themes/install.ts | Adds Hermes-native theme JSON parsing/installation entry point. |
| apps/desktop/src/themes/install.test.ts | Adds tests covering Hermes-native theme JSON import. |
| apps/desktop/src/store/backdrop.ts | Adds persisted decorative backdrop mode and opacity mapping. |
| apps/desktop/src/store/backdrop.test.ts | Adds tests for backdrop preference behavior and persistence. |
| apps/desktop/src/components/Backdrop.tsx | Uses the persisted backdrop setting to control artwork rendering. |
| apps/desktop/src/app/settings/appearance-settings.tsx | Adds Accessibility section, backdrop control, theme import card, and palette hint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: LGTM
Desktop theme import and backdrop accessibility controls. Well-structured changes: new backdrop store with nanostores atom, Hermes-native theme parser with validation, two new preset themes (Graphite, Paper), and theme import UI. Good test coverage across all new modules.
Reviewed by Hermes Agent
95c6600 to
eece94e
Compare
- add Graphite and Paper built-in desktop themes - add decorative backdrop Off/Subtle/Full setting under Appearance accessibility - support importing Hermes-native theme JSON files and theme packs - add an Appearance hint for the command palette shortcut - cover backdrop preferences and native theme import with tests
- keep the dev-only backdrop opacity control effective - validate Hermes theme imports before installing packs - make backdrop preference tests exercise module initialization
eece94e to
1febcba
Compare
teknium1
left a comment
There was a problem hiding this comment.
Thanks for the focused desktop customization work. The theme-import and three-level backdrop ideas remain unimplemented on current main, but the backdrop portion now overlaps merged PR #64598.
Problems
apps/desktop/src/store/backdrop.ts:18-21reads only the newhermes.desktop.decorative-backdrop.v1key. Current main persists its merged on/off setting atapps/desktop/src/store/backdrop.ts:5-13underhermes.desktop.backdrop.v1; a user who chose Off has storedfalse, which this code ignores and replaces withfull.- New visible copy is hard-coded in
apps/desktop/src/app/settings/appearance-settings.tsx:285-288,:324-326,:418-421, and:464-482. Current main routes appearance copy throughapps/desktop/src/i18n/types.ts:303-330and locale catalogs.
Suggested changes
- Salvage onto the merged backdrop store with a legacy
false → off/true → fullmigration and test it. - Add the new Appearance strings to the i18n schema and supported locale files.
This is an automated hermes-sweeper review.
| value === 'off' || value === 'subtle' || value === 'full' | ||
|
|
||
| const read = (): DecorativeBackdropMode => { | ||
| const value = storedString(KEY) |
There was a problem hiding this comment.
Current main now persists the merged on/off setting under hermes.desktop.backdrop.v1. Reading only this new key means an existing stored false is ignored and becomes full; please migrate the legacy value (false → off, true → full) before defaulting.
| { id: 'off', label: a.embedsOff } | ||
| ] as const satisfies readonly { id: EmbedMode; label: string }[] | ||
|
|
||
| const backdropOptions = [ |
There was a problem hiding this comment.
Please source these labels and the other new visible strings in this component from the existing Appearance i18n schema and add them to every locale catalog. Current main localizes the existing backdrop row rather than embedding English text here.
…me-changes # Conflicts: # apps/desktop/src/app/settings/appearance-settings.tsx # apps/desktop/src/components/Backdrop.tsx # apps/desktop/src/store/backdrop.ts
|
Addressed Teknium1's review feedback in 94f4f31:
Local verification:
|
What does this PR do?
Adds a small desktop Appearance customization/accessibility pass:
{ "themes": [...] }The backdrop control is intended as a readability/accessibility option for users who find the decorative background visually noisy behind translucent chat surfaces, while preserving the current branded default.
The native JSON import path gives users a cleaner customization option than relying only on best-effort VS Code Marketplace theme conversion.
Related Issue
No linked issue.
Type of Change
Changes Made
apps/desktop/src/themes/presets.tsapps/desktop/src/store/backdrop.tsapps/desktop/src/components/Backdrop.tsxapps/desktop/src/app/settings/appearance-settings.tsxapps/desktop/src/themes/install.tsapps/desktop/src/themes/install.test.tsapps/desktop/src/store/backdrop.test.tsHow to Test
From
apps/desktop, run:Run:
Run targeted eslint:
Launch the desktop app and verify:
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — N/Acli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AScreenshots / Logs
Dark mode Appearance settings with Graphite/Paper themes, theme import card, and decorative backdrop accessibility control.
Light mode Appearance settings with Paper selected, Graphite available, theme import card, and decorative backdrop accessibility control.
Validation run locally: