desktop-change
Change agent-office's desktop shell — tray menu, native notifications, settings, IPC channels, windows, the auto-updater, packaging/installers or icons. Use for edits under packages/desktop/ (main, pr
SKILL.md.claude/skills/desktop-change/SKILL.md
GitHubChange the desktop shell
Rules: PRIVACY_SECURITY.md (Electron checklist), ARCHITECTURE.md, TESTING.md.
- Decide in the core first (red → green):
- What the tray shows:
core/src/domain/tray.ts - When to notify:
core/src/domain/attention.ts - Update policy:
core/src/domain/update-policy.ts - Settings fields:
shared/src/desktop-api.tsSettingsSchema(additive, with defaults) andcore/src/domain/settings.ts(restart fields)
- What the tray shows:
- IPC: add the channel name to
shared/src/ipc-channels.tsand the method toAgentOfficeApi(additive). Then add the handler indesktop/src/main/ipc-api.ts, zod-validated, with a test inipc-api.test.ts, and the bridge indesktop/src/preload/index.ts. - Electron adapter: keep it thin (
desktop/src/main/adapters/electron-*.ts). Logic stays in the core. - Wiring:
composition.tsandcomposition.test.ts(fakeShell). - Renderer: view model → controller → DOM adapter (see
/scene-changefor 3D). - App E2E: add or extend a spec in
packages/desktop/e2e/(isolated profile frome2e/app.ts), thenmake build test-ui. - Security review against the Electron checklist: no new permissions, no Node in the renderer, the CSP is unchanged, and the IPC is validated and sender-checked.
- Packaging changes: run
make package, launch the unpacked app once, and run the hook wrapper from Settings → Install (tempCLAUDE_SETTINGS_FILE). Runmake iconsafter editingbuild/*.svg.
Theme: desktop/src/main/theme.ts (pure) applies the theme setting to nativeTheme.themeSource and the window background; desktop/e2e/theme.spec.ts checks both themes and contrast (drop Playwright's color-scheme emulation with emulateMedia({ colorScheme: null })). Quitting with managed sessions asks first (createQuitGuard).