Problem: the frontend had an implicit OS+Apps metaphor (desktop, floating windows, an app registry) but the contract was informal — the mascot was hardcoded into the shell, all apps were statically imported into one 800KB bundle, and there was no install/uninstall path. Change: three phases landed. - Phase 1 (contract + docked kind): AppDef extended with docked/noIcon and optional geometry; the mascot registered as a docked app via a generic DockedLayer that replaces the hardcoded <MascotLayer />; openAppWindow branches on docked → toggleDocked; persisted docked visibility store (absent key = visible, no APPS import to avoid a static cycle). - Phase 2 (lazy loading): AppDef.component is now a dynamic-import loader; LazyApp renders with a loading skeleton; Vite code-splits each app (main bundle 800KB→485KB); the LazyMascot wrapper is gone since the lazy loader breaks the import cycle directly. - Phase 3 (installable apps, local bundles): AppManifest + catalog + installApp/uninstallApp + localStorage persistence; reactive apps store (built-in + installed) and derived appById; App Store page; Notes demo app; icons.ts and WindowLayer's orphan-close react to registration so installs appear without a reload. - Structure: data-table casing unified to PascalCase; the mislabeled DataTable.svelte.ts (pure types, not runes) renamed to types.ts; LazyApp colocated with its desktop-shell consumers; app-store moved under lib/ so the dependency direction is consistent. Risk: the app registry is now a reactive store, not a static array, so every consumer (Desktop, DockedLayer, Taskbar, icons, windows) reads from derived stores. Two static-cycle traps are documented in docs/mbse/components.md §9: docked.ts must not import APPS (it would fire a TDZ at init via the apps.ts→pages→windows.ts→here path), and apps.ts must not statically import the mascot (the lazy loader defers its module graph). Remote bundle loading, the /api/v1/apps endpoint, and permission enforcement are deliberately NOT in this commit — they are security-critical and deferred to Phase 4 with an ADR. Verification: vitest 38/38; svelte-check + tsc clean for changed files; eslint clean; vite build green; runtime smoke confirmed (install Notes → icon appears → open → uninstall → icon + window gone; survives reload). docs/mbse/components.md Component 9 and the plan updated. Plan: plans/2026-07-21-frontend-os-apps-architecture.md
6.1 KiB
6.1 KiB
Plans
Pre-flight runbooks for planned changes. When a plan is executed, move it to
done/ and add changelog entries on affected node pages. If things
went sideways, open an investigation.
Active
| Date | Title | Status |
|---|---|---|
| 2026-07-05 | Oikos Prometheus LXC | Planned — not started |
| 2026-07-08 | Oikos gaps, broken things, and improvements | In Progress — security items (B1-B5) and doc drift (E) still open |
| 2026-07-08 | Control room web UI | In Progress — packaging/auth sections superseded by the Wails plan's Phase 0 (client/server split); M4 still open |
| 2026-07-08 | Liveness, drift, and UX cohesion | In Progress — Phase 5 deferred |
| 2026-07-10 | General gated execution: unlimited actions, gated by risk | In Progress — request_execution enum retired (60effcb); only auto-act revival (item 10) still open |
| 2026-07-11 | Nomos agent code review: gaps and improvement plan | In Progress — only C1 (unauthenticated nomos gateway) still open, deferred |
| 2026-07-14 | Activity gaps | In Progress |
| 2026-07-14 | Activity timeline | In Progress |
| 2026-07-17 | Codebase review, lint audit, and documentation maintenance | Report delivered — doc/tooling fixes applied; code refactors pending |
| 2026-07-18 | Session review: three recent sessions | Implemented in v0.7.12 — P0.1/P0.2/P1.3/P1.4/P1.5/P1.6/P1.8/P2.10; P1.7 and P2.9 deferred (retry cap covers) |
| 2026-07-20 | Desktop mascot ("Cluck") | Implemented in v0.8.0 — see deviation note; physics/window-interaction follow-ups tracked separately |
| 2026-07-20 | Session review: past 10 sessions | Implemented in v0.7.13 — all P0/P1/P2 items landed |
| 2026-07-20 | Mascot physics/window-interaction audit | P0–P2 implemented; P3 ("cool stuff") ideas open |
| 2026-07-21 | Frontend as OS + Apps — architecture audit & refactor | Planned — Phase 1 ready |
Done
See done/ for executed plans:
Conventions
- File name:
YYYY-MM-DD-<slug>.md. Use the target date if known, otherwise the planning date. - Status:
Planned→In Progress→Done(move todone/on completion). - When done: add a changelog entry on every affected node page, then move the file to
done/. - Plans are append-only once execution starts — don't rewrite pre-flight intent after the fact.