| name | maintain-app-shell |
| description | Maintain Voice Layer's Tauri/WebView shell, root render, startup wiring, window chrome, and cross-view lifecycle. Use when changing app composition, global layout, startup/teardown, or shell-level accessibility and privacy behavior. |
Maintain the application shell
Role and boundary
Keep the shell responsible for one coherent DOM tree, native-overlay window chrome, shared settings/session wiring, and safe startup/teardown. Keep feature state in its owning module; do not turn the shell into a second Chat, Live, Settings, or diagnostics state machine.
Source map
src/main.ts: renderApp, initializeVoiceFeatures, wireStatusChrome, wireThinkingControl, and final navigation/beforeunload wiring.
src/navigation.ts: AppView and wirePrimaryNavigation for panel visibility, tab chrome, epoch races, and focus.
src/style.css: design tokens, .app-shell, .topbar, .app-body, responsive breakpoints, focus, and reduced-motion rules.
index.html: #app mount and Vite entry; src-tauri/src/lib.rs: Tauri builder, managed state, commands, logging, and cached warmup.
src-tauri/tauri.conf.json: frontend, window, titlebar, bundle, and capability-facing configuration.
tests/navigation.test.ts, tests/settings-headings.test.ts, tests/assistant-activity.test.ts, and tests/debug-metrics.test.ts: shell-visible contracts.
Cover
- Preserve the four current destinations (Chat, Live, Settings, Debug), sidebar visibility, titlebar/session/provider indicators, native-overlay drag region, and the dark-only palette currently defined in
style.css.
- Keep one
renderApp() markup source and wire behavior after elements exist; use DOM APIs and textContent for dynamic labels.
- Keep startup warmup cache-only and non-authorizing: it must not download a model or request microphone access; keep teardown best-effort and request-scoped.
- Preserve typed IDs, local-first conversation privacy, focus order,
aria-current, hidden, aria-live, reduced-motion behavior, and the established 960×680 minimum / 1200×900 default window assumptions.
- Inspect current source before changing markup or CSS; current source wins over stale prototype prose. Avoid adding product surfaces not in the current architecture.
Validate and accept
- Run
bun test tests/navigation.test.ts tests/settings-headings.test.ts tests/assistant-activity.test.ts tests/debug-metrics.test.ts.
- Run
git diff --check against the actual files changed; run just check when the change crosses TypeScript/Rust/build boundaries. Inspect the rendered shell at desktop and responsive widths; use $test-voice-layer-app for packaged WebKit/accessibility checks.
- Treat native packaged startup, microphone permission behavior, and visual/device acceptance as separate gates; tests and a Vite build do not prove them.
Relationships
Hand view transitions to $maintain-navigation; hand sidebar/session persistence to $maintain-session-sidebar and $maintain-sessions; hand feature panes to $maintain-chat, $maintain-live, $maintain-settings, and $maintain-debug. Consult $maintain-diagnostics for native startup/log operations.