Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

docs: cut five finished plans, trim PROGRESS's tail, log the audit follow-up

Rahman29f887a8c11b
diff --git a/CLAUDE.md b/CLAUDE.md
index e722d6da..7f482723 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -46,7 +46,18 @@ of them. Deleted 2026-07-30 in the same spirit: `PLAN.md` (the "master plan" —
section contradicted by shipped code, and its one unique asset, a Control-Room-vs-MSO
table, is descriptive rather than decision-carrying) and `MULTISHELL-PLAN.md` (its sibling
repo is gone, all six phases are checked off, and PROGRESS.md:574 reverses its one unique
-decision). Both recoverable with `git show bccd0b1:docs/<name>`.
+decision). Both recoverable with `git show bccd0b1:docs/<name>`. Deleted 2026-08-10
+(`git show 421ab7f:docs/<name>`): `IOS-PARITY-REFACTOR-PLAN.md` (every phase ✅, and the
+`mock-os/` tree it refactored toward no longer exists), `DESIGN-RECONCILE.md` (self-labelled
+ARCHIVE, same missing tree), `MOBILE-RESPONSIVE-PLAN.md` (phases 1–4 shipped; phase 5 is the
+Playwright verification chore already described below), `SHELL-LAYOUT-KIT.md` (documented
+`AppHeader`/`AppInspector`, both deleted the same day), and `AUDIT-2026-06-14.md` +
+`SCORECARD-2026-06-14.md` (every row shipped or gone stale — one cites an `/api/v1/browser`
+route that does not exist and a coverage install that already happened). **`AUDIT-2026-06-11.md`
+STAYS** — five source comments cite its findings by number. `SHELL-FIDELITY-PLAN.md` and
+`DRAWER-MENU-BYOK-PLAN.md` also stay: both look finished and are not, each carrying an
+unstarted tail (phases D–F, and providers D2–D4). PROGRESS.md's pre-2026-06-15 tail (34
+entries) was trimmed the same day; it is one `git show` away.
## Architecture
```
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index 29c1545a..f1657270 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -14,9 +14,11 @@
> This file is kept for the REASONING it records — why the origin split exists, why
> the CSP is shaped as it is — which remains valuable and is hard to recover.
>
-> The earlier Convex + Control-Room-agent design (see `DESIGN-RECONCILE.md`, early
-> `PROGRESS.md` phases) was removed: mso runs **as a host process** and talks to
-> its own machine directly. No database, no external agent.
+> The earlier Convex + Control-Room-agent design was removed: mso runs **as a host
+> process** and talks to its own machine directly. No database, no external agent.
+> Its reconciliation note was deleted on 2026-08-10 —
+> `git show 421ab7f:docs/DESIGN-RECONCILE.md` — because the `mock-os/` tree it compared
+> against is gone; the early `PROGRESS.md` phases still record the shape.
## What it is
diff --git a/docs/AUDIT-2026-06-14.md b/docs/AUDIT-2026-06-14.md
deleted file mode 100644
index c675f3cc..00000000
--- a/docs/AUDIT-2026-06-14.md
+++ /dev/null
@@ -1,50 +0,0 @@
-# mso Audit Follow-up — 2026-06-14
-
-> Brief delta over [`AUDIT-2026-06-11.md`](./AUDIT-2026-06-11.md). Captures
-> what the 13-tick loop (T2→T14, see `PROGRESS.md`) closed and what stays
-> open. Gates at HEAD: `pnpm typecheck` PASS · `pnpm lint` PASS (0 warn) ·
-> vitest 276/280 PASS (4 env-gated skips) · `pnpm audit` clean.
-
-## Closed in 06-14 loop
-
-| # | Item | Tick / commit |
-|---|---|---|
-| 1 | UX error-doctrine sweep — shared toast bus adopted by former zero-adopters; retryable failure states standardized | T3 `d11b997` |
-| 2 | Destructive ops gated by `ResponsiveDialog` confirm + undo toast (5 sites + 1 `window.confirm` replaced) | T3 `d11b997` |
-| 3 | Focused-window hotkey capability — `useFocusedHotkey()` primitive + 3 apps swept (no more cross-window keystroke bleed) | T4 `b1ea15e` |
-| 4 | SHELL-FIDELITY Phase C — generic `<WindowPreview>` in appshell; mobile-switcher no longer double-spawns PTYs | T5 `093759b` |
-| 5 | Test gap closure — fs · pty-limits · audit · rate-limit · store-persist · hotkey · window-preview · viewport-window · tokenize. 136 → 262 passing | T2/T7/T8 |
-| 6 | A11y baseline — `maximumScale` removed (WCAG 1.4.4), hand-rolled menus given roles, icon-buttons labeled | T2 `cf0ed9f` |
-| 7 | Performance polish — reel frame-store (~6× re-render drop), image-editor Blob history (3–5× mem drop), code-editor incremental tokenize, Files virtualization (~25–40× DOM drop on big dirs) | T6/T8 |
-| 8 | Security P2/P3 — `OS_AGENT_TOKEN` scoped to `/api/v1/browser/*`, denylist completeness verified, HMAC length-leak closed (`constantTimeEq`), HSTS guidance in `INSTALL.md` | T5/T7 |
-| 9 | Hygiene — `slice.json` honesty (8 cleaned), Radix imports scoped per-app, `lib/host/audit` write-serialization queue | T4/T8 |
-| 10 | Perf+arch — `React.memo` hot paths, Spotlight virtualization, slice/value cycle validators, healthcheck endpoint, verify wiring | T10 `5b730e8` |
-| 11 | Test+docs — exec route tests, contrast audit script, scorecard | T11 `0c76e17` |
-| 12 | Perf+sec+a11y+deploy — 0 value cycles, 45× ts/js tokenize, postcss `^8.5.10` override, healthcheck docs, default-theme contrast (WCAG AA) | T12 `0511d05` |
-| 13 | Refactor — `mock-adapter.ts` split (300 → 60 LOC main + `mock-data.ts` 108 + `mock-fs.ts` 164); all ≤200 LOC. Lint warnings 1 → 0 | T13 |
-| 14 | Quality — vitest coverage config (v8 provider, 50/40/50/50 thresholds, `pnpm coverage` script); `pnpm audit` confirmed 0 vulns | T14 |
-
-## Still open
-
-| # | Item | Disposition |
-|---|---|---|
-| 1 | rr-lift Phase 4 — publish appshell + lifted primitives to `resource.rahmanef.com` | Next loop |
-| 2 | Third-party security audit | External / scheduling |
-| 3 | Multi-tenant scope | **Out of scope** by design (single-owner tool) |
-| 4 | Files-manager mobile-responsive primitives | Bigger surface; system-monitor/assistant/os-settings done first |
-| 5 | code-editor parser-based highlight (Tree-sitter) for incremental semantic | Nice-to-have; current incremental tokenize is sufficient |
-| 6 | Pre-deploy CI gate that actually runs smoke (smoke is currently env-skipped) | Needs env wiring in CI |
-| 7 | `optimizePackageImports` for newly-scoped Radix (select/popover/label) | Blocked — `next.config.mjs` is user WIP |
-| 8 | `@vitest/coverage-v8` install (config landed in T14, install deferred per no-new-dep rule) | `pnpm coverage` will prompt on first run |
-
-## Net score delta
-
-- 06-11 baseline: **88** (post-Wave-1-4 hygiene)
-- 06-14 trajectory: **85 → 99** across 13 ticks (T2→T14).
- - T2–T9 closed UX, a11y, test, perf, and security inventory (→ 96).
- - T10–T12 added cycle validators, healthcheck, 45× tokenize, postcss
- override, default-theme contrast (→ 98).
- - T13–T14 split `mock-adapter.ts` (lint warn 1 → 0), added coverage
- config, confirmed clean `pnpm audit` (→ 99–100).
-
-Remaining gap to 100 is the open list above — none are user-visible breakage.
diff --git a/docs/DESIGN-RECONCILE.md b/docs/DESIGN-RECONCILE.md
deleted file mode 100644
index 93dd8ced..00000000
--- a/docs/DESIGN-RECONCILE.md
+++ /dev/null
@@ -1,130 +0,0 @@
-# Design Reconcile — `mock-os` (os-rr) → mso
-
-> **ARCHIVE (historical).** This records the Phase-1 decision to adopt the os-rr
-> design + Cloud API contract. The **visual/design adoption still holds** (glass
-> tokens, shell chrome, mobile shell, the `OsApi` mock↔http boundary). The
-> **backend assumptions are obsolete**: Convex + the Control-Room agent bridge
-> were later removed — mso is now self-contained (`lib/host` does fs/exec/sys
-> directly, signed-cookie auth). For the current system read `ARCHITECTURE.md`.
-> The "Revised architecture" diagram below is kept only as a record of the old plan.
->
-> **`mock-os/` NO LONGER EXISTS IN THIS REPO.** The prototype tree it refers to was
-> deleted on 2026-07-30 as part of a dead-weight sweep: 101 files, 5.7k lines and 6.6 MB
-> that nothing in the app, the build, the tests or the lint pass ever touched. It is
-> recoverable two ways — `git show bccd0b1:mock-os/<path>` for any tracked file, and
-> `~/archive/mso-cleanup-2026-07-30/mock-os.tar.gz` for the whole tree including the
-> untracked `Apple-clone-app/`. Every `mock-os/...` path below should be read against one
-> of those, not against a working directory.
-
-The uploaded `mock-os/` is **os-rr**: a macOS-style browser shell prototype that is
-*explicitly a VPS front-end*. It is not just a visual reference — it ships a
-defined **Cloud API contract** (`mock-os/js/core/api.jsx` + `os-rr API.html`)
-that is the single boundary between the desktop and a VPS daemon. This matches
-mso's purpose and gives us the concrete agent-bridge spec Phase 2 needed.
-
-## What os-rr is
-
-- **Shell**: glass macOS aesthetic — 26px menu bar (logo + app menus + right
- status cluster + clock), bottom glass **dock** (52px glossy rounded-square
- icons, hover-lift, running dot, tooltip), draggable/resizable **windows** with
- traffic lights, **edge-snap** (halves + quadrants + top-maximize), minimize
- scale anim, boot screen.
-- **Themes/tokens** (`css/os.css`): light + dark, accent swatches, `dir`
- presets (aqua / graphite / vivid), 5 wallpapers (aurora/dusk/mist/graphite/
- noir), `reduce transparency` a11y. All via CSS vars + `[data-theme]`.
-- **Responsive**: container queries collapse app sidebars (540/430px); a
- **mobile shell** (`js/shell/mobile.jsx`) for phones; `device` tweak auto/desktop/phone.
-- **Apps**: files, editor (code), media, video (reel), browser, preview,
- terminal, monitor, store, settings, assistant ("Alfa" AI), create-app.
-- **AI layer** (`js/ai/*`): an in-OS assistant with tool calls + an OS context handle.
-- **Persistence**: localStorage for windows/fs/apps/tweaks, with a boot-restore guard.
-
-## The Cloud API contract (the part that matters most)
-
-`makeApi({mode})` returns one of two adapters behind an identical interface:
-
-- **MockAdapter** — in-browser simulation (Phase 0 demo, no VPS).
-- **HttpAdapter** — real REST + SSE + WS to `{baseUrl}/api/v1`, Bearer auth.
-
-Endpoint groups (`OSApi_ENDPOINTS`):
-
-| Group | Endpoints | Maps to |
-|-------|-----------|---------|
-| `auth` | `POST /auth/token`, `GET /auth/me` | @convex-dev/auth (or agent token) |
-| `fs` | list/stat/read/write/upload/mkdir/move/copy/remove/download/usage | agent fs allowlist → `file-manager` slice |
-| `exec` | run, `stream` (SSE), kill, `pty` (WS) | agent pty manager → `os-terminal` slice |
-| `sys` | stats, `stats/stream` (SSE), processes, process/kill | agent telemetry → `system-monitor` + `process-list` |
-| `render` | start/status/stream/cancel/jobs | media (out of scope for VPS-lite) |
-| `apps` | list/manifest/create/start/stop/remove/serve | Dokploy/agent app lifecycle → `docker-apps` |
-
-This is the same boundary as the **Control Room agent's allowlisted HTTP API**.
-So `HttpAdapter` ≈ a thin client over the Control Room agent (or an `os-rr`
-daemon that wraps the same allowlist). No new host surface.
-
-## Adoption decision — what we take vs leave
-
-**Adopt (core, on-purpose for a VPS OS):**
-1. **Design tokens** → rewrite `app/globals.css` with os-rr's light+dark glass
- tokens, accent, wallpapers, traffic-light colours, radii. (rr: tokens, no hex
- in components.)
-2. **Shell chrome** → `os-shell` gains macOS **menu bar** (with live sys stats),
- glass **dock** (glossy icons + hover-lift + running dot), **window** traffic
- lights + **edge-snap** + maximize-restore + multi-edge resize.
-3. **Mobile shell** → port `shell/mobile.jsx` behaviour (fullscreen app switch).
-4. **`OsApi` abstraction** → add `lib/os-api/` with `MockAdapter` + `HttpAdapter`
- exactly per the contract. **This becomes the host hot-path boundary** —
- Convex stays for auth + persistence + reactive state; live host data
- (fs/exec/sys/pty) flows through `OsApi`→agent, NOT Convex (mirrors Control
- Room's "no Convex on the hot path").
-5. **Tweaks/settings** → theme/accent/wallpaper/dir/reduce-glass/device + server
- mode (mock|live) + serverUrl + serverToken.
-
-**Map to VPS apps (build as slices):** `files` (fs), `os-terminal` (exec/pty),
-`system-monitor` + `process-list` (sys), `docker-apps` (apps lifecycle),
-`os-settings` (tweaks), `assistant` (AI ops — later, ties to Control Room agents).
-
-**Leave for now (not VPS-lite):** media studio, video reel editor, render
-pipeline, generic browser. Keep the `render` API shape documented for parity but
-don't build the UI.
-
-## Revised architecture — OLD PLAN (superseded, kept for history)
-
-> This was the Phase-1 plan. It is **no longer what ships.** Convex and the
-> Control-Room agent are gone. Current architecture below + in `ARCHITECTURE.md`.
-
-```
-browser ── os-shell (window mgr, module store)
- ├─► Convex self-hosted auth · windows layout · app catalog · telemetry history
- └─► OsApi (mock | live)
- └─ HttpAdapter ─► Control Room agent /api/v1 (allowlisted)
- └─ fs · exec/pty · sys · apps → host
-```
-
-### What actually shipped (self-contained)
-
-```
-browser ── os-shell (window mgr, module store)
- └─► OsApi (mock | live)
- ├─ MockAdapter in-browser sim (demo; persists to localStorage)
- └─ HttpAdapter ─► same-origin /api/v1 (signed-cookie auth)
- └─ lib/host → Node fs / child_process (root-jailed) → host
-```
-
-- **What carried over**: the `OsApi` mock↔http boundary, the glass design tokens,
- shell chrome, mobile shell, the os-rr endpoint *shape* (`fs/exec/sys`).
-- **What changed**: no Convex (layout/registry → `localStorage`; device allowlist
- + config → `~/.mso/*.json`); no external agent (the Next.js app *is* the host
- process); auth is a password + device-approval HMAC signed cookie, not
- `@convex-dev/auth`; the browser is real Playwright (`os-browser`), not a proxy.
-- **Still demoable with zero host**: `OsApi` defaults to `MockAdapter`.
-
-## rr-compliance notes for the port
-
-- The prototype is one-file-per-app plain JSX on `window.*` globals. We **do not**
- copy that style — we re-author into rr vertical slices (`frontend/slices/<slug>/`),
- shadcn primitives, ≤200 lines/file, theme tokens. The prototype is the spec,
- not the source.
-- Traffic-light buttons, menus, context menus → wrap shadcn (`DropdownMenu`,
- `Button`) rather than raw elements.
-- `OsApi` types live in `lib/os-api/types.ts`; each adapter ≤200 lines (split by
- group if needed).
diff --git a/docs/DRAWER-MENU-BYOK-PLAN.md b/docs/DRAWER-MENU-BYOK-PLAN.md
index b19107a3..b7775397 100644
--- a/docs/DRAWER-MENU-BYOK-PLAN.md
+++ b/docs/DRAWER-MENU-BYOK-PLAN.md
@@ -5,7 +5,7 @@
> the **"add provider"** flow in `../models-rahmanef-com`.
>
> **Scope:** structural (shell↔app contract) + BYOK. Presentation-only iOS parity is tracked
-> separately in `IOS-PARITY-REFACTOR-PLAN.md` (**P0–P4 shipped 2026-07-15**, `23e400e`…`2c0aea8`;
+> separately in `IOS-PARITY-REFACTOR-PLAN.md`, deleted 2026-08-10 (**P0–P4 shipped 2026-07-15**, `23e400e`…`2c0aea8`;
> only the documented optional long-tail remains open) — **not** this doc.
>
> Built from a 3-probe audit (2026-07-16): mock UX spec · current shell chrome · BYOK-vs-models.
diff --git a/docs/FAQ.md b/docs/FAQ.md
index 597c2ee7..cab39784 100644
--- a/docs/FAQ.md
+++ b/docs/FAQ.md
@@ -89,10 +89,11 @@ adds the usual browser footprint — skip it on tiny boxes.
### How was the codebase audited?
-Two passes by the maintainer: `docs/AUDIT-2026-06-11.md` (initial cross-cutting
-sweep — security, perf, a11y, slice boundaries) and `docs/AUDIT-2026-06-14.md`
-(follow-up after the first round of fixes). The score trajectory across both
-passes lives in `docs/SCORECARD-2026-06-14.md`. A third pass on 2026-08-03 ran five
+The maintainer's initial cross-cutting sweep — security, perf, a11y, slice
+boundaries — is `docs/AUDIT-2026-06-11.md`; several source comments still cite its
+findings by number. A follow-up pass and its scorecard were deleted on 2026-08-10
+once every row had either shipped or gone stale (`git show
+421ab7f:docs/AUDIT-2026-06-14.md`). A third pass on 2026-08-03 ran five
adversarially-verified lenses (over-engineering, security, Next 16/React 19,
package-manager migration, repo health) — see the top of `docs/PROGRESS.md`. Quality
gates run on every push via the pre-push hook: typecheck, lint, 1100+ vitest tests,
diff --git a/docs/IOS-PARITY-REFACTOR-PLAN.md b/docs/IOS-PARITY-REFACTOR-PLAN.md
deleted file mode 100644
index 262946cd..00000000
--- a/docs/IOS-PARITY-REFACTOR-PLAN.md
+++ /dev/null
@@ -1,776 +0,0 @@
-# iOS Parity Refactor Plan — mso feature slices vs the Apple mock
-
-> **`mock-os/` NO LONGER EXISTS IN THIS REPO.** The prototype tree it refers to was
-> deleted on 2026-07-30 as part of a dead-weight sweep: 101 files, 5.7k lines and 6.6 MB
-> that nothing in the app, the build, the tests or the lint pass ever touched. It is
-> recoverable two ways — `git show bccd0b1:mock-os/<path>` for any tracked file, and
-> `~/archive/mso-cleanup-2026-07-30/mock-os.tar.gz` for the whole tree including the
-> untracked `Apple-clone-app/`. Every `mock-os/...` path below should be read against one
-> of those, not against a working directory.
-
-> **Goal:** bring every mso **feature slice's iOS (iPhone) surface** to parity with the
-> shared Apple iOS shell in `mock-os/Apple-clone-app/*` — grouped inset lists, liquid-glass
-> chrome, large-title nav, iMessage-style bubbles, iOS controls — **without** regressing the
-> **android / windows / dashboard / macOS** shells and **without** breaking mso's essence
-> as a headless-VPS cockpit.
->
-> **Scope:** presentation only. No data layer, no host-I/O, no window-store fork, no new deps.
-> Built from a 19-agent audit (2026-07-15): 3 SSOT extractors + 1 synth read the mock; 15 diff
-> agents (one per slice group) compared each slice against the SSOT. Every metric below is
-> **verified against `theme.js` / `config.js` / `support.js` / the `.dc.html` screens** — see
-> the per-slice `_ref`.
-
----
-
-## 0. Hard constraints (read first)
-
-Non-negotiable. Every step in §4 is checked against these.
-
-1. **VPS essence — never fabricate hardware.** No status-bar clock / wifi / battery / cellular /
- signal / brightness anywhere. The mock draws all of them on every screen; we reserve the notch
- zone (`--sai-top`) and paint **nothing**. The Dynamic Island stays a **functional live-activity
- pill** (shows only when an app reports an activity), never a decorative idle black notch.
- Control Center stays **real-toggles-only** (appearance/server/focus/spotlight/assistant/windows).
-2. **File-explorer DATA layer is sealed.** Every host-I/O symbol stays routed through `lib/host.ts`
- (`use-files*`, zip/upload/inspector untouched). The files-manager work is **presentation-only**;
- any iOS "search" must filter already-loaded entries client-side, never issue a host query.
-3. **One window store.** Shells stay chrome-only; never fork `appshell/lib/store.ts`.
-4. **mso rules stay in force:** shadcn primitives only, theme tokens not raw hex (fixed
- *category* colors — folder `#57b3ff`, switch-ON `#30d158`, audio gradient — are the accepted
- exception), ≤200 lines/file, barrel-only cross-slice imports (`@/features/<slug>`), no new deps.
-
-### 0.1 The two seams — how android/windows/dashboard stay byte-unchanged
-
-Every iOS change rides **one of two already-live seams**. This is the whole safety story:
-
-| Seam | Use for | Why the other shells are safe |
-|---|---|---|
-| **`useActiveShell().id === 'ios'`** (React) | structural / markup branches (large title, sheet-vs-dialog, composer pill, nav restructure) | the `else` path renders **today's exact markup**; android/windows/dashboard/macOS take it verbatim |
-| **`[data-shell="ios"] …`** (CSS) | pixel/color/token deltas on **shared** primitives (`Switch`, `Segmented`, `.glass` edge, icon shadow) | android matches `[data-shell="android"]`, etc. → **zero** computed-style delta on their trees |
-
-**The single most important rule: gate on `id === 'ios'`, NOT `surface === 'mobile'`.** Android is
-*also* `surface === 'mobile'` and renders its own `android-shell.tsx`. Keying on `surface` would
-silently restyle Android. Every step below keys on the exact string `'ios'`.
-
-**Bonus — already partitioned by mount.** `mobile-shell.tsx` and its whole tree (`mobile-home*`,
-`mobile-switcher`, `home-indicator`, `dynamic-island`, `mobile-notifications`) are the `render:` of
-**exactly one** ShellDescriptor (`id:"ios"`, `desktop.tsx:211`). No other shell imports them, so
-editing these files is invisible to the others **with no branch at all**. Shared primitives
-(`components/ui/*`, `WindowContent`-mounted app bodies) are the only things that need a gate.
-
----
-
-## 1. The iOS SSOT (condensed reference)
-
-The canonical spec every screen matches against. Full values verified against the mock source.
-*Match intent, not identity* — the mock uses token-driven inline styles, we use Tailwind + shadcn.
-
-### 1.1 Semantic tokens (light / dark)
-| var | Light | Dark | role |
-|---|---|---|---|
-| `--bg` | `#ffffff` | `#1c1c1e` | systemBackground |
-| `--grouped` | `#f2f2f7` | `#000000` | **grouped page under cards** (we lack this tonal step) |
-| `--card` | `#ffffff` | `#1c1c1e` | grouped-cell fill |
-| `--label` / `--label2` / `--label3` | `#1c1c1e` / `.6` / `.3` | `#fff` / `.6` / `.3` | primary / secondary / tertiary text |
-| `--sep` | `rgba(60,60,67,.16)` | `rgba(255,255,255,.1)` | hairline separator |
-| `--fill` / `--fill2` | `rgba(118,118,128,.12)` / `.24` | `.24` / `.36` | systemFill (search/segmented track) / switch-off |
-| `--glass-bg` / `--glass-stroke` / `--glass-hi` / `--glass-shadow` | `.62` frost / `.7` / `.95` / `.18` | `.55` / `.14` / `.2` / `.55` | liquid-glass fill / outer hairline / inner top highlight / elevation |
-| **`--tint`** | `#0a84ff` blue (default) | — | user accent; interactive only |
-
-**System (non-tint) colors:** `#ff453a` destructive · `#30d158` switch-ON green · `#57b3ff` folder glyph · `#ff6a9a→#f52d55` audio gradient.
-
-### 1.2 Radius · spacing · type
-- **Radius:** icon-tile/segmented-option `7` · segmented-track `9` · Safari pill `11` · **grouped card `12`** · switch/fav-tile `15` · Safari content `16` · sheet/composer/island `19–20` · app icon `23%` superellipse · circle `50%`.
-- **Spacing:** row pad `11px 16px` · card gap-below `18px` · footnote inset `0 16px` · home-indicator `34` · scale `4/8/12/16/20/24/32/40/48/64`.
-- **iOS type:** Large Title **32/800** ls-.02em (collapses → 22/700) · Title3 20/700 · row label / Callout **16/500** · Body 15/400 · row value 15/400 `--label2` · segmented option 14/500 · section header **13/600 upper** · footnote **12.5/400** `--label2` · big stat **44/700 tint**. Family `-apple-system,"SF Pro Text",…`.
-
-### 1.3 Chrome metrics (phone)
-Status bar **44** (home 52) · nav bar **46** (centered title, tint text buttons, glass) · tab bar **92** (58 + 34 home) · home-indicator pad **34**. z-stack: `wall 0 · screen 20 · chrome 30 · dock 55 · menuDrop 80 · ctx 91 · toast 95`.
-
-### 1.4 Grouped inset list + row anatomy (the workhorse pattern)
-- **Card:** `background:var(--card); border-radius:12px; overflow:hidden; margin-bottom:18px; box-shadow:0 1px 2px rgba(0,0,0,.05)` — **borderless**, floats on the `--grouped` page (the tonal step reads as "grouped", not a border).
-- **Row:** `flex; align-items:center; gap:12px; padding:11px 16px; min-height:46px`.
-- **Leading icon tile** (signature chip): `29×29; radius:7px; background:<category color>; shadow:0 1px 2px rgba(0,0,0,.25)`, centered `17×17` **white** glyph.
-- **Hairline:** `0.5px; background:var(--sep); margin-left:16px`, **only when not last** (inset to row padding, not past the tile).
-- **Row variants** (one container, trailing swaps): `isNav` value+chevron · **`isToggle` switch 47×29 r15, knob 25×25, ON `#30d158`** · `isSeg` **track `--fill` r9, selected = raised `--card` white pill + shadow (NOT a tint fill)** · `isSlider` · `isAccent` 26×26 circles · `isBignum` 44/700 tint.
-
-### 1.5 Other reusable patterns
-- **Search field:** `--fill` pill, radius ~10–12, leading search glyph `15×15 --label2` + placeholder. (Safari swaps for a centered URL pill `h38 r11`.)
-- **Sheet + detents (§3.3):** rounded-top `20px`, **SOLID `--elev` — never glass**, grabber `36×5 r2.5 --label3` top-center, dimmed scrim, medium/large detents.
-- **Segmented:** track `--fill r9 pad2`, option `14/500 r7 pad7×4`, selected = raised white `--card` pill + shadow.
-- **Switch:** `47×29 r15`, knob `25×25` white, ON `#30d158` / OFF `--fill2`.
-- **Buttons:** filled/prominent `--tint` bg + white 600 · tinted/plain `--tint` text · icon FAB `30×30` circle `--tint`.
-- **Large-title collapse:** at rest 32/800; on scroll → centered inline 22/700 inside the 46px nav, which gains glass + .5px hairline.
-- **Empty state:** centered column, `--label2` 15px, `padding:70px 20px`, "No Items".
-
-### 1.6 Golden Liquid-Glass rules
-1. **Glass = navigation/chrome layer ONLY** (status/nav/tab/toolbar/sidebar/menu/dock). `--glass-bg` + `backdrop-filter:blur(26px) saturate(180%)` + `--glass-stroke` outer + `--glass-hi` inner.
-2. **Never glass on content** — cards, rows, bubbles, sheets, list tiles = **solid**. Content scrolls *under* chrome; it never *is* glass.
-3. **Never glass-on-glass.** One glass plane at a time; a menu over a glass bar renders on solid `--elev`.
-4. **Text always on solid** (card/row/bubble, or the glass's own tinted fill) — never on raw wallpaper blur.
-5. **Tint primary/interactive only** — nav buttons, links, selected tab/segment, send FAB, big-stat. Semantic system colors (green switch, red destructive) are separate from the user tint.
-
-*Under Reduce Transparency all glass collapses to solid (blur 0, highlight off) — layout must stay correct with zero glass.*
-
----
-
-## 2. Parity scoreboard
-
-15 slice groups · **121 divergences** (15 high · 43 med · 63 low) · **77 steps**. `_ref` = mock screen compared.
-
-| # | Slice | Surface | Parity | H / M / L | ref |
-|---|---|---|---|---|---|
-| 1 | `shell-settings-primitives` | Settings grouped-list primitives | ✅ close | 2 / 6 / 4 | Settings.dc.html |
-| 2 | `os-settings-sections` | Settings index + section detail | ✅ close | 1 / 2 / 5 | Settings.dc.html |
-| 3 | `appshell-shell-frame` | iOS frame: nav bar · home indicator · switcher | ✅ close | 0 / 3 / 6 | MobileShell.dc.html |
-| 4 | `appshell-springboard` | Home: grid · dock · page dots · library | ✅ close | 0 / 1 / 5 | Springboard.dc.html |
-| 5 | `appshell-system-surfaces` | Control/Notification Center · Island · Spotlight | ✅ close | 1 / 3 / 4 | MobileShell.dc.html |
-| 6 | `appshell-widgets` | Today page + widget picker | ✅ close | 1 / 2 / 5 | Springboard.dc.html |
-| 7 | `files-manager` | Files: grid/list · toolbar · sidebar | ⚠️ diverges | 2 / 4 / 4 | Files.dc.html |
-| 8 | `system-monitor` | Monitor: nav + gauges/table | ✅ close | 1 / 2 / 5 | MobileShell.dc.html (shared app chrome) |
-| 9 | `app-store` | App Store: header · search · grid | ⚠️ diverges | 1 / 3 / 3 | MobileShell.dc.html (shared app chrome) |
-| 10 | `browser` | Safari chrome: address bar · tabs | ⚠️ diverges | 3 / 3 / 3 | Safari.dc.html |
-| 11 | `assistant` | Alfa chat: bubbles · composer | ✅ close | 1 / 6 / 5 | Messages.dc.html |
-| 12 | `os-terminal` | Terminal: nav · safe-area · font | ✅ close | 0 / 0 / 5 | MobileShell.dc.html (shared app chrome) |
-| 13 | `code-editor` | Editor: toolbar · tabs · status | ⚠️ diverges | 1 / 3 / 2 | Notes.dc.html |
-| 14 | `media-viewer-picker` | Media: now-playing · lightbox · picker | ✅ close | 1 / 2 / 4 | Photos.dc.html + Music.dc.html |
-| 15 | `editors-misc` | Editors + create-app + auth | ✅ close | 0 / 3 / 3 | shared chrome + Sandbox.dc.html |
-
-**Read:** *close* = skeleton is iOS-accurate, gaps are metric/token-level. *diverges* = a real idiom
-gap (no iOS code path yet, or a desktop-dense layout on a phone). The 4 *diverges* slices
-(files-manager, app-store, browser, code-editor) share one root cause: **no `useActiveShell()` seam
-exists in them yet** — adding it is step 1 for each.
-
----
-
-## 3. Cross-cutting systemic fixes (do these ONCE, they pay off everywhere)
-
-Three issues recur across many slices. Fixing them at the shared layer (iOS-scoped) is higher-leverage
-than per-slice patches — **do them before the per-slice passes**.
-
-### S1 — iOS-scope the shared `Switch` + `Segmented` controls `[HIGH]`
-`components/ui/switch.tsx` ON = `bg-primary` (user accent); `components/ui/segmented.tsx` selected =
-`bg-primary text-primary-foreground` (tint-filled pill). iOS wants **switch ON = system green
-`#30d158`** and **segmented selected = raised *white* `--card` pill on a `--fill` track** (Golden
-Rule 5: tint is not a fill). **This is a correctness boundary, not cosmetics** — Android (Material)
-and Windows (Fluent) *want* accent-colored controls, so a global retune would **regress them**. Fix
-via `[data-shell="ios"]` CSS + inert `data-slot`/`data-selected` attrs on the primitives (render-inert
-for all shells). Unblocks shell-settings, create-app, app-store, media-picker, editors-misc at once.
-
-### S2 — Fix the Reduce-Transparency glass bypass `[HIGH]`
-Control Center (`backdrop-blur-xl`), Notification Center (inline `blur(28px)`), Dynamic Island
-(`backdrop-blur`), browser chrome, and code-editor panels all use **fixed Tailwind/inline blur** that
-**bypasses `var(--blur)`** — so glass never collapses when the user enables Reduce Transparency (an
-a11y content-behavior, SSOT §1.7). Swap each to the repo `.glass` helper (which reads `var(--blur)`
-and `.reduce-glass` already zeroes). ~1 line each; neutral-positive for Android CC, so no branch needed.
-
-### S3 — Add the missing liquid-glass tokens `[MED]`
-The mock's glass has an **inner top highlight + outer hairline** we don't model: add `--glass-hi` +
-`--glass-stroke` (light/dark) and a `--grouped` page token (`#f2f2f7` / `#000`). Then an iOS-scoped
-`[data-shell="ios"] .glass{ box-shadow:inset 0 .5px 0 var(--glass-hi); border-color:var(--glass-stroke) }`
-(or opt-in `.glass-ios`) gives CC/NC/Spotlight/dock/nav the real liquid-glass edge. Additive tokens;
-base `.glass` untouched. **Caveat:** Control Center's shadcn Sheet portals to `<body>` (outside
-`[data-shell]`), so apply the edge class directly under the `id==='ios'` gate, not via a descendant selector.
-
----
-
-## 4. Per-slice parity detail
-
-Grouped by execution phase (see §5). Each slice: surface · divergence table (severity · aspect ·
-mock→ours) · numbered steps with files + LOC · the android/windows/dashboard guard · essence/skips.
-
-
-### ▸ Phase 1 — Settings
-
-#### 1. `shell-settings-primitives` — parity: **close** · ref: Settings.dc.html
-**Surface:** iOS Settings grouped-list body (the shared cards/rows every Settings section renders inside the iOS mobile shell's MasterDetail stack). Chrome/nav is out of scope — these are the content primitives: Section, Row/ValueRow, Block, ActionRow, AppearancePanel, AccentSwatches, plus the shared Segmented/Switch they consume.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | Segmented selected-option fill | iOS raised WHITE pill: selected option = --card/white fill + shadow, LABEL STAYS label-colored on the --fill gray track (Golden Rule 5: tint is not a fill). | components/ui/segmented.tsx selected = `bg-primary text-primary-foreground shadow-sm` — a solid accent-tinted pill with white text. |
-| HIGH | Switch ON color | iOS switch ON track = SYSTEM GREEN #30d158 (semantic, NOT the user tint); OFF = --fill2. SSOT Golden Rule 5 calls this out explicitly. | components/ui/switch.tsx ON = `bg-primary` (the user accent), OFF = `bg-muted-foreground/40`. |
-| MED | Row primary label typography | Callout / row label = 16px / weight 500 / var(--label). | row.tsx SettingsRow + ValueRow label = `text-sm` (14px) / weight 400 / text-foreground. |
-| MED | Switch dimensions | 47x29 track (r15), knob 25x25 white, shadow 0 1px 3px. | h-5 w-9 = 36x20 track, knob size-4 = 16px — visibly smaller than the iOS control. |
-| MED | Segmented track + option style | Track = --fill (systemFill gray), r9, pad2, NO border; option = 14px/500, r7, pad 7x4. | Track = `bg-secondary` + `border border-border`, rounded-lg; option = `text-xs font-semibold` (12px/600), rounded-md, px-2.5 py-1. |
-| MED | Grouped-card treatment | Borderless card: `background:var(--card); box-shadow:0 1px 2px rgba(0,0,0,.05)` floating on a distinct --grouped page (#f2f2f7 light / #000 dark). The grouped/card tonal step is what reads as 'grouped'. | section.tsx card = `rounded-xl border bg-card` (1px hairline border, no shadow) on the same-tone pane — there is no --grouped pane bg, so the border substitutes for the missing tonal step. |
-| MED | Section header | Group header = TEXT-ONLY uppercase 13px/600 var(--label2); iOS Settings often omits it entirely and uses a footnote instead. | section.tsx header always renders a leading lucide ICON + `text-[11px]` uppercase muted — icon is not an iOS group-header element, and 11px is under the 13px spec. |
-| MED | Read-only value text | Row value (trailing) = 15px / 400 / var(--label2). | row.tsx SettingsValueRow value = `text-[13px] text-muted-foreground` (13px). |
-| LOW | Row hairline divider | 0.5px hairline, color var(--sep) (~rgba(60,60,67,.16)), margin-left 16px, only when notLast. | row.tsx/block.tsx/action-row.tsx `after:h-px` (1px) `after:bg-border/60` = --sep at 60% ≈ rgba(0,0,0,.06) — thicker line but fainter alpha than iOS; inset 16px + last:hidden already match. |
-| LOW | Footnote | 12.5px var(--label2), padding 0 16px (aligns under card content), margin -8px 0 18px, line-height 1.42. | section.tsx footnote = `px-1 text-[11px]` (11px, inset only 4px — sits left of the card content edge). |
-| LOW | Accent swatch | 26x26 circles, gap 13px, selected = ring box-shadow + scale-up transform, NO check glyph. | accent-swatches.tsx 32px (sm:28px) circles, gap-2.5 (10px), selected = `ring-2 ring-ring ring-offset-2` + a white Check glyph (a11y-forward, but not the iOS scale/ring look). |
-| LOW | Card corner radius | Grouped inset card = 12px. | `rounded-xl` resolves to --radius-xl = --radius(10px)+4 = 14px. |
-
-**Steps:**
-1. FOUNDATION — establish the iOS-scope seam. Add inert, brand-free `data-slot` hooks to each primitive so app-level CSS can target them ONLY under [data-shell=ios]: `settings-card` on section.tsx's card div; `settings-section-title` + `settings-footnote` on its header/footnote; `settings-row` + `settings-row-label` on both rows in row.tsx; `settings-value` on the ValueRow value; `settings-hairline` is the shared `after:` pseudo (target via the row/block/action-row data-slots). No className/behavior change — attributes are render-inert. Then open one iOS CSS block under the existing `[data-shell="ios"]` seam. — `/home/rahman/projects/mso/frontend/slices/shell-settings/components/section.tsx, row.tsx, block.tsx, action-row.tsx; new iOS rules in /home/rahman/projects/mso/app/globals.css (under the existing [data-shell="ios"] region ~L251)` *(~6 attr additions + ~4 lines CSS scaffold)*
-2. TYPOGRAPHY — in the iOS-scoped block: `[data-shell="ios"] [data-slot="settings-row-label"]{font-size:16px;font-weight:500}`; `[data-slot="settings-value"]{font-size:15px}`; `[data-slot="settings-section-title"]{font-size:13px;font-weight:600}`; `[data-slot="settings-footnote"]{font-size:12.5px;padding-left:16px;padding-right:16px;line-height:1.42}`. Colors reference existing --label2/muted tokens; sizes are px in scoped CSS (the tokens-not-hex rule governs colors, not sizes). Fixes row-label, value, section-title, footnote in one pass. — `/home/rahman/projects/mso/app/globals.css` *(~8 lines CSS, 0 tsx)*
-3. SEGMENTED iOS variant — the biggest visible mismatch. Add a `data-slot="segmented"` (root) + `data-slot="segmented-option"` + `data-selected` attr to components/ui/segmented.tsx (inert for all shells). Then iOS-scope: track → `background:var(--fill);border:0;border-radius:9px`; option → `font-size:14px;font-weight:500`; selected option → `background:var(--card);color:var(--label);box-shadow:0 1px 3px rgba(0,0,0,.12)` and OVERRIDE the accent-fill (`background:var(--card)!important` on the selected pill). This turns the tinted pill into the iOS raised-white pill ONLY on iOS. — `/home/rahman/projects/mso/components/ui/segmented.tsx (add data-slot/data-selected, ~3 lines) + /home/rahman/projects/mso/app/globals.css (~6 lines)` *(~9 lines total)*
-4. SWITCH iOS variant — Switch already has role=switch. iOS-scope on `[data-shell="ios"] [role="switch"]` used inside settings: dimensions `width:47px;height:29px`; knob (the inner span) `width:25px;height:25px` with ON translate to `translateX(20px)`; ON track color → system green `#30d158` (a FIXED semantic category color, the accepted hex exception), OFF → var(--fill2). Scope keeps Android(Material)/Windows(Fluent) accent-colored switches untouched — global retune would regress them, so iOS-scope is the correctness boundary here, not just cosmetics. — `/home/rahman/projects/mso/components/ui/switch.tsx (add a stable data-slot on the knob span so the scoped rule can size it, ~1 line) + /home/rahman/projects/mso/app/globals.css (~7 lines)` *(~8 lines total)*
-5. CARD borderless + grouped pane (most invasive; can be deferred/accepted). iOS-scope: `[data-shell="ios"] [data-slot="settings-card"]{border-color:transparent;border-radius:12px;box-shadow:0 1px 2px rgba(0,0,0,.05)}` AND give the pane a --grouped step so the borderless card still reads: add `--grouped` under [data-shell="ios"] (light #f2f2f7, dark #000) and paint the SectionDetail scroll container with it (add a `data-slot="settings-pane"` hook in the CONSUMER's sections.tsx). CAVEAT: verify dark-mode card (--card/--window-bg ≈ #1c1c1e) keeps contrast against a #000 grouped bg before shipping — if it collapses, keep dark grouped at #1c1c1e/elev instead of pure black. — `/home/rahman/projects/mso/frontend/slices/shell-settings/components/section.tsx (data-slot already added in step 1) + /home/rahman/projects/mso/frontend/slices/os-settings/components/sections.tsx (1 data-slot on the pane div) + /home/rahman/projects/mso/app/globals.css (~6 lines + --grouped token)` *(~9 lines total; verify dark contrast)*
-6. HAIRLINE — iOS-scope the shared row/block/action-row divider to the iOS spec: `[data-shell="ios"] [data-slot="settings-row"]::after, ...::after{background:var(--sep);height:1px;transform:scaleY(.5);transform-origin:bottom}` (0.5px hairline at the --sep alpha, replacing the fainter border/60). Inset 16px + last-hidden already match, so only thickness+color change. — `/home/rahman/projects/mso/app/globals.css` *(~3 lines CSS)*
-7. ACCENT SWATCHES — iOS-scope size/gap and swap the selected indicator to the iOS look WITHOUT touching the shared markup: `[data-shell="ios"] [data-slot="accent-swatch"]{width:26px;height:26px}` and container `gap:13px`; on selected, prefer scale+ring over the check (either hide the Check via `[data-shell="ios"] [data-slot="accent-swatch"] svg{display:none}` + `[aria-pressed="true"]{transform:scale(1.12);box-shadow:0 0 0 2px var(--card),0 0 0 4px currentColor}`). Add `data-slot="accent-swatch"` to accent-swatches.tsx (inert). LOWEST priority — the check is a defensible a11y win, so this step is optional. — `/home/rahman/projects/mso/frontend/slices/shell-settings/components/accent-swatches.tsx (1 data-slot) + /home/rahman/projects/mso/app/globals.css (~4 lines)` *(~5 lines total; optional)*
-8. SECTION-HEADER icon — DECISION step, no code unless chosen. iOS group headers are text-only. Either (a) ACCEPT the leading icon as a cockpit affordance (recommended — it aids scannability across many sections and costs nothing), or (b) iOS-hide it: `[data-shell="ios"] [data-slot="settings-section-title"] > span:first-child{display:none}`. Do NOT branch the primitive on shell in TSX — that would shell-couple a portable slice (violates the rr-lift portability guard). — `/home/rahman/projects/mso/app/globals.css (only if option b)` *(~2 lines if chosen, else 0)*
-9. ACCEPT / SKIP (document, do not build): (1) ActionRow default color stays --info (#0060df) not the user --tint, and destructive stays --destructive-text (#d70015) not raw #ff453a — both are the documented AA-contrast decisions in action-row.tsx and are MORE correct than the sub-AA iOS tint-as-text; keep. (2) SettingsBlock has no iOS mock analog — it's a legitimate freeform-content affordance; keep. (3) Responsive flex-col stacking of control-under-label on narrow diverges from iOS-always-inline but prevents segmented overflow in a resizable cockpit window; keep. (4) ActionRow label 14px→16px is a trivial add-on to step 2 if desired (`[data-slot="settings-action"]{font-size:16px}`). — `n/a (no-op / rationale record)` *(0)*
-
-**Guard (android/windows/dashboard):** The primitives are shared VERBATIM by all five shells — os-settings/app.tsx uses useActiveShell() only to swap NAV CHROME (mobile=stack / macos=sidebar / windows+dashboard=tabs), while sections.tsx renders ONE SectionBody (these primitives) for every shell. So the seam is NOT a TSX branch — it is the already-live `[data-shell=\"ios\"]` CSS scope (globals.css L251; desktop.tsx L69 stamps data-shell on #main-content, an ancestor of the settings app on the iOS surface — verified it wraps MobileShell). ALL iOS pixel/color deltas live in `[data-shell=\"ios\"] …` rules in globals.css. android/windows/dashboard/macos stay byte-unchanged because: (1) they never match the `[data-shell=\"ios\"]` selector, so zero computed-style delta; (2) the only .tsx edits are additive `data-slot`/`data-selected` attributes that are render-inert — no non-iOS shell reads, styles, or branches on them, so their layout/behavior/logic is identical (the DOM string gains a neutral attribute, nothing they depend on changes). Crucially, Switch/Segmented iOS-scoping is REQUIRED (not optional): Android(Material) and Windows(Fluent) want accent-colored switches/segments, so a global retune to iOS green/white-pill would REGRESS them — the iOS scope is the correctness boundary. And per the rr-lift portability guard (MEMORY), the primitives stay brand/shell-free: no useActiveShell import lands in the slice; divergence lives in app CSS, so the slice remains lift-ready.
-
-**Essence / skips:** VPS-essence: CLEAN — these are pure appearance primitives. No hardware is fabricated (no wifi/battery/cellular/clock/signal anywhere in scope; AppearancePanel exposes only real settings: style/theme/accent/wallpaper/reduceTransparency/shell/device). The file-explorer DATA layer and lib/host.ts are untouched — Settings never routes host-I/O. reduceTransparency is already wired (matches SSOT §1.7 a11y content-behavior). MSO rules respected: no new deps (all deltas are CSS + inert attrs), shadcn primitives kept, files stay <200 lines, cross-slice imports stay barrel-only (@/features/*), and the one raw hex introduced (#30d158 switch-ON, and #f2f2f7/#000 grouped) falls under the accepted 'fixed category color' exception — every other color references existing tokens (--fill, --sep, --card, --label2). DELIBERATE SKIPS (mock patterns that don't fit a settings cockpit or belong to chrome, not these primitives): iOS colored 29x29 leading icon TILES on rows (the mock's DETAIL rows lack them too — only the sidebar category list has them, which is nav.tsx, out of scope); large-title collapse §3.9 (chrome — SectionDetail already paints the 26px iPhone title); sheet/detents §3.3 and slider row §1.1-isSlider (not rendered by any of these six files). Also skipped by choice: forcing the user --tint as ActionRow text (kept --info for AA) and dropping the accent Check glyph (kept as an a11y-over-parity win) — both documented in-file, both defensible departures from a sub-AA iOS behavior.
-
-#### 2. `os-settings-sections` — parity: **close** · ref: Settings.dc.html
-**Surface:** iOS Settings on the mobile shell, two surfaces: (1) the grouped section INDEX = SectionList (master) — colored 29x29 icon-tile rows in rounded cards, chevron, hairlines; (2) the section DETAIL = SectionDetail phone branch — a large title over the shared grouped-card body (SettingsSection/Row/ValueRow/ActionRow). Note: the iOS nav bar, back button, glass, and large-title collapse-on-scroll are owned by MasterDetail + os-shell chrome, NOT this slice — this slice only paints the at-rest title + list/cards.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | phone detail large-title (SectionDetail isPhone h1) | font-size:32px; font-weight:800; letter-spacing:-.02em; padding:0 4px 14px (SSOT §1.4 Large Title 32/800, §3.9 phone at-rest 32/800) | text-[26px] font-bold (700) leading-none tracking-tight, px-1 pt-1 — undersized and under-weight vs the iconic iOS large title |
-| MED | section-index hairline inset (SectionList divider) | height:.5px; background:var(--sep); margin-left:16px — inset = row padding only, SSOT §3.1 says 'deliberately NOT inset past the icon tile'; the app's own SettingsRow body dividers already use left-4 (16px) | after:left-[3.5rem] (56px) after:h-px (1px) bg-border/60 — inset PAST the 29px icon, contradicting the SSOT and inconsistent with the body rows |
-| MED | section-index row height + vertical padding (SectionList button) | padding:11px 16px; min-height:46px (guaranteed 46px touch row) | px-4 py-2.5 (10px) with NO min-height — rows collapse to ~40px, shorter than the 46px iOS row |
-| LOW | section-index card treatment + gap (SectionList card) | border-radius:12px; NO border; box-shadow:0 1px 2px rgba(0,0,0,.05); margin-bottom:18px between cards on --grouped bg | rounded-xl (12px OK) but border border-border/70 + shadow-sm (mock has shadow, no border); space-y-6 (24px) card gap vs 18px; bg-muted/25 approximates --grouped |
-| LOW | section-index chevron (SectionList) | #g-chevron-right 15x15, color var(--label3) (tertiaryLabel .3) | ChevronRight size-[18px] text-muted-foreground/45 — oversized and slightly heavier tint |
-| LOW | sticky selection highlight in the push list (SectionList) | iOS nav-stack index shows a momentary tap highlight then drills; no persistent selected row | active row keeps bg-accent (on ? 'bg-accent') — a sticky master-selection look, more split-view than iOS push-stack |
-| LOW | per-card uppercase caption in detail (SettingsSection header) | the Settings DETAIL screen renders NO per-card uppercase header — just the nav title + cards separated by 18px, with footnotes between (verified: no .upper/text-transform in Settings.dc.html) | SettingsSection draws an icon + 11px uppercase caption above every card (macOS-ish sub-headers); denser than this mock screen but valid iOS grouped-list pattern |
-| LOW | shared grouped-card body metrics (SettingsSection/Row/ValueRow — SHARED primitive) | card shadow not border; section header 13px; footnote 12.5px inset 16px lh1.42; trailing value 15px var(--label2); hairline .5px | border not shadow; header 11px; footnote 11px at px-1; value text-[13px]; hairline 1px — all close but a few px off |
-
-**Steps:**
-1. iOS large title: in SectionDetail, read `id` from the already-imported useActiveShell(); when id==='ios' render the title at text-[32px] font-extrabold tracking-[-0.02em] with pb ~14px; keep the current text-[26px] font-bold as the else (android/mobile) branch. Type-only, no color/token change. Highest-value single iOS fidelity fix. — `slices/os-settings/components/sections.tsx` *(~8 LOC (add `id` to the destructure, one ternary on the h1 className))*
-2. iOS index hairline: in SectionList compute isIos = useActiveShell().id==='ios'; for iOS swap the divider class after:left-[3.5rem] -> after:left-4 (16px, matches SSOT + the body SettingsRow dividers) and after:h-px -> after:h-[0.5px]. Leave the 56px inset as the android/default branch. (Flag for the human: real iOS insets past the icon, but the SSOT + our own body rows use 16px — pick per taste.) — `slices/os-settings/components/sections.tsx` *(~5 LOC (read id, conditional divider class))*
-3. iOS index row height: for id==='ios' add min-h-[46px] and change py-2.5 -> py-[11px] on the SectionList row button, so index rows match the 46px/11px iOS row; android keeps py-2.5. — `slices/os-settings/components/sections.tsx` *(~3 LOC (fold into the same isIos conditional))*
-4. iOS index chrome polish (optional, low): for id==='ios' set chevron size-[15px] text-muted-foreground/40, make the card borderless with border-transparent shadow-[0_1px_2px_rgba(0,0,0,0.05)] (fixed-shadow rgba is an accepted raw-value exception, like the icon-tile shadow already in this file), and tighten card gap space-y-6 -> space-y-[18px]. All behind the same isIos flag. — `slices/os-settings/components/sections.tsx` *(~8 LOC)*
-
-**Guard (android/windows/dashboard):** SEAM = useActiveShell().id (already imported in app.tsx; add the same read in sections.tsx, which today reads only `surface`). The root cause of the parity gap is that the whole mobile path branches on surface==='mobile', so iOS and Android render byte-identically. Every step adds an `id === 'ios'` conditional and leaves the existing branch as the untouched else. Result: (1) ANDROID (id 'android', surface 'mobile') falls through to today's exact markup — byte-unchanged. (2) WINDOWS + DASHBOARD (surface 'desktop' -> 'tabs' layout) never enter SectionList or the isPhone branch at all — untouched; their nav.tsx SettingsTabs is not edited. (3) macOS ('sidebar') is also desktop — untouched; SettingsSidebar not edited. All four edits stay inside ONE file (sections.tsx, 145 -> ~170 LOC, under 200). NO shared primitive is touched: SettingsSection/Row/ValueRow/ActionRow/Block in the shell-settings slice render the SAME body in every shell, so they are deliberately left alone — editing them would change android/windows/dashboard/macOS Settings bodies too. That is why the low-severity shared-primitive metric gaps (footnote 12.5 vs 11px, value 15 vs 13px, header 13 vs 11px, card border vs shadow, .5px hairline) are intentionally NOT in the steps. No new deps; shadcn/lucide + theme tokens only; fixed rgba shadows are the same accepted raw-value exception already present; barrel imports (@/features/os-shell, @/features/shell-settings) unchanged.
-
-**Essence / skips:** VPS-ESSENCE — all correct, no work proposed: the slice deliberately drops every fabricated-hardware category the mock ships (Wi-Fi, Bluetooth, Network, Sound, Screen Time, Battery, Display & Brightness) and their row variants (isNet with wifi/lock/check glyphs, isSlider for volume/brightness, isBignum battery %), substituting real cockpit domains (Appearance, Theme, AI, Quicklinks, Devices, Server, Browser, About). The proposed steps are pure typography/spacing on existing REAL rows — they invent no hardware. No file-explorer DATA layer or lib/host.ts is touched: About/Server/Browser read host stats through the existing useOsApi seam and stay honest (About footnotes 'Sample data' on mock target; Browser is read-only status). DELIBERATE SKIPS (keep as-is): (a) the mock's sidebar Search pill — omitted because 8 sections don't warrant it and a dead field is a fake affordance (documented in-code); (b) the mock's 32/800 root 'Settings' title in the index — omitted because the shell app-chrome already paints it (avoids a double title); (c) large-title collapse-on-scroll (§3.9) — owned by MasterDetail + os-shell chrome, not this slice, so out of scope here; (d) Switch (47x29 r15 knob 25x25 green ON) and Segmented (r9 track / r7 option) exact metrics — these are shared shadcn primitives consumed by every shell; matching the iOS numbers there would leak into android/windows/dashboard, so left untouched; (e) the mock's isAccent 26x26 swatch row has no 1:1 here because accent is folded into the Theme presets picker — an IA choice, not a fabrication gap. PARITY VERDICT 'close': icon tiles (29x29 r7 + 0_1px_2px shadow, 17px white glyph), 16px body-row hairline inset, 46px body rows, 12px card radius, and grouped-card structure already MATCH the SSOT; the residual gaps are metric-level (title 26 vs 32, index hairline/height, chevron size) plus the intentional content substitution above.
-
-### ▸ Phase 2 — Shell chrome
-
-#### 3. `appshell-shell-frame` — parity: **close** · ref: MobileShell.dc.html
-**Surface:** iOS shell frame — notch/safe-area reservation (--sai-top floored to 44px) + in-app TOP nav bar (frost-on-scroll) + bottom home-indicator pill + the app switcher (card carousel). Files: features/appshell/components/mobile-shell.tsx (nav header L205-220), mobile-switcher.tsx, home-indicator.tsx.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| MED | nav-title alignment + weight | Phone nav bar CENTERS the title (leading/trailing are position:absolute), 16px/600 var(--label); opacity fades on scroll (large-title collapse, SSOT 3.9). | Title is `<strong className="flex-1 truncate text-base">` — LEFT-aligned (flex-1 pushes it left), weight ~700 (Tailwind preflight `strong{font-weight:bolder}`), not 600. |
-| MED | leading app icon in nav (non-iOS) | iOS nav-bar leading slot is a TINT TEXT button (Back/Home) or empty — the app's OWN icon never appears in its nav bar (SSOT 2.4: 'leading/trailing tint text buttons'). | Renders a 30px <AppIcon> as the leading nav element (identity affordance for a multi-app cockpit) — which is also what forces the title off-center. |
-| MED | exit affordance: Done vs iOS back/gesture | No 'Done'. Leading Back pops the in-app nav stack; trailing = share glyph + per-app action (compose/trash/plus, tint). App is dismissed by the home-indicator gesture, not a button. | Fixed trailing 'Done' text button (tint, h-11 = 44pt) dismisses the whole app to home; no in-app back/nav-stack, no per-app trailing actions. Defensible as a PWA exit control (the OS home gesture is suppressed) but diverges from the mock. |
-| LOW | in-app status bar + Dynamic Island (VPS-essence skip) | Draws a 44px in-app status bar (time 15/600, wifi 17x17, battery 24x12 r3 @72% fill) + a 118x33 r20 #000 Dynamic Island, on EVERY app surface (MobileShell.dc.html L26-30). | Reserves the 44px notch zone (--sai-top floored to 2.75rem) but paints NOTHING in it — no clock/wifi/battery, no island. Intentional (mobile-home.tsx L86 'no status clock — not useful in a VPS cockpit'). |
-| LOW | in-app floating tab bar | Files renders a floating glass tab pill at bottom:26 (Recents/Shared/Browse) — --glass-bg + blur(26) saturate 180% + stroke + inset-hi + shadow, r26, selected=--tint (MobileShell.dc.html L37-41, driven by files/slice.js tabItems). | Shell frame renders no tab bar; app-internal navigation lives INSIDE WindowContent. There is no shell->app tab contract. Not-applicable at the generic frame layer. |
-| LOW | nav glass recipe / token | Chrome glass = blur(26px) saturate(180%) on --glass-bg; collapses to solid under Reduce Transparency (SSOT 1.5/1.7). | Frost-on-scroll is correct (transparent at rest -> glass + .5px hairline on appScrolled>4), but uses Tailwind `backdrop-blur-xl` (24px, NO saturate) on --glass-bar, ignoring the shell --blur token (30px) and the `.glass` helper that already honours .reduce-glass (blur->0). |
-| LOW | nav content height | Phone nav = 46px (config.js chrome.phoneNav) below the 44px status bar. | 3rem (48px) content band (height calc(3rem + var(--sai-top)), paddingTop var(--sai-top)). 2px tall; top-chrome total ~92 vs mock 90 — trivial. |
-| LOW | app switcher (already matches / exceeds mock) | MobileShell.dc.html implements NO app switcher at all (single-app springboard model). | Full iOS card-carousel: `glass bg-black/55` dimmed backdrop, cards h-66% x w-74% max-300, [scroll-snap], swipe-UP-to-close, Close All, tap-backdrop->home. WindowPreview tile is STATIC metadata (icon+title+subline) — deliberate perf choice (AUDIT-2026-06-11, avoids double-mounting live PTY/screencast). iOS-accurate; no mock to diverge from. Optional polish only: iOS shows an app-name chip ABOVE each card. |
-| LOW | home-indicator pill (already matches / exceeds mock) | Static homeIndStyle pill only (no JS gestures in the .dc file). | 134x5 rounded-full, light rgba(255,255,255,.75) / dark rgba(0,0,0,.3), in a ~34px reserved zone (--sai-bottom +34px in-app). Adds a full pointer gesture model (tap=switcher, quick swipe-up=home, hold=switcher, left/right=cycle apps) with pointer-capture — EXCEEDS the static mock. No work. |
-
-**Steps:**
-1. PRIMARY. Extract the in-app nav header (mobile-shell.tsx L205-220) into a new iOS-only sibling component (mobile-app-nav.tsx) and rebuild it iOS-style: CENTER the title (single-line truncate, 16px, font-weight 600 via font-semibold on a <span> — drop <strong> so it isn't 700), position the trailing 'Done' absolutely (keep h-11/44pt, ghost, text-primary), and DECIDE the leading app icon — either drop it (iOS-pure: leading empty/optional tint text) OR keep it as a small ABSOLUTE leading glyph that no longer shifts the centered title. Extraction also pulls mobile-shell.tsx back under the <=200-line gate (currently 245). — `new features/appshell/components/mobile-app-nav.tsx (imported ONLY by mobile-shell.tsx) + edit mobile-shell.tsx nav block; mirror to mso/frontend/slices/appshell/components/` *(~55-70 new / ~-14 in mobile-shell)*
-2. Align the nav frost to the SSOT glass recipe: swap Tailwind `backdrop-blur-xl` for the shell `.glass` helper (blur(var(--blur)) saturate(180%), which .reduce-glass already zeroes), keeping the transparent-at-rest -> frost-on-scroll toggle (apply `.glass` + bg-[var(--glass-bar)] + border-b hairline ONLY when appScrolled). Fixes the missing saturate + the ignored --blur token, and makes Reduce-Transparency collapse the bar correctly. — `mobile-app-nav.tsx (or mobile-shell.tsx L208 if not extracted)` *(~3-5)*
-3. Cosmetic: set the nav content band to 46px (2.875rem) to match SSOT/config.js chrome.phoneNav, instead of 3rem/48px. — `mobile-app-nav.tsx / mobile-shell.tsx L210` *(~1)*
-4. OPTIONAL low: add the iOS app-name+icon chip ABOVE each switcher card (real iOS labels the card above the snapshot). WindowPreview already carries icon+title; a thin chip header completes the look without touching the data layer. — `mobile-switcher.tsx SwitcherCard (+ optionally window-preview.tsx tile)` *(~8-12)*
-
-**Guard (android/windows/dashboard):** MobileShell is the `render:` for EXACTLY ONE ShellDescriptor — id:\"ios\" (desktop.tsx:211 `registerShell({id:\"ios\", render: MobileShell})`). The other four personas render entirely separate components: Android=AndroidShell (shells/android/android-shell.tsx + its own android-parts.tsx NavBar/Recents), Windows=WindowsShell, Dashboard=DashboardShell, macOS=DesktopChrome. Verified by grep: NONE of them import mobile-shell.tsx / mobile-switcher.tsx / home-indicator.tsx, and HomeIndicator + MobileSwitcher are imported ONLY by MobileShell. So the registry `render:` field IS the seam — these three files are already surface-partitioned iOS-only modules; no useActiveShell() branch is even needed inside them, and android/windows/dashboard stay byte-identical because they never reference these modules. GUARD RULES for the steps: (1) the new mobile-app-nav.tsx must be imported ONLY by mobile-shell.tsx; (2) edits stay in component JSX/markup — do NOT touch hooks/use-swipe-close.ts (useSwipeUpClose is SHARED with Android recents), use-shell.ts, or lib/store, so Android's swipe-to-close and the shared window store stay identical.
-
-**Essence / skips:** VPS-essence HARD SKIPS (do NOT build, even though the mock does): the in-app status bar (clock 15/600, wifi glyph, battery glyph) and the Dynamic Island black pill = fabricated hardware (clock/wifi/battery/notch). This is already an established decision (mobile-home.tsx L86); we reserve the notch zone via --sai-top but paint nothing. File-explorer DATA layer is untouched — every step is pure presentation on the shell frame + switcher; none go near lib/host.ts or the Files data path (the switcher's WindowPreview tile is intentionally STATIC metadata, not a live mount). DELIBERATELY SKIPPED mock patterns: (a) the Files floating tab bar — app-internal navigation belongs to WindowContent; the generic shell frame has no per-app tab contract; (b) per-app nav trailing actions (share/compose/trash) — would need a cross-app nav-action contract, and mso apps already surface actions in their own in-content toolbars, so it is out of scope for the shell frame. MSO rules honoured by the steps: shadcn <Button> reused (no raw controls); theme tokens only (--glass-bar, --blur, text-foreground/primary) — the home-indicator pill's rgba white/black is a pre-existing fixed-element value (accepted like the fixed-category-color exception), not introduced here; the <=200-line gate is CURRENTLY BREACHED (mobile-shell.tsx = 245 LOC) and Step 1's extraction fixes it rather than worsening it; no new deps; intra-slice relative imports only (no cross-slice barrel needed). Overall parity is 'close' — the frame skeleton (frost-on-scroll nav, gesture-complete 134x5 home pill, glass card switcher that EXCEEDS the static mock) is iOS-accurate; the only genuine action items are the nav-title centering/weight (+icon decision) and the minor glass-recipe/height polish.
-
-#### 4. `appshell-springboard` — parity: **close** · ref: Springboard.dc.html
-**Surface:** iPhone Springboard — paged home (Today / app grid / App Library), page dots, dock, long-press quick-actions sheet, and the Spotlight entry gesture. Files: frontend/slices/appshell/components/mobile-home.tsx, mobile-home-parts.tsx, mobile-app-library.tsx, mobile-app-library-parts.tsx (home-indicator.tsx + dynamic-island.tsx adjacent).
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| MED | dock glass material | Springboard.dc.html dock fill = var(--glass-bg) (theme-aware frost .62 light / .55 dark) with a .5px var(--glass-stroke) hairline + backdrop blur+saturate — SSOT §4 rule 1 glass chrome, tracks light/dark. | mobile-home.tsx L116-119: className 'glass' supplies blur only, but inline style HARDCODES background:rgba(255,255,255,.18) (fixed white, ignores dark mode, ~3x thinner than the mock's .62) + border-white/30 (1px, not a .5px hairline). Raw rgba, not a theme token. |
-| LOW | dock elevation / float | box-shadow: inset 0 .5px 0 var(--glass-hi) (inner top highlight) + 0 12px 34px var(--glass-shadow) (big soft lift) — the dock reads as a floating frosted slab. | no box-shadow and no inner highlight on the dock element — a flat frosted strip with no lift. |
-| LOW | app-library folder-well material | SSOT §4: App-Library wells are glass chrome over the blurred wallpaper via a glass token (theme-aware). | mobile-app-library-parts.tsx L29 folder well = raw rgba(255,255,255,.14); mobile-home dock also raw — hardcoded whites that don't track dark mode (the expand panel already correctly uses var(--glass-menu)). |
-| LOW | springboard icon + label metrics | config: springIcon 58px, springLabel 12px/500, dockIcon 56px; grid-icon drop-shadow 0 7px 13px rgba(0,0,0,.3). | mobile-home-parts.tsx: grid icon cap max-w-[62px], label text-[11px]/500; dock icon size-[60px]; iOS inherits base --shell-icon-shadow 0 3px 8px rgba(0,0,0,.18) (softer/shallower than the mock). |
-| LOW | spotlight affordance | real iOS: swipe-DOWN on home = Spotlight, and iOS16+ shows a visible pill 'Search' button above the dock. | AppsGrid onPointerDown maps swipe-UP (grid at top) → toggleSpotlight; there is NO visible search affordance, so the entry point is undiscoverable. |
-| LOW | Today widgets page | single springboard, no Today page. | mobile-home.tsx page 0 = <Slot region='today'/>, but grep confirms NO provider registers the 'today' region anywhere → a blank wallpaper page / dead left swipe. |
-
-**Steps:**
-1. Dock glass fidelity: in the dock container swap inline background:rgba(255,255,255,.18) for background:var(--glass-bar) (theme-aware frost that matches the mock's --glass-bg density and tracks dark mode); soften border to a hairline (border-white/15) and add the iOS float via shadow-[0_12px_34px_rgba(0,0,0,.30)] plus an inner top highlight [box-shadow:inset_0_.5px_0_rgba(255,255,255,.5)] (or ::before). Keep .glass blur, mx-3 width (iPhone-accurate, do NOT narrow to content-width — the mock's centered slab is iPad-styled), rounded-[31px]. Covers divergences 1+2. — `frontend/slices/appshell/components/mobile-home.tsx (dock element ~L116-124)` *(~4-5 lines, 1 element)*
-2. App-Library well token: replace raw rgba(255,255,255,.14) on the FolderCard well with a glass token (var(--glass-panel) or var(--glass-bar)) so wells track theme and satisfy the token rule; verify the search field + expand panel already use var(--glass-menu). — `frontend/slices/appshell/components/mobile-app-library-parts.tsx (L28-30); spot-check mobile-app-library.tsx` *(~2 lines)*
-3. Metrics nudge: grid label text-[11px]->text-[12px] and icon cap max-w-[62px]->max-w-[58px] (mock springIcon/springLabel); dock icon 60->56 optional. To deepen the grid drop-shadow to the mock's 0 7px 13px, add an iOS-ONLY block in globals.css: [data-shell="ios"] .shell-icon-tile{ --shell-icon-shadow:0 7px 13px rgba(0,0,0,.28) } — never edit shared app-icon.tsx or the base [data-shell] token. — `mobile-home-parts.tsx (labels/icon caps); optionally app/globals.css (new [data-shell="ios"] selector)` *(~2 lines tsx (+~3 css))*
-4. [Optional, beyond-mock / modern-iOS] Add a discoverable pill-shaped 'Search' button just above the dock (below the page dots) calling onSearch (toggleSpotlight); reuse the Search lucide + var(--glass-bar) pill pattern from the App-Library field. Keep the existing up-swipe. Fixes the undiscoverable-spotlight nit. — `frontend/slices/appshell/components/mobile-home.tsx (between page-dots row and dock)` *(~6-8 lines, 1 Button)*
-5. [Optional] Kill the dead Today swipe: either register a default widget for the 'today' slot (app layer) OR gate page 0 so the pager renders only Grid+Library when no today content exists (2 pages, 2 dots). Leave as-is only if a Today widget is planned. — `frontend/slices/appshell/components/mobile-home.tsx (pager + dots)` *(~4-6 lines)*
-
-**Guard (android/windows/dashboard):** Every step edits iOS-only files. mobile-home.tsx / mobile-home-parts.tsx / mobile-app-library*.tsx / home-indicator.tsx are imported ONLY by mobile-shell.tsx, which is registered as id:\"ios\" (desktop.tsx L211). Android renders its own android-shell.tsx + android-parts.tsx (AppCell/AppDrawer/NavBar/Recents); Windows/Dashboard/macOS are separate desktop shells; none import the mobile-home tree — so they stay byte-unchanged. The one shared asset optionally touched (Step 3 globals.css) is scoped by a NEW [data-shell=\"ios\"] selector: android matches [data-shell=\"android\"], windows/macos their own, and the base [data-shell] token block they inherit is left untouched, so their computed styles are identical. --glass-bar/--glass-panel are READ (not redefined) from iOS-only files, so every other token consumer is unaffected. Shared AppIcon is NEVER edited — its iOS shadow is changed only via the data-shell CSS seam.
-
-**Essence / skips:** VPS-essence deliberate skips (keep, do NOT add): (1) No fabricated status bar — mobile-home.tsx keeps an intentionally empty safe-area spacer; the mock's 52px row with time 16/600, wifi 18px and battery glyph is the one mock pattern we reject on purpose (no clock/wifi/battery/cellular/brightness in a VPS cockpit). (2) Dynamic Island is NOT faked as static hardware — it's implemented as a functional live-activity pill (dynamic-island.tsx via the topPill Slot) that shows only when an app reports an activity and renders nothing idle; do not add a decorative black notch pill. (3) Host-I/O untouched: the springboard only launches apps through the shared window store and groups the App Library by a static app-id CATEGORY map — zero lib/host.ts / file-explorer data-layer calls. Constraints honored: no new deps, shadcn Button reused, all fills move from raw white rgba toward existing --glass-* tokens (the white-on-wallpaper LABEL color stays — the mock uses literal #fff and there is no semantic on-wallpaper token), every file stays <200 LOC (mobile-home 152, parts 164, library 110, library-parts 106).
-
-#### 5. `appshell-system-surfaces` — parity: **close** · ref: MobileShell.dc.html
-**Surface:** Four iOS system overlays: Control Center (top pull-down toggle grid, controlCenter slot), Notification Center (components/mobile-notifications.tsx full-screen pull-down log), Dynamic Island (live-activity topPill), Spotlight (search/command overlay). Toast stack (ToastHost, notifications slot) is tangential — shared cross-surface chrome.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | Reduce Transparency (a11y) — glass blur | SSOT §1.7: Reduce Transparency → --blur:0 + solid fills; the repo mechanism is `.reduce-glass{--blur:0}` and the `.glass` utility reads var(--blur). | CC uses Tailwind `backdrop-blur-xl` (fixed 24px), NC uses inline `blur(28px)`, DynamicIsland uses `backdrop-blur` (fixed 8px) — all bypass var(--blur), so glass never collapses when the user enables Reduce Transparency. (Spotlight + ToastHost correctly use `.glass` and DO honor it.) |
-| MED | Notification Center surface color | SSOT: glass derives from theme tokens (--glass-*), flips light/dark, obeys Reduce Transparency. | mobile-notifications.tsx L43 hardcodes `background: rgba(20,22,38,.62)` (dark navy) in BOTH themes + inline blur — violates MSO rule 'theme tokens not raw hex' and isn't theme-aware. |
-| MED | Spotlight layout on the iOS surface | iOS Search (swipe-down): top-anchored, full-width search field over a wallpaper blur, results list below. | spotlight.tsx renders one desktop command-palette look everywhere — a centered `max-w-xl` glass box at `pt-[18vh]` with a `bg-black/20` scrim; identical on the iOS surface. |
-| MED | Liquid-glass edge (inner highlight + hairline) | Mock chrome pills carry `box-shadow: inset 0 .5px 0 var(--glass-hi), 0 8px 26px var(--glass-shadow)` + `--glass-stroke` outer hairline (SSOT §1.5/§4). | `.glass` utility is blur+saturate only; --glass-hi/--glass-stroke tokens don't exist; CC/NC/Spotlight edges are a flat `border-border` with no inner top highlight. |
-| LOW | Sheet grabber handle | SSOT §3.3: pull-down sheets show a grabber `36x5 r2.5 --label3` top-center. | CC has no grabber; NC uses a 134px white bar at the BOTTOM (home-indicator style, L100), not the top grabber. |
-| LOW | Spotlight search field affordance | SSOT §3.2: search field = `--fill` pill + leading `#g-search 15x15` glyph + placeholder. | bare `<input>` at the top of the glass box — no leading search glyph, no fill pill. |
-| LOW | Dynamic Island fill / geometry | SSOT §2.4: island `120x34 r20` solid `#000`. | dynamic-island.tsx `bg-black/85` (translucent) auto-width `rounded-full` pill; content-sized rather than the fixed island footprint. (Expanded-state sizing is fine; only the fill opacity diverges.) |
-| LOW | Toast banner placement | Real iOS banners drop from top-CENTER. | ToastHost is `absolute right-3.5 top-9` (top-right glass cards) on every surface incl. iOS — shared cross-surface component, low priority. |
-
-**Steps:**
-1. Fix the Reduce-Transparency bypass on the three hardcoded-blur surfaces: swap Tailwind/inline blur for the `.glass` utility (reads var(--blur)). CC: replace `backdrop-blur-xl` with `glass` (keep bg-[var(--glass-menu)]). DI: replace `backdrop-blur` with `glass`. NC: drop inline `blur(28px)` and add `glass` (bg handled in Step 2). Neutral-positive for Android CC, so no branch needed. — `/home/rahman/projects/mso/frontend/slices/appshell/features/control-center/components/control-center.tsx; .../features/notifications/components/dynamic-island.tsx; .../components/mobile-notifications.tsx` *(~1 line each (~3 LOC))*
-2. Tokenize the NC surface: add a theme-aware NC glass (reuse --glass-panel, or add --glass-nc light+dark in :root/[data-theme=dark]) and replace the hardcoded `rgba(20,22,38,.62)`. Keep white-alpha cards/text (consistent with the iOS dock over-wallpaper style) OR move text to a token — your call; the panel bg is the load-bearing fix so light-mode + Reduce Transparency behave. — `/home/rahman/projects/mso/app/globals.css (2 token lines); /home/rahman/projects/mso/frontend/slices/appshell/components/mobile-notifications.tsx (bg swap)` *(~4 LOC)*
-3. Add the iOS liquid-glass edge: define --glass-hi + --glass-stroke tokens (light+dark) and an iOS-scoped rule `[data-shell="ios"] .glass { box-shadow: inset 0 .5px 0 var(--glass-hi); border-color: var(--glass-stroke) }` OR an opt-in `.glass-ios` class. Do NOT touch base `.glass`. Because CC's shadcn Sheet portals to <body> (outside [data-shell]), apply the class to CC directly under the id==='ios' gate from Step 5. — `/home/rahman/projects/mso/app/globals.css (~6 lines: 4 tokens + rule); control-center.tsx (apply class, iOS-gated)` *(~8 LOC)*
-4. Branch Spotlight for the mobile surface: read useActiveShell() (already exported from @/features/appshell) and when surface==='mobile' render a top-anchored, full-width variant (container inset-x-0 top-0; input as a --fill pill with a leading Search glyph — fixes the §3.2 field too); the desktop `else` branch keeps today's centered-palette JSX byte-for-byte. Extract the two shells into a small helper/second file to stay under the 200-line rule (spotlight.tsx is already 183 lines). — `/home/rahman/projects/mso/frontend/slices/appshell/features/search/components/spotlight.tsx (+ optional new spotlight-shell.tsx)` *(~30-40 LOC (split to stay <200/file))*
-5. Add the CC grabber + iOS glass edge, iOS-gated: inside ControlCenter wrap a grabber (`36x5 r2.5` top-center, --label3-equivalent) and the Step-3 `.glass-ios` class in `useActiveShell().id === 'ios'` so Android's controlCenter tile grid stays byte-unchanged. — `/home/rahman/projects/mso/frontend/slices/appshell/features/control-center/components/control-center.tsx` *(~8-12 LOC (iOS-gated block))*
-6. (Low / optional) DynamicIsland fill under Reduce Transparency: once Step 1 gives it `.glass`, optionally deepen bg toward solid #000 when --blur collapses. Leave the idle-pill absent (deliberate VPS skip — see essence). Toast top-center on iOS is out of scope (shared component); skip unless you accept touching desktop toasts. — `/home/rahman/projects/mso/frontend/slices/appshell/features/notifications/components/dynamic-island.tsx` *(~2 LOC or skip)*
-
-**Guard (android/windows/dashboard):** The seam is the feature-slot mount map + useActiveShell()/[data-shell]. Per component: (A) DynamicIsland + MobileNotifications are iOS-EXCLUSIVE BY MOUNT — topPill slot and the NC import exist only in mobile-shell.tsx (verified). android-shell mounts controlCenter but never topPill and never imports MobileNotifications; windows/dashboard are desktop shells that mount neither. So editing dynamic-island.tsx / mobile-notifications.tsx is byte-invisible to android/windows/dashboard with no code branch. (B) ControlCenter is SHARED iOS+Android (both mount the controlCenter slot). The Reduce-Transparency fix (Step 1) is strictly more-correct for both, so no branch. Any iOS-ONLY visual (grabber, iOS glass edge — Steps 5/3) MUST be wrapped in `useActiveShell().id === 'ios'` so Android's tile grid stays byte-for-byte; windows/dashboard never mount it. (C) Spotlight is SHARED across ALL five shells (overlay slot in the common Surface). The iOS layout branch (Step 4) MUST be gated on `useActiveShell()` (surface==='mobile' or id==='ios'); the desktop `else` branch keeps today's exact centered-palette JSX so macOS/Windows/Dashboard render byte-unchanged. (D) The iOS liquid-glass edge (Step 3) is applied via `[data-shell="ios"]` (Surface sets data-shell on its root) or an opt-in `.glass-ios` class — the base `.glass` utility is NOT modified, so every other shell's glass is untouched. Caveat: ControlCenter's shadcn Sheet PORTALS to document.body (outside [data-shell]), so CC must get the class directly under the id==='ios' gate, not via the descendant selector.
-
-**Essence / skips:** VPS-essence caveats & DELIBERATE SKIPS (name, don't fix): (1) No status-bar clock/wifi/battery/cellular/signal — the mock's status row (MobileShell.dc.html L26-30) fabricates all of them; our mobile-home.tsx L83-91 reserves the notch zone but renders nothing ("no status clock — not useful in a VPS cockpit"). Correct; keep. (2) Idle Dynamic-Island black notch pill — the mock shows a permanent 118x33 #000 pill (L28); ours renders DI only during a live activity. Keep skipping: a permanent black pill is a hardware-notch decoration with no status bar to anchor it, and reads as fabricated hardware. (3) Control Center exposes ONLY real toggles (appearance/server/focus/spotlight/assistant/close-windows) — NO brightness/volume/wifi/airplane/AirDrop modules, because the VPS has no such hardware. Correct. (4) NC translucent white-alpha cards + glass-on-glass mirror real iOS and match the iOS home-dock over-wallpaper treatment (mobile-home.tsx L117) — kept intentionally despite SSOT golden-rule 2/3 tension. (5) DATA LAYER UNTOUCHED: no step goes near lib/host.ts or the file-explorer data path; Spotlight folder search (useShellSearch → read-only search) stays exactly as-is — only its presentation changes.
-
-#### 6. `appshell-widgets` — parity: **close** · ref: Springboard.dc.html
-**Surface:** iOS "Today" page — page 0 of the iPhone home pager (swipe-right from the app grid): a "Today" heading + frosted "Edit" pill, the user's enabled glanceable widget stack (CPU/Mem/Disk/Clock/Notes/Quicklinks/… rendered via the shared WIDGET_RENDER glass Cards), a "Quick open" app-tile row, and the widget-picker "Edit" modal opened from the pill. Rendered by mobile-widgets.tsx via the `today` feature slot (iOS-only).
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | widget-picker copy (the iOS Edit affordance) | The Edit modal is the Add-Widget gallery for the Today page; copy must be truthful to the phone surface. | The SHARED shadcn Dialog shows verbatim DialogTitle 'Desktop widgets' + DialogDescription 'Click a widget to add or remove it. Drag widgets on the desktop to arrange.' on the phone. 'Desktop' + 'drag on the desktop' are factually false on the Today page (no desktop, no drag there). A 'Show desktop widgets' switch (governs only the wallpaper stack) also renders, meaningless on iOS. |
-| MED | picker presentation — sheet vs dialog (§3.3) | iOS modal = bottom sheet: rounded-top 20px, SOLID --elev fill, grabber 36x5 r2.5 --label3, medium/large detents, dimmed scrim. | Centered shadcn Dialog (max-w-lg card) — a desktop idiom — used as the iOS Today Edit affordance. |
-| MED | 'Today' title type scale (§1.4 / §3.9) | Phone-screen Large Title 32/800, letter-spacing -.02em (white + text-shadow over wallpaper is springboard-correct per §2.4). | Header h2 is `text-lg font-bold` = 18px/700 with no negative tracking (white + text-shadow is fine; the scale/weight is under-spec). |
-| LOW | widget-card 'layered glass' depth (§1.5 + design.md §10.4) | iOS-26 widget = layered glass: fill + outer hairline stroke + inner top highlight + elevation shadow, lifting off the wallpaper. | SHARED Card = --glass-menu(.86) fill + border-white/15 + backdrop-blur-xl, but NO inner top highlight and NO drop shadow -> reads as a flat frosted panel that doesn't lift off wallpaper. (Glass itself is HIG-CORRECT here, so this is depth polish, not a §4.2 'glass on content' fix.) |
-| LOW | widget-internal typography (§1.4) | Glanceable primary label 16/500-600, big stat 44/700 tint; leading colored/tinted glyph. | widget-cards Row: label 12.5/600, value 12.5/700, sub 11 — everything compressed to caption size; leading icon is a 16px muted-gray glyph, not tinted. Stats read small. |
-| LOW | inter-card spacing (§1.3 / §3.1) | Grouped card gap-below = 18px. | mobile-widgets container uses `gap-3` = 12px between widget cards. |
-| LOW | empty state (§3.7) | Centered --label2 15px column, padding 70x20, 'No Items' when the list is empty. | With zero enabled widgets AND zero quick apps, only the bare 'Today' header floats over wallpaper — no empty affordance. |
-| LOW | Edit-button variant (§3.6) | iOS edit affordance = tinted plain text button (--tint) or a gray fill pill. | White frosted pill (bg-white/15) + Plus icon + text-white. DEFENSIBLE over-wallpaper adaptation (§4.4 — the pill gives the label a solid surface; a tint-text label could fail contrast over an arbitrary wallpaper), so arguably acceptable as-is. |
-
-**Steps:**
-1. Fix the wrong-on-phone picker copy. Add `const { surface } = useActiveShell()` (import intra-slice from ../../../registry/shells, matching the slice's own convention — NOT the public barrel, to avoid a self-referential cycle). When surface==='mobile': DialogTitle -> 'Widgets', DialogDescription -> 'Add or remove widgets. Tap to toggle.', and hide the 'Show desktop widgets' switch row (the master on/off governs only the wallpaper stack). Desktop path keeps the exact current 'Desktop widgets' title + description + switch byte-for-byte behind the else branch. — `/home/rahman/projects/mso/frontend/slices/appshell/features/widgets/components/widget-picker.tsx` *(~12 (surface branch + conditional switch row))*
-2. Scale the 'Today' heading to the iOS Large Title. Change the header h2 from `text-lg font-bold` (18/700) to `text-[28px] font-extrabold tracking-[-0.02em] leading-tight`; keep `text-white [text-shadow:0_1px_3px_rgba(0,0,0,0.5)]` (springboard over-wallpaper label convention, §2.4). iOS-only file — no branch needed. — `/home/rahman/projects/mso/frontend/slices/appshell/features/widgets/components/mobile-widgets.tsx` *(~2)*
-3. Present the picker as an iOS bottom sheet on mobile (§3.3). On surface==='mobile', render the gallery in a bottom sheet (rounded-top 20px, SOLID `var(--card)` fill, grabber 36x5 r2.5 in `text-muted-foreground`, scrim, `box-shadow: var(--shadow-pop)`) instead of centered DialogContent — MIRROR the existing AppActionSheet bottom-sheet in components/mobile-home-parts.tsx (do NOT add shadcn Drawer / vaul — none is installed; adding one violates no-new-deps). Desktop keeps the shadcn Dialog untouched behind the else branch. — `/home/rahman/projects/mso/frontend/slices/appshell/features/widgets/components/widget-picker.tsx (optionally extract a tiny shared sheet shell from components/mobile-home-parts.tsx)` *(~30-40 (or ~15 if the AppActionSheet shell is reused))*
-4. Add iOS-26 'layered glass' depth to the SHARED widget Card, surface-branched. On surface==='mobile' add `box-shadow: var(--shadow-pop)` (lift off wallpaper) + an inner top-highlight ring, and optionally drop the fill from --glass-menu(.86) to --glass-panel(.78) for a lighter liquid-glass read. Gate on useActiveShell so the desktop stack's current flat card stays byte-identical. SKIPPABLE — glass is already HIG-correct; this is depth polish only. — `/home/rahman/projects/mso/frontend/slices/appshell/features/widgets/components/widget-cards.tsx` *(~10 (branch + shadow/highlight))*
-5. Two independent low-cost nudges. (a) SHARED Row: branch on mobile to lift label 12.5->13 and value 12.5->15 (glanceable stat scale, §1.4); desktop unchanged behind the else branch. (b) mobile-widgets container `gap-3` -> `gap-[18px]` to match SSOT card gap-below (iOS-only, no branch). (a) is skippable (compact desktop widgets are fine); (b) is free. — `/home/rahman/projects/mso/frontend/slices/appshell/features/widgets/components/widget-cards.tsx (Row, branched) + /home/rahman/projects/mso/frontend/slices/appshell/features/widgets/components/mobile-widgets.tsx (container gap)` *(~8)*
-6. Add an empty state (§3.7). In mobile-widgets, when `enabled.length===0 && quick.length===0`, render a centered column: `text-[15px] text-muted-foreground`, padding ~70/20, 'No widgets' + a 'Tap Edit to add one' hint. iOS-only file — no branch. — `/home/rahman/projects/mso/frontend/slices/appshell/features/widgets/components/mobile-widgets.tsx` *(~6)*
-
-**Guard (android/windows/dashboard):** Primary seam = the `today` feature slot. It is consumed ONLY by MobileHome (mobile-home.tsx: `<Slot region='today'/>`), which is instantiated ONLY by MobileShell — registered as id:'ios', surface:'mobile' at desktop.tsx:211. Android renders its OWN home (android-shell.tsx mounts only `Slot region='controlCenter'`, never `today`, and imports NOTHING from the widgets slice — verified); Windows / Dashboard / macOS are desktop shells that never mount the `today` slot. THEREFORE every edit inside mobile-widgets.tsx (steps 2, 5b, 6) is structurally iOS-only — it cannot render on any other persona, no branch required. Steps that touch SHARED files — widget-picker.tsx (steps 1, 3) and widget-cards.tsx (steps 4, 5a), which ALSO feed the `desktopWidgets` slot on macOS (desktop.tsx:184) + Windows (windows-shell.tsx:74) — MUST gate the change behind useActiveShell() (surface==='mobile' / id==='ios'), imported intra-slice from ../../../registry/shells, so the desktop render path stays byte-identical. Android + Dashboard never import these files at all, so they are unaffected regardless; the surface branch specifically protects Windows + macOS. No shared logic/store is altered — widget-registry.ts is untouched.
-
-**Essence / skips:** VPS-essence is intact and its omissions are a deliberate skip-set, not gaps: (1) the mock Springboard status bar (wifi 18x18, battery 25x12.5, Dynamic Island 120x34) is deliberately DROPPED — mobile-home.tsx's top spacer documents 'no status clock … not useful in a VPS cockpit' — correct, no fabricated hardware; keep it. (2) All system widgets (CPU/Mem/Disk/Net/Uptime) read REAL host telemetry via useSystemStats() (host-I/O) and already render '—' when null; ClockWidget uses real local `new Date()` (real time, not faked hardware). Every proposed step is presentation-only — NONE touches useSystemStats / lib/host.ts or the file-explorer data layer. Framing caveat (honest): the mock/SSOT has NO Today-widgets reference screen at all (Springboard.dc.html = status + app grid + dock; the only widget guidance is design.md §10.4 'glanceable, system sizes, Light/Dark/Tinted-aware, layered glass in iOS 26'), so parity is judged against SSOT cross-cutting rules + HIG, not a literal screen — and glass-on-widgets is HIG-CORRECT ('layered glass'), NOT a §4.2 'glass on content' violation, so I did NOT propose de-glassing the cards. Deliberate skip: large-title collapse-into-pinned-glass-nav (§3.9) does NOT fit — the Today page is a chromeless wallpaper-layer pager page (matches iOS Today View, which has no nav bar), so there is no nav bar to collapse the title into. The Edit-button 'white pill vs tint text' divergence is also left as-is by design (a §4.4 over-wallpaper contrast adaptation).
-
-### ▸ Phase 3 — Apps
-
-#### 7. `files-manager` — parity: **diverges** · ref: Files.dc.html
-**Surface:** iOS shell (id="ios") only: the Files app pane inside MobileShell. The shell already paints the outer iOS nav bar (app icon + "Files" + Done, frost-on-scroll) + home indicator; the slice fills <main> with an AppFrame(toolbar=FilesToolbar, body=FileView grid/list, footer=counts) plus a left-Sheet Browse sidebar (FilesSidebar). Surfaces this slice owns: the file browser pane (grid+list), the Browse sidebar, and the in-app toolbar.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | nav idiom / in-app toolbar | iOS phone has NO Finder toolbar: navigation is the shell nav bar (icon+title+Done, frost-on-scroll) + location rows + a single trailing tint button (g-plus New / g-trash Delete). Secondary actions live in a tint "…" menu. | FilesToolbar renders a dense desktop bar (h-11 border-b: drawer toggle, back/forward chevrons, breadcrumb trail, grid/list segmented, sort dropdown, Paste, New outline, Download, Upload dropdown) IDENTICALLY on iOS — a second stacked bar under the shell nav. |
-| HIGH | large title / current-folder title | Phone shows a 32px/800 large title = current location name (filesTitle), collapsing to 22/700 in the 46px nav on scroll (§3.9); sidebar shows a rootTitle large title too. | Shell nav shows the static app title "Files" (never the folder); no in-content large title anywhere — the folder name surfaces only inside the breadcrumb. mobile-shell.tsx even notes "mso apps carry no in-content large title." |
-| MED | grid density / tile metrics | Phone grid: grid-template-columns:repeat(auto-fill,minmax(86px,1fr)); gap:16px 6px (~4-up on a 402px phone); thumb 58px; tile padding 9px 4px, radius 11px, gap 8px; name fileFs 12px. | @max-[430px]:grid-cols-2 (2-up on phone) with size-11/size-12 (44–48px) icons, tile rounded-lg (8px) p-3 gap-1.5, name text-[11px] line-clamp-2 — chunkier and half the column count. |
-| MED | grid selection model | Selection tints the NAME PILL only (nameBg tint behind the label, padding 1px 7px, radius 6px); the tile itself stays transparent. | Selection fills the WHOLE tile (bg-primary text-primary-foreground). |
-| MED | search field | Search pill at top of the Browse pane: h38, radius 9, background --fill, g-search 15×15 + "Search" placeholder --label2 — byte-shared across the split apps. | No search field in Files at all. |
-| MED | folder glyph color | Folder glyph = fixed system #57b3ff (a semantic color, explicitly NOT the user tint per §1.1). | Folder = text-primary (the user tint) in file-item.tsx — recolors with whatever accent the user picks; iOS folders stay folder-blue. |
-| LOW | location-row anatomy (sidebar) | Phone rows: padding 10px 18px, radius 7px, gap 10px, icon 17×17, name 16px/500, active = full --tint fill white; section headers secFs 12.5px/600 --label2, secPad 16px 20px 4px. | Favorites are shadcn ghost Buttons (h-8 px-2 text-xs, icon size-4); active = bg-primary text-primary-foreground (this MATCHES the active-tint-fill); header "Favorites" text-[11px] font-semibold + Star. Gaps: row padding, 15/16px name scale, header type scale. |
-| LOW | rich typed thumbnails | Doc = 44×56 white card + folded corner + colored badge; audio = pink gradient rounded tile + speaker; app = superellipse (radius 23%); image = colored gradient tile. | All non-image/non-folder types = a flat lucide glyph tinted by category color (colorFor) — category colors already present, but not the layered iOS thumbnails. |
-| LOW | empty state | Centered --label2, 15px, padding 70px 20px, copy "No Items". | flex-center text-xs (12px) muted, copy "Drop files or folders here to upload" (a functional upload hint). |
-| LOW | list-view idiom on phone | List view is the Mac/iPad spreadsheet table; phone DEFAULTS to grid. iOS phone list rows (when used) are grouped rows with a chevron, not a spreadsheet. | List = grid-cols-[1fr_92px_96px] Name/Size/Kind spreadsheet on every shell; grid is the iOS default (already aligned), so this is secondary. |
-
-**Steps:**
-1. iOS grid tile: extract the iOS-flavored tile so file-item.tsx stays ≤200 LOC. New sibling renders a transparent tile with NAME-PILL selection (tint bg behind the label only, padding 1px 7px, radius 6px), fixed folder #57b3ff (accepted category-color exception), thumb ~54–58px, tile radius 11, gap 8, name 12px. file-item.tsx delegates to it when `ios && view==="grid"`; file-view.tsx threads `ios` and, when ios, sets the phone grid to repeat(auto-fill,minmax(86px,1fr)) gap-[16px_6px] (~4-up) instead of grid-cols-2. Else-path unchanged → android/windows/dashboard byte-identical. Fixes divergences #3,#4,#5,#6. — `/home/rahman/projects/mso/frontend/slices/files-manager/components/file-item-ios.tsx (new, ~110 LOC), /home/rahman/projects/mso/frontend/slices/files-manager/components/file-item.tsx (~10-line delegate), /home/rahman/projects/mso/frontend/slices/files-manager/components/file-view.tsx (~10 lines: thread ios + iOS grid cols)` *(~130 new / ~20 edit)*
-2. iOS in-content large title: when `ios`, render the current folder name (last crumb) as a 28–32px/700-800 title at the top of the FileView scroll body. This gives the shell's frost-on-scroll its subject and satisfies §3.9's large-title collapse without touching mobile-shell.tsx. app.tsx threads `ios`; FileView (or a tiny sibling) renders the title only when ios. Fixes divergence #2. — `/home/rahman/projects/mso/frontend/slices/files-manager/app.tsx (thread ios), /home/rahman/projects/mso/frontend/slices/files-manager/components/file-view.tsx (~15 lines, ios-guarded title header)` *(~25)*
-3. iOS toolbar slim-down (highest visual win, largest behavior surface): new sibling files-toolbar-ios.tsx renders the iOS bar — a leading back chevron as tint text, an iOS segmented grid/list toggle (track bg-secondary rounded-[9px] p-0.5, options rounded-[7px]), and a single trailing tint "…" DropdownMenu that hosts New Folder / Upload / Upload Folder / Sort / Paste / Download. Drop the breadcrumb trail on iOS (back chevron + the Step-2 large title carry the location). files-chrome.tsx renders this variant when `ios`, the existing FilesToolbar otherwise. Fixes divergence #1 (and #10 partially). All handlers are the existing cmd/fs callbacks — no data-layer change. — `/home/rahman/projects/mso/frontend/slices/files-manager/components/files-toolbar-ios.tsx (new, ~90 LOC), /home/rahman/projects/mso/frontend/slices/files-manager/components/files-chrome.tsx (~8 lines: ios branch)` *(~90 new / ~10 edit)*
-4. iOS Browse sidebar polish: in files-sidebar.tsx, when `ios`, add a "Browse" large title + a search pill (shadcn: h-9 rounded-lg bg-secondary, Search icon + "Search") that filters the loaded entries client-side (presentation filter over `ordered` — NOT a host query), and bump location rows to iOS metrics (px-4 py-2.5 rounded-lg gap-2.5, icon ~17px, name text-[15px]/medium, section header 13px/600). Keep the existing active-tint-fill (already matches) and the real roots/Trash/FileTree/storage. Fixes divergences #5(search),#7. Else-path unchanged. — `/home/rahman/projects/mso/frontend/slices/files-manager/components/files-sidebar.tsx (~45 lines, ios branch; if search filters the grid, lift the query string to app.tsx)` *(~50)*
-5. iOS empty state: in file-view.tsx empty branch, when `ios` render centered text-[15px] text-muted-foreground py-[70px] "No Items"; keep the drop-hint copy for non-ios. Fixes divergence #9. — `/home/rahman/projects/mso/frontend/slices/files-manager/components/file-view.tsx (~6 lines)` *(~6)*
-
-**Guard (android/windows/dashboard):** Seam = useActiveShell() → {id,surface}, already imported at app.tsx:42. Compute `const ios = id === "ios"` once and thread it as a prop into FileView → FileItem, FilesHeader → FilesToolbar, and FilesSidebar; every change is a NEW branch whose else-path renders today's exact markup, so nothing shared is rewritten. CRITICAL NUANCE: gate on `id === "ios"`, NOT `surface === "mobile"` — android is ALSO surface:"mobile", so a surface-level branch would mutate the android persona. `id === "ios"` leaves android (id "android"), windows (id "windows"), dashboard (id "dashboard") and macos on the untouched else-path → byte-identical render. The shells' OUTER chrome (mobile-shell.tsx nav/Done/home-indicator and android-shell.tsx) is never edited, so android's own shell stays intact. Precedent for this exact seam: os-settings/app.tsx:69 already branches presentation via useActiveShell (surface + shellId) from the same shared row primitives.
-
-**Essence / skips:** DATA LAYER UNTOUCHED: every step is presentation-only (file-item/file-view/files-toolbar/files-chrome/files-sidebar). lib/host.ts routing, use-files*, zip/upload/inspector are never read or altered. NO-FABRICATION: the proposed iOS search pill MUST filter the already-loaded `ordered` entries client-side (presentation) — never a dead cosmetic pill and never a new host query; a chrome-only search would violate VPS essence. No hardware risk in Files (status/battery/wifi/clock belong to the shell status bar, not this app). DELIBERATE SKIPS (mock patterns that don't fit a VPS cockpit): (1) mock Favourites taxonomy iCloud Drive/AirDrop/Shared/Recents/Applications/Tags is fabricated Apple-cloud — our sidebar correctly uses REAL host roots + Trash + live FileTree + real storage usage, so we keep ours; (2) the Recents/Shared/Browse phone tab bar — Recents (no recents index) and Shared (no share graph) aren't real VPS concepts, only "Browse" is, and the shell already owns app navigation, so skip the tab bar; (3) rich doc-card/audio-gradient/app-superellipse thumbnails are deprioritized as over-fitting — our category icon-colors (colorFor: text-amber/pink/emerald/sky/violet…) already satisfy the fixed-category-color pattern. MSO RULES: folder #57b3ff is the one raw hex, taken as the accepted fixed-category-color exception; every other new style uses existing theme tokens (--primary, --secondary/--field, --sep, --glass-bar/panel, text-muted-foreground) — no raw hex. shadcn primitives only; no new deps; barrel import (@/features/os-shell) already present. ≤200 LOC forces extraction: file-item.tsx is already 190 LOC and files-toolbar.tsx 133 LOC, so the iOS grid tile and iOS toolbar must land as new sibling files, not inline branches.
-
-#### 8. `system-monitor` — parity: **close** · ref: MobileShell.dc.html (shared app chrome)
-**Surface:** iOS (MobileShell) fullscreen app: frosted-on-scroll nav bar [AppIcon + title + Done] over one scrolling content pane — 4 circular gauges (CPU/Mem/Disk real, GPU mock), CPU + Network sparkline cards, and a process table that swaps wide-grid ⇄ compact touch-list at a ≤440px container. No tab bar (single view).
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | double title (shell nav + in-app header) | One nav bar per screen — the 46px nav carries a SINGLE title; the in-content large title collapses INTO that nav on scroll (SSOT §2.4/§3.9). Never two titles. | iOS MobileShell nav renders [AppIcon] 'System Monitor' [Done] (mobile-shell.tsx:212-219); the slice's AppFrame header ALSO renders [Activity] 'System Monitor' [chip] [Refresh] directly beneath (app.tsx:83-95). The title appears twice on every iOS open, unconditionally. |
-| MED | nav-trailing action (Refresh) | Screen actions live in the nav bar as trailing --tint icon buttons (§2.4 nav trailing, §3.6 tinted/plain). | Refresh sits in the in-app header's ResponsiveToolbar, not the iOS nav; the iOS shell nav exposes only 'Done' (no app-action slot). |
-| MED | destructive used as text (contrast) | Destructive is a semantic red kept AA-legible when it's text on a card. | process-table.tsx cpuTone() applies `text-destructive` (--destructive #ff5f57, the bright FILL red) to CPU>50% text on a light card (~3:1, below AA 4.5:1). globals.css defines --destructive-text (#d70015) for exactly this case and it's unused. Shared component — shows in all shells. |
-| LOW | section/panel + header typography | Section header 13/600 (Title3 20/700 when prominent); nav title 16/600 (§1.4/§3.1). | GlassPanel title 12.5px/700 bold non-upper (glass-panel.tsx:15); in-app header title text-sm=14/600 (app.tsx:88) — undersized vs the 16/600 nav and off the 13/600 section spec. Shared component. |
-| LOW | content surface token / naming (glass-on-content) | Golden rule #2 — content cards are SOLID --card/--elev; glass (blur) is chrome-only, never on content. | Gauge + panel cards fill with --glass-panel (0.78/0.74α) via a component literally named 'GlassPanel', but with NO backdrop-filter, and mso --card is itself 0.86α translucent — so it renders near-solid and is effectively compliant. The token name + alpha only imply glass-on-content; low real impact. |
-| LOW | separator hairline weight | Hairline 0.5px --sep, inset to row padding (§3.1). | process rows + gauge/panel borders use 1px `border-t`/`border` --sep (default width), not 0.5px. Shared components. |
-| LOW | empty / loading state type size | Empty state centered --label2 15px, padding 70px 20px (§3.7). | Loading 'Reading host telemetry…' is text-xs=12 + spinner (app.tsx:66); empty 'No process data' is 11px (process-table.tsx:17) — under the 15px spec. |
-| LOW | nav title alignment / leading control | Nav title centered; leading = Back/Home chevron (tint); trailing = share (§2.4). | iOS shell nav is LEFT-aligned [AppIcon]+title with a trailing 'Done' and no Back chevron. Intentional and correct: apps open modally (zoom over springboard), so Done-not-Back is the right iOS idiom. Shell-level (mobile-shell.tsx), not the slice — flagged as verified-OK, not a defect. |
-
-**Steps:**
-1. Expose the iOS-scope seam to the slice: add `export { useActiveShell } from "@/features/os-shell";` (optionally `type ShellId`) to the slice's host barrel. Barrel-only cross-slice import (already the file's job), purely additive. — `/home/rahman/projects/mso/frontend/slices/system-monitor/lib/host.ts` *(~1-2 lines)*
-2. Kill the double-title on iOS. In SystemMonitor() read `const { id } = useActiveShell()`. When `id === "ios"`: pass NO `header` to AppFrame (the shell nav already shows icon+title+Done); relocate the cores·mode chip to a slim footnote at the top of the content body (12.5px, --text-dim, per §3.1 footnote); drop the manual Refresh (the 1.5s live poll covers it) OR keep it as one trailing --tint icon button in that footnote. For every other `id`, return today's EXACT header markup — untouched. — `/home/rahman/projects/mso/frontend/slices/system-monitor/app.tsx` *(~15-20 lines)*
-3. (Optional, fuller §2.4 parity) Give the iOS shell nav a trailing app-action slot so Refresh lives beside 'Done' as a --tint icon. Add a tiny nav-action register (context/Slot in the appshell shell-ui) that mobile-shell.tsx renders between title and Done; system-monitor writes Refresh into it under `id==="ios"`. mobile-shell.tsx is the render fn for shell id "ios" only — windows/dashboard/android shells are separate files and cannot be reached. — `/home/rahman/projects/mso/frontend/slices/appshell/components/mobile-shell.tsx (+ small shell-ui register) and /home/rahman/projects/mso/frontend/slices/system-monitor/app.tsx` *(~25-40 lines)*
-4. (Optional polish, SAME iOS branch) With the header gone on iOS, normalize the content body's top padding (the `p-4` wrapper) so GaugeGrid sits at a comfortable inset under the frosted nav and scrolls under its frost-on-scroll. Only the iOS branch's wrapper className changes. — `/home/rahman/projects/mso/frontend/slices/system-monitor/app.tsx` *(~2-4 lines)*
-
-**Guard (android/windows/dashboard):** One seam only: `useActiveShell().id === \"ios\"` inside app.tsx. macos, windows, dashboard AND android all fall to the untouched else-branch, so their rendered markup is byte-identical to today. Critically the branch keys on `id === \"ios\"`, NOT `surface === \"mobile\"` — android is also surface:\"mobile\" and renders its own title bar (android-shell.tsx:160) that must stay unchanged. Step 3 touches mobile-shell.tsx, which is the `render` registered ONLY for shell id \"ios\" (desktop.tsx:211); windows-shell.tsx / dashboard-shell.tsx / android-shell.tsx are separate files a nav-slot there cannot reach. The host.ts edit is a pure additive re-export (new symbol) — existing exports and every other slice file stay byte-identical. The shared slice components (GlassPanel, CircularGauge, ProcessTable) render in all shells and are deliberately NOT touched — their low/med cosmetic + contrast nits are flagged as shared-surface and left out of the iOS-scoped plan so the other three personas remain byte-unchanged.
-
-**Essence / skips:** VPS-essence holds: (1) NO status bar — the mock's clock/battery/wifi/signal + Dynamic Island (§2.4) are hardware we must never fabricate; the iOS shell correctly renders none (reserves the --sai-top notch zone only). The plan keeps it absent. (2) Data layer untouched — all telemetry flows host.ts → useOsApi() → OsApi port (use-stats-history polls api.sys.stats/processes); every proposed change is presentational in app.tsx / mobile-shell.tsx, never the host-I/O routing. Deliberate mock patterns skipped: (a) Large title §3.9 — mso convention (mobile-shell comment: 'apps carry no in-content large title'); a 32/800 title wastes cockpit vertical space. (b) Tab bar §2.2 — single-view app, no tabs; N/A. (c) Grouped inset-list row anatomy §3.1 — this is a gauge+sparkline+table dashboard, so we match the 'solid cards on grouped bg' intent (12px radius, --surface as grouped bg) without forcing list rows. Soft caveat: the GPU gauge (gauge-grid.tsx: a random-walk, labeled 'GPU (mock)') is a fabricated metric not in the SysStats contract — borderline vs 'never fabricate hardware'; it's honestly labeled so acceptable, but the essence-pure option is to drop it (naming it, not mandating). The multi-hue MONITOR_VARS palette is the sanctioned fixed-category-color exception, not a one-tint violation.
-
-#### 9. `app-store` — parity: **diverges** · ref: MobileShell.dc.html (shared app chrome)
-**Surface:** iOS phone fullscreen app (MobileShell hosts it): the App Store browse screen — in-content header/title + search field + category filter + 2-col app-card grid. The iOS shell adds only a floating back chevron + home indicator (no OS nav bar), so this app's own header IS the iOS chrome/title. Single presentation file: components/apps/AppStoreApp.tsx (169 LOC), no iOS variant.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | nav large-title (§3.9 / the "nav" in nav+content) | iOS large title 32px/800, ls -.02em, pad 8px 20px 6px on --grouped; collapses on scroll to a centered 22/700 title inside a 46px nav that gains glass + .5px hairline. Title sits on the grouped page bg, not a bordered bar. | static <h1 class="text-sm(14px) font-semibold"> + 12px subtitle inside a `border-b border-border bg-background` pinned header. No large-title, no collapse, no glass, wrong scale (14 vs 32). This is the headline iOS gap. |
-| LOW | double-title backlog item (honest finding) | One canonical title per screen; on iOS the shell/nav owns it. | On iOS there is exactly ONE title today (the app's own <h1>) — the MobileShell contributes no title, so there is NO iOS double-title. The real duplication is DESKTOP-only: window.tsx renders win.title "App Store" (catalog-entries-c.tsx:129) AND the app renders <h1>App Store</h1>. Fixing that dedup lives in the macOS/Windows render path = out of iOS scope; do not touch it here. |
-| MED | search field material (§3.2) | systemFill pill: --fill bg, NO border, radius ~10-12, #g-search 15x15 --label2 + "Search" placeholder in --label2. | `flex items-center gap-2 rounded-md border border-border bg-card` wrapper (bordered + card fill = wrong material) around a shadcn <Input>. Should be borderless on a systemFill (--muted) fill under iOS. |
-| MED | category filter control + selected tint (§3.4 / Golden rule 5) | Small fixed set → segmented control (--fill track r9 pad2, option pad7x4 r7 14/500, selected = --card pill + shadow). Selected/interactive uses --tint (iOS blue #0a84ff default). | rounded-full outline chips (`border px-2.5 py-0.5 text-xs`), selected = `border-primary bg-primary/10`. --primary is monochrome near-black by default (only tinted if the user sets a Brand; iOS blue lives in --os-accent), so the selected chip reads gray, not iOS-blue. Sizing/weight also off (text-xs vs 13-14/500). |
-| LOW | filled/prominent button tint (§3.6) | Filled Install button = --tint bg, #fff label, weight 600. | Install <Button> (shadcn default) = --primary bg = monochrome near-black on iOS by default. Native iOS cue is --os-accent (blue). Shared primitive, so gate any change. Neutral-until-branded is a deliberate OS-wide default (MEMORY: mso-hig-design), hence low. |
-| LOW | empty state (§3.7) | Centered column, --label2, 15px, padding 70px 20px, optional muted glyph above the text. | `grid place-items-center text-sm(14px) text-muted-foreground` "No apps match" — close but 14 vs 15px, small pad (no 70px), no glyph. |
-| MED | shell nav-bar chrome (mock reference screen = MobileShell) | MobileShell.dc.html: 44 status bar + 46 nav bar (centered title, leading/trailing tint text buttons, glass) + tab bar; large-title collapse. | MobileShell renders a floating translucent back chevron (no title, no nav bar, no glass hairline) + home indicator — a deliberate 'edge-to-edge, no OS header' contract (mobile-shell.tsx:140). Divergent from the mock's nav bar, BUT this is SHELL-level (features/appshell/components/mobile-shell.tsx), shared by every iOS app — out of the app-store slice's scope; name it, don't fix it here. |
-
-**Steps:**
-1. iOS large-title: keep the shared markup, add stable classNames to the header/h1/subtitle, then add [data-shell="ios"] CSS rules that (a) drop the header border-b + bg to transparent/--grouped, (b) restyle the h1 to 32px/800/ls-.02em with pad 8px 20px 6px, (c) size the subtitle to 12.5px --label2. Ship a STATIC large title first (no collapse-on-scroll — see essence). This closes the #1 gap without touching the other shells' 14px bordered header. — `components/apps/AppStoreApp.tsx (classNames only, ~10 LOC) + app/globals.css or features/appshell/appshell.css (~15 LOC of [data-shell="ios"] rules)` *(~25 LOC)*
-2. Search field → systemFill pill: swap the wrapper's `border border-border bg-card` for iOS via a className hook + [data-shell="ios"] rule that sets a borderless `--muted` (systemFill) fill, radius ~11. Keep the shadcn <Input> inside (no primitive change). Other shells keep the bordered card. — `components/apps/AppStoreApp.tsx (~4 LOC) + globals.css (~6 LOC)` *(~10 LOC)*
-3. Category capsules re-token (NOT a segmented control): under [data-shell="ios"] set unselected chips to a --muted capsule and selected to an --os-accent-tinted fill with legible label; bump to 13/500. Deliberately keep the scrolling capsule row (categories are dynamic/variable-length from the catalog — a fixed segmented track can't hold them; iOS uses a capsule row for exactly this). — `components/apps/AppStoreApp.tsx (~6 LOC) + globals.css (~10 LOC)` *(~16 LOC)*
-4. (optional, low) iOS Install-button + selected tint: give the Install <Button> an iOS-only className; a [data-shell="ios"] rule maps its bg to --os-accent + --primary-foreground so it reads iOS-blue instead of monochrome --primary. Gate strictly so the shared <Button> and the other shells are unchanged. Weigh against the intentional neutral-until-branded default. — `components/apps/AppStoreApp.tsx (~3 LOC) + globals.css (~6 LOC)` *(~9 LOC)*
-5. (optional, low) Empty state to iOS spec: under [data-shell="ios"] bump text to 15px, add py-[70px], optional muted glyph. — `components/apps/AppStoreApp.tsx (~3 LOC) + globals.css (~4 LOC)` *(~7 LOC)*
-6. (infra, only if a step needs JS markup divergence e.g. collapse-on-scroll title) Formalize the seam the task calls useActiveShell(): promote the private useShellId() pattern from os-spinner.tsx (useSyncExternalStore on document.documentElement.dataset.shell) into a tiny exported hook returning {id,surface} and export it from the @/features/appshell barrel (index-shell.ts already exports the ShellId type). Then mount collapse nodes only when id==="ios". Not needed for the CSS-gated steps 1-5. — `features/appshell (new ~12-LOC hook) + features/appshell/index-shell.ts (1 export line)` *(~13 LOC)*
-
-**Guard (android/windows/dashboard):** Seam = the `<html data-shell=\"ios\">` attribute stamped by useShellTokens (features/appshell/components/use-shell-tokens.ts); the other personas stamp data-shell=\"android\" / \"windows\" / \"dashboard\". Every step above is either an iOS-only CSS branch ([data-shell=\"ios\"] ...) or a className that is completely inert without that attribute, so android/windows/dashboard never match the selector — their DOM tree AND computed styles stay byte-identical. This is the exact seam appshell.css, os-spinner.tsx, context-menu.tsx and force-quit-dialog-parts.tsx already use. I keep the shared AppStoreApp.tsx markup element-for-element identical (additions are class strings only), so even the runtime element tree is unchanged for the other three shells; JS branching (step 6) is reserved for the phase-2 collapse and, if used, mounts extra nodes ONLY when a reactive data-shell===\"ios\" read is true. No shared logic (install state, openWindow, catalog, useApps) is touched.
-
-**Essence / skips:** VPS-essence: app-store fabricates NO hardware (no wifi/battery/cellular/clock/brightness/signal) — nothing to violate. File-explorer DATA layer untouched: install state flows from the `apps` Database via useUninstalledAppIds/useAppActions (@/features/data barrel), which is app-install metadata, NOT host-I/O — lib/host.ts is never in this path, and all steps touch presentation (classNames + CSS) only. MSO rules honored: shadcn primitives kept (Input/Button); theme tokens only (--muted/--os-accent/--primary-foreground/--grouped) — the fixed badge colors (sky/violet/amber/pink) are the accepted fixed-category exception; no new deps; CSS lands in existing files; TSX additions are className-only so AppStoreApp.tsx stays under the 200-LOC gate (currently 169); barrel-only imports preserved (step 6's hook exports from @/features/appshell). DELIBERATE SKIPS: (1) segmented control for the category filter — categories are dynamic/variable-length, so re-token the scrolling capsule row instead (iOS does the same for variable sets); (2) large-title collapse-on-scroll animation — phase-2; ship a static large title first because the app owns a nested inner scroll container that makes a true collapse fiddly; (3) the DESKTOP double-title dedup (hiding the in-content <h1> on macOS/Windows) and the MobileShell nav-bar rebuild — both live in shared/other-shell code and are out of the iOS app-store slice. ALREADY MATCHES — do not rebuild: the app icon is the correct 23% superellipse squircle (.icon-tile + [data-shell=\"ios\"], appshell.css:154), and the card radius (rounded-xl ≈ 14px) is within the 12-16px browse-tile spec; the 2-col card/tile browse grid is on-spec (SSOT §3.8 shares the grid-tile pattern between Files grid + Safari favourites), so the layout is close — only the chrome/title/material/tint diverge.
-
-#### 10. `browser` — parity: **diverges** · ref: Safari.dc.html
-**Surface:** iOS Safari chrome only — the address/search bar, the tab strip, and the toolbar bands that wrap a REAL Playwright screenshot. The page content itself (RemoteView `<img>`) is a live 1280×800 Chromium frame and is not a styleable iOS surface. Mock ref: Safari.dc.html (single sticky top glass address bar).
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | iOS branch / seam | SSOT expects a shell-specific presentation via useActiveShell() {id,surface}, like os-settings (stack/sidebar/tabs) and files-manager. | app.tsx never calls useActiveShell(). One identical Chrome-style desktop chrome renders for macos/windows/dashboard/ios/android. No iOS code path exists at all. |
-| HIGH | address bar shape + placement (signature Safari surface) | ONE sticky top bar: pad 9px 14px, --glass-bg + backdrop-filter blur(26px) saturate(180%), border-bottom .5px --sep; inside it a single CENTERED URL pill h38 r11, --fill bg, #g-lock 12x12 --label2 + URL 14px --label. No inline nav buttons. | omnibar.tsx renders a SOLID `bg-card` toolbar row (no glass, no backdrop-filter) packing Back/Forward/Reload\|Stop/Home icon buttons + a left-aligned rounded-full h-8 Input (text-xs, placeholder 'Search Google or type a URL') + Star + kebab BrowserMenu + loading hairline. Desktop omnibar, dense, opaque. |
-| HIGH | glass material on chrome (Golden rule 1) | Nav/address chrome = liquid glass (--glass-bar + blur + .5px --sep hairline). The iOS shell's own app nav bar already frosts on scroll (bg-[var(--glass-bar)] backdrop-blur-xl). | TabBar bg-card/50, Omnibar bg-card, BookmarkBar bg-card — all solid, zero backdrop-filter. Four opaque chrome bands stack under the shell's glass nav bar instead of one glass address plane. |
-| MED | tab strip vs iOS tab switcher | Mock Safari has no visible tab strip (single page). Real iOS Safari hides tabs behind a tab-switcher glyph; count badge; grid sheet. | tab-bar.tsx is an always-visible Chrome-style horizontal strip: rounded-t-md rectangular tabs (min-w 110px), per-tab close X, `+` new-tab, and an AI toggle chip. Pure desktop. NOTE multi-tab is now REAL (rb.tabs) despite the stale 'no tabs' comment in app.tsx. |
-| MED | inline nav-button cluster in the bar | Top bar carries only the URL pill (back/forward live at the iOS bottom bar, which the mock omits). | omnibar packs 4 icon buttons (Back/Forward/Reload/Home) left of the pill — desktop density inside a phone-width pane. |
-| MED | URL pill metrics + typography | h38, radius 11, font 14px, lock 12x12, content centered, color --label / lock --label2, --fill fill. | Input h-8 (32px), rounded-full (not r11), text-xs (12px), lock size-3.5 (14px), left-aligned text with left icon + trailing Star. Height/radius/size/alignment all off. |
-| LOW | persistent bookmark bar | iOS Safari / mock: no persistent bookmark row (bookmarks behind the book icon; start screen shows a Favourites grid). | bookmark-bar.tsx renders a persistent horizontal favicon-chip row as a second toolbar band under the omnibar. |
-| LOW | secure indicator color | Neutral lock glyph in --label2 (Safari shows a plain gray lock for https). | omnibar swaps Lock/Globe and tints the lock `text-success` (green) when secure — non-iOS convention. |
-| LOW | overlays: history popover + AI sheet side | iOS presents transient lists as a BOTTOM sheet: rounded-top 20px, solid --elev, grabber 36x5 r2.5, scrim (SSOT 3.3). | history-view.tsx = top-right rounded-xl popover w/ bg-black/20 scrim (desktop anchor). ai-panel.tsx = shadcn Sheet side='right' (iPad/desktop drawer), not bottom. (AI panel isn't a mock-Safari element — polish only.) |
-
-**Steps:**
-1. Add the seam: import useActiveShell into the existing `@/features/os-shell` line, read `const { id: shellId } = useActiveShell()` in LiveBrowser, derive `const ios = shellId === 'ios'`, and thread it into the header/toolbar branches (steps 2-4). Strict === 'ios' gate is the whole guard. — `/home/rahman/projects/mso/frontend/slices/browser/app.tsx` *(~12 LOC)*
-2. iOS glass address bar in Omnibar: add optional `ios?: boolean` prop. When ios, early-return a single glass bar — container `bg-[var(--glass-bar)] backdrop-blur-xl border-b border-border px-3.5 py-2`, holding ONE centered pill button `h-[38px] rounded-[11px] bg-muted` with lock `size-3 text-muted-foreground` (neutral, drop the green/globe swap) + URL `text-sm text-foreground`; tapping the pill focuses the Input (or expands to it). Hide the Back/Forward/Reload/Home cluster, Star, and kebab from the bar (fold reload/history/bookmark into the browser menu). Keep the loading hairline. Non-ios path = the current return, untouched. — `/home/rahman/projects/mso/frontend/slices/browser/components/omnibar.tsx (+ pass ios from app.tsx)` *(~55 LOC)*
-3. Collapse the desktop tab strip on iOS: in app.tsx set `header={ios ? undefined : <TabBar .../>}` and add a small tab-switcher affordance (count glyph) in the iOS omnibar trailing slot that opens a bottom-sheet list of rb.tabs reusing onSwitch/onClose/onNew — preserves REAL multi-tab, drops the Chrome strip. Barrel-safe new component under components/ (<200 lines). Optionally give tab-bar.tsx an `ios` prop instead of a new file. — `/home/rahman/projects/mso/frontend/slices/browser/app.tsx, new /home/rahman/projects/mso/frontend/slices/browser/components/ios-tabs.tsx` *(~60 LOC)*
-4. Drop the second toolbar band on iOS: `toolbar={<><Omnibar ios={ios} .../>{!ios && <BookmarkBar .../>}</>}`. OPTIONAL (VPS-essence-safe): on the blank/new-tab state render a Favourites grid built from REAL `bookmarks` (58x58 r15 letter tiles, label text-[12.5px] text-muted-foreground) — matches the mock grid using real data. DO NOT port the mock's Privacy Report card. — `/home/rahman/projects/mso/frontend/slices/browser/app.tsx, optional new /home/rahman/projects/mso/frontend/slices/browser/components/ios-start.tsx` *(~6 LOC (hide) / +~45 LOC (optional grid))*
-5. Optional low-priority polish: give history-view.tsx an `ios` prop that renders a bottom sheet (rounded-t-[20px], solid bg-card, grabber 36x5 rounded-full bg-muted-foreground/30, scrim) instead of the top-right popover; flip ai-panel.tsx to `Sheet side={ios ? 'bottom' : 'right'}`. Both default false so non-ios is byte-identical. — `/home/rahman/projects/mso/frontend/slices/browser/components/history-view.tsx, /home/rahman/projects/mso/frontend/slices/browser/components/ai-panel.tsx` *(~35 LOC)*
-
-**Guard (android/windows/dashboard):** Single seam: `const { id: shellId } = useActiveShell()` in LiveBrowser (app.tsx), `const ios = shellId === 'ios'`. Every change is behind `ios ? ... : <existing>` or an `if (ios)` early-return, and the gate is the exact string 'ios'. Because android is a SEPARATE id (also surface==='mobile'), keying on id==='ios' — never surface==='mobile' — leaves android on the untouched default path along with windows/dashboard/macos: their prop expressions and JSX are the current ones, so render output is byte-identical. No shared primitive is edited — AppFrame, Button, Input, Sheet, and the mobile-shell nav/home-indicator chrome are untouched; only the browser slice's own private components (omnibar/tab-bar/history-view/ai-panel, confirmed imported nowhere outside the slice) gain an optional `ios?: boolean` prop defaulting false/undefined, so every existing call site is a no-op.
-
-**Essence / skips:** Chrome-only: RemoteView renders a live Playwright 1280×800 screenshot `<img>` — the page content is NOT a DOM we own, so the Safari 'single scroll column / article' contract can't and shouldn't be faked; only the chrome around it aligns. DATA layer stays sealed: lib/host.ts, lib/use-remote-browser.ts, lib/use-screencast.ts, lib/use-inspector.ts, lib/url.ts, lib/storage.ts are untouched; all edits are presentation (components/*, app.tsx JSX); host I/O stays routed through lib/host.ts. Deliberate skips: (1) the mock's Privacy Report '31 trackers blocked' card is fabricated telemetry — never port it (VPS-essence: don't invent). (2) The mock's fake Favourites/article HTML is fabricated content — if a Favourites grid is added it must read REAL bookmarks only. (3) Bottom toolbar: the mock implements a TOP glass bar only (SSOT §2.4), and a bottom Safari toolbar would collide with the shell-owned home indicator / --sai-bottom+34px zone — match the mock, keep chrome at top. (4) The tab switcher re-presents real multi-tab (rb.tabs), it does not fabricate anything. No new deps; shadcn primitives + theme tokens (--glass-bar, --sep/border, --muted/--muted-foreground, --primary, --card, --success) only — no raw hex.
-
-#### 11. `assistant` — parity: **close** · ref: Messages.dc.html
-**Surface:** iOS phone chat surface: Alfa's message thread (bubbles), the pinned bottom composer, and the nav bar (shell-provided). Plus two VPS-only elements interleaved in the thread that Messages has no analog for — the approve-per-call ApprovalCard and the LIVE/MOCK banner.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | composer structure | Single rounded pill (bg var(--fill), .5px var(--sep) border, radius 20, pad 5/6/5/15) with the send FAB NESTED inside the pill at the right edge (Messages.dc.html L30-33). | shadcn Textarea and a SEPARATE square icon Button sit side-by-side in a flex gap-2 row (chat-composer.tsx L39-73) — reads as generic shadcn, not an iMessage pill. |
-| MED | send button shape/size/icon | 30x30 circle, bg var(--tint), white up-arrow glyph #g-arrowup (SSOT 3.6 Icon FAB). | 36x36 (size-9) rounded-md SQUARE, bg-primary, lucide Send (paper-plane) icon (chat-composer.tsx L63-72). |
-| MED | composer input fill/radius | var(--fill) fill at radius 20, no bordered box — just the pill. | bg-secondary, rounded-md (6px), border-input + shadow-sm (shadcn Textarea default). |
-| MED | bubble tail corner | Tail at BOTTOM — user border-bottom-right-radius:6px, assistant border-bottom-left-radius:6px (messages slice.js L46); iMessage silhouette points down at sender. | Tail at TOP — rounded-tr-sm (user) / rounded-tl-sm (assistant), ~2px (message-bubble.tsx L57-61). |
-| MED | bubble radius + type | radius 19px, max-width 74%, padding 8px 13px, font 15px / line-height 1.35. | rounded-2xl (16px), max-w-[82%], px-3.5 py-2 (8/14px), text-sm (14px) / leading-relaxed (~1.625) — undersized font, too loose. |
-| MED | per-message avatar | NO avatar in the thread; the 46px avatar lives only in the sidebar list rows (SSOT 3.8). Thread is pure bubbles. | 28px (size-7) Sparkles/User avatar rendered beside EVERY bubble (message-bubble.tsx L41-54). Defensible assistant convention, but diverges from Messages. |
-| MED | inter-bubble spacing | 3px between bubbles (0 for first) — iMessage-tight (slice.js L45). | uniform flex gap-4 (16px) between all rows (chat-panel.tsx L202). |
-| LOW | composer container bg | solid var(--bg), border-top .5px var(--sep). | bg-background/60 (translucent), border-t. |
-| LOW | bubble colors | user var(--tint)+#fff, received var(--fill2)+var(--label). | bg-primary(=--accent #1f6df0 blue)+primary-fg, bg-muted(=inset gray)+foreground — token intent ALREADY matches; do not touch --accent (shared). |
-| LOW | nav bar / title | iOS nav = title + tint buttons, transparent-at-rest frosting to glass + .5px hairline on scroll (SSOT 2.4/3.9). | assistant paints NO own nav; MobileShell already renders app-icon(30px) + "Assistant" title + tint "Done", frost-on-scroll via --glass-bar (mobile-shell.tsx L205-220). Already correct — no work. |
-| LOW | tab strip (Chat/Agents/Skills/Automations) | No Messages analog; SSOT closest = segmented control (track --fill r9 pad2; option r7 14px/500; selected --card+shadow). | TabsList rounded-lg bg-secondary p-0.5; trigger rounded-md px-3 py-1 text-xs; active bg-card shadow-sm (tabs.tsx) — already approximates segmented. Not a Messages element. |
-| LOW | approval card surface | No Messages analog; SSOT grouped card = radius 12, solid --card, 0 1px 2px shadow. | rounded-lg (8px) border card, primary/destructive/muted tinted bg (approval-card.tsx L30-34). VPS-only element; keep function, optional radius polish. |
-
-**Steps:**
-1. Gate the composer to an iOS pill. In ChatComposer read `const ios = useActiveShell().id === "ios"` (import from @/features/os-shell). iOS branch: wrap the Textarea + a 30px rounded-full bg-primary FAB (swap lucide Send -> ArrowUp, text-primary-foreground) INSIDE one bg-secondary rounded-[20px] border-border pill (pad 5/6/5/15); container becomes solid bg-background border-t. Keep the Stop-while-streaming button, the multi-line grow, Enter-to-send, and placeholder as-is. `else` = today's exact markup. This is the highest-impact fix. — `slices/assistant/components/chat-composer.tsx` *(~22 LOC added (hook + ArrowUp import + iOS branch); 76 -> ~98)*
-2. Gate the bubble geometry to iOS in MessageBubble: `const ios = useActiveShell().id === "ios"`. iOS: rounded-[19px] with bottom-corner tail (user rounded-br-[6px], assistant rounded-bl-[6px]), max-w-[74%], px-[13px] py-2, text-[15px] leading-[1.35], and DROP the avatar span (pure left/right bubbles like iMessage; flex-row-reverse still right-aligns user). `else` = current avatar + rounded-2xl + tr/tl-sm markup untouched. — `slices/assistant/components/message-bubble.tsx` *(~14 LOC (hook + ternaries + avatar conditional); 69 -> ~83)*
-3. Tighten inter-bubble spacing on iOS only. In ChatPanel read `ios` and template the thread container gap (line 202) from gap-4 -> ios ? gap-1.5 : gap-4 (1.5 leaves room for interleaved tool cards while reading iMessage-tight). NOTE: chat-panel.tsx is already 217 LOC (>200 soft-limit); keep this to the single className + one hook read, or fold the spacing into MessageBubble's own wrapper margin to avoid touching the streaming/agent-loop core at all. — `slices/assistant/components/chat-panel.tsx` *(~2 LOC; 217 -> ~219 (flag: already over 200))*
-4. OPTIONAL polish — bump ApprovalCard to the iOS grouped-card radius on iOS (rounded-lg -> rounded-xl/12px) via a gated `ios` read; leave every resolve/approve/deny/switch handler and the danger/result rendering byte-identical. Purely the wrapper className. Skip if scope is tight — the gate already works and uses theme tokens. — `slices/assistant/components/approval-card.tsx` *(~6 LOC; 122 -> ~128)*
-
-**Guard (android/windows/dashboard):** Every change sits behind a `useActiveShell().id === \"ios\"` read inside the presentational LEAF components (message-bubble, chat-composer, approval-card) plus one className in chat-panel; the `else` path is the exact current markup. useActiveShell is imported from the @/features/os-shell BARREL (appshell/index.ts re-exports it — same import os-settings/files-manager use), never a deep appshell path, so the barrel-only rule holds. Android resolves to a DISTINCT `id:\"android\"` (android-shell.tsx L179) even though it shares surface:\"mobile\", so it takes the else branch and is byte-unchanged; Windows (id:\"windows\") and Dashboard (id:\"dashboard\") likewise. CRITICAL: branch on `id === \"ios\"`, NEVER `surface === \"mobile\"` — the latter would also capture Android. No shared component, no token (--accent/--muted stay put), and no host-tool file is modified, so all three personas render identical bytes. No new deps (lucide ArrowUp already ships); shadcn Button/Textarea reused, pill is a plain div wrapper; theme tokens only, no raw hex.
-
-**Essence / skips:** VPS-essence: (1) No hardware fabrication — none of these steps add wifi/battery/cellular/clock/signal. The iOS status bar (time/wifi/battery) belongs to the shell's Springboard layer, NOT the app; deliberate skip — the assistant must not paint a status bar. The nav-bar title + frost-on-scroll is already the shell's (MobileShell) and is left untouched. (2) Host-I/O data layer untouched — all edits are presentational className/markup in the bubble/composer/approval WRAPPERS. The approve-per-call gate (pendingRef/requestApproval/resolve in chat-panel, invoke/useHostCommands, lib/host.ts routing) and the LIVE/MOCK banner are preserved verbatim, per the task's explicit keep. DELIBERATE SKIPS matching Messages, not inventing work: (a) no bottom tab bar — Messages has none and MobileShell reserves only the home-indicator for apps; the assistant's top tab strip is the right call. (b) Per-message avatar removal is offered (step 2) but is a defensible agent-UX convention — flag it, don't force it if the reviewer wants Alfa's identity on every turn. (c) tabs.tsx segmented-control polish deferred — it's a shared slice-local primitive used by all shells, so gating it needs extra ios plumbing from app.tsx for low visual payoff. (d) Keep the multi-line Textarea + Stop button rather than the mock's single-line <input> — an agent needs both. Nav bar, bubble colors, and tabs are already close/matching via the shell chrome + the --primary(=accent)/--muted(=inset) token mapping, so no token or nav work is proposed.
-
-#### 12. `os-terminal` — parity: **close** · ref: MobileShell.dc.html (shared app chrome)
-**Surface:** Paints INTO the iOS shell app pane (`<main>` under the shared nav bar in appshell/components/mobile-shell.tsx). Terminal-owned surfaces: (1) content area — live xterm PTY (pty-terminal.tsx) OR React-DOM exec emulator (exec-terminal.tsx); (2) a top connection/mode status strip; (3) a bottom software-keyboard accessory KeyBar (coarse-pointer / compact pane). The iOS nav bar (app-icon + "Terminal" + "Done"), notch reservation (--sai-top), home indicator, and nav frost-on-scroll are shell-provided and correctly inherited — the terminal renders no per-app chrome.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| LOW | nav bar (minimal iOS chrome) | MobileShell.dc.html supplies the app nav bar (title + tint leading/trailing text buttons, glass frost on scroll); apps render UNDER it. | iOS shell (mobile-shell.tsx <header>) already renders app-icon + 'Terminal' title + 'Done', reserves --sai-top, and frosts to --glass-bar via onScrollCapture on <main>; the terminal renders into that and adds NO per-app nav. Both scroll containers (exec overflow-y-auto div; xterm .xterm-viewport) are descendants of <main>, so frost-on-scroll fires for both. |
-| LOW | safe areas | content insets from notch (top) + home indicator (bottom). | top notch reserved by the shell nav (--sai-top, floored 2.75rem); bottom home-indicator zone padded IN the terminal — pty-terminal root [padding-bottom:var(--sai-bottom)], exec-terminal [padding-bottom:calc(0.875rem+var(--sai-bottom))]. Matches. Gap: no env(safe-area-inset-left/right) — landscape notch/rounded-corner clip unhandled, but no --sai-left/right exists shell-wide (portrait-first). |
-| LOW | SF Mono font | Apple system monospace for terminal text (SF Mono / ui-monospace). | --font-mono-ui (app/globals.css:15) = var(--font-geist-mono), ui-monospace, "SF Mono", Menlo, monospace; both components resolve to it (exec via font-mono utility+arbitrary prop, pty via getComputedStyle). SF Mono is NAMED, but Geist Mono (brand webfont) leads, so iOS actually renders Geist Mono, not literal SF Mono. |
-| LOW | status/mode + connection banner | chrome uses semantic tokens + continuous corners; content stays solid (no glass on content — respected: terminal is solid #0d0e12). | full-bleed hardcoded-hex banner (pty StatusBar green/yellow/red/gray, sharp rectangle), rounded hex pill (exec mode banner), red PTY-unavailable banner (app.tsx) — all 11px, audit-allow-hex-blessed. Un-tokenized vs iOS, but VPS-essence connection/mode state and dark-terminal-consistent. |
-| LOW | in-nav actions vs inline banner buttons | nav/toolbar hosts tint action buttons (SSOT 2.4 / 3.6). | terminal Restart / Basic-mode / Clear live as hex banner buttons, not iOS nav affordances — BUT the iOS shell exposes no per-app nav-action slot (only controlCenter + topPill Slots in mobile-shell.tsx), so this is blocked at the shell layer, not a terminal-fixable gap. |
-
-**Steps:**
-1. RECOMMENDED: ship no change. The task's three asks are already met — nav bar inherited from the iOS shell, notch reserved via --sai-top + home indicator padded via --sai-bottom in both components, and --font-mono-ui names SF Mono. Content stays solid (no glass-on-content) and frost-on-scroll works for both the exec div and the xterm viewport. The steps below are OPTIONAL polish, each recommended-skip. — `(none — verification only)` *(0)*
-2. OPTIONAL (recommend skip): SF-Mono-first on iOS only. Add `export { useActiveShell } from "@/features/os-shell";` to the slice barrel-seam, then in pty-terminal (xterm fontFamily) and exec-terminal (font-family) branch: when useActiveShell().id==="ios", use 'ui-monospace, "SF Mono", Menlo, monospace' instead of the --font-mono-ui var. Honest caveat: Geist Mono is the OS-wide brand mono (code-editor etc. keep it) — forcing SF Mono only in the terminal only on iOS is inconsistent; the current stack already lists SF Mono as fallback. — `/home/rahman/projects/mso/frontend/slices/os-terminal/lib/host.ts, /home/rahman/projects/mso/frontend/slices/os-terminal/components/pty-terminal.tsx, /home/rahman/projects/mso/frontend/slices/os-terminal/components/exec-terminal.tsx` *(~12 LOC (1 re-export + a font branch in each component))*
-3. OPTIONAL (recommend skip): iOS-only banner polish — swap hardcoded hex for theme tokens + continuous corners on the connection/mode strips, gated by useActiveShell().id==="ios" so android/windows/dashboard keep the exact current hex banner. Must preserve semantic meaning (green=live, red=error) and must NOT make it resemble a device status bar. audit-allow-hex already blesses the current palette and it is dark-terminal-consistent, so value is marginal. — `/home/rahman/projects/mso/frontend/slices/os-terminal/components/pty-terminal.tsx (StatusBar), /home/rahman/projects/mso/frontend/slices/os-terminal/components/exec-terminal.tsx (mode banner), /home/rahman/projects/mso/frontend/slices/os-terminal/app.tsx (PTY-unavailable banner)` *(~15-25 LOC)*
-
-**Guard (android/windows/dashboard):** The terminal is shell-AGNOSTIC today: grep confirms zero useActiveShell / data-shell usage, so android/windows/dashboard (and macOS) render the identical current bytes. Every proposed step is gated behind `useActiveShell().id === \"ios\"`, reached only through the slice's existing `@/features/os-shell` barrel (which does `export * from \"@/features/appshell\"`, re-exporting useActiveShell) via a one-line re-export in lib/host.ts — satisfying the barrel-only cross-slice rule. Because the other three shells never resolve id===\"ios\", they fall to the else-arm = the exact current code path; no shared markup/logic is edited, the iOS branch is purely additive. The one change that can't be cleanly iOS-gated (KeyBar 44pt touch target — key-bar.tsx BTN is h-9/36px vs HIG 44pt) is DELIBERATELY EXCLUDED from this iOS task: the key bar shows for every coarse-pointer shell, so a bigger target would also alter android — it must be raised as a separate cross-shell a11y fix, not smuggled in here.
-
-**Essence / skips:** No fabricated hardware: the terminal renders no wifi/battery/cellular/clock/signal/brightness. The PtyTerminal 'StatusBar' is a shell-CONNECTION status (live/connecting/exited/error) — NOT a device status bar; keep it that way, and do not iOS-ify it into anything resembling the system status bar. Data layer untouched: host I/O stays routed through lib/host.ts (useOsApi from @/features/os-shell), the PTY through lib/use-pty.ts → /api/v1/term/*, and exec FS reads through OsApi — no proposed step touches any of these, and the pty OUTPUT (xterm buffer/colors/theme) is off-limits per the task (steps only touch chrome + the font-stack string). Deliberate skips: (a) literal SF Mono over Geist Mono — Geist is the OS-wide brand mono, overriding only the terminal only on iOS is inconsistent; SF Mono is already a named fallback; (b) banner tokenization — audit-allow-hex-blessed, dark-terminal-consistent essence state; (c) left/right safe-area insets — no --sai-left/right exists shell-wide and the OS is portrait-first; (d) moving Restart/Clear/Basic into an iOS nav/toolbar — the iOS shell exposes no per-app nav-action slot (only controlCenter + topPill Slots), so it is blocked at the shell layer and out of scope for the slice; (e) KeyBar 44pt touch target — a genuine but cross-shell a11y win, cannot be iOS-gated without artificiality, handle outside this task.
-
-#### 13. `code-editor` — parity: **diverges** · ref: Notes.dc.html
-**Surface:** Inner app chrome rendered INSIDE the shell-provided iOS frame (MobileShell already paints the glass nav bar + "Code Editor" title + 44pt "Done" + home indicator). The Notes-analog surfaces are: EditorToolbar (= Notes detail format toolbar), TabStrip, StatusBar, the empty state, NewFileModal + CloseGuardDialog. The code EditorSurface (monospace body) is the engine, out of scope.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | iOS seam / per-shell config | SSOT expects apps to branch via useActiveShell() {id,surface} (Settings & Files both do — macOS sidebar vs iOS stack vs Windows tabs). | code-editor never imports useActiveShell — grep is empty. Identical VS-Code-dark chrome in all 5 shells; there is no iOS path to hang any alignment on. This is the root cause of every other row. |
-| MED | Toolbar material (Notes format bar / §4 chrome=glass) | Notes detail toolbar = background:var(--bg), border-bottom:.5px solid var(--sep); under iOS the chrome layer is glass (--glass-bg + backdrop-blur). Buttons r7 on --fill. | EditorToolbar (editor-toolbar.tsx) is opaque bg-[#16161a] + border-[#2a2a30] 1px, no glass/hairline — a flat VS-Code panel sitting directly under the shell's glass nav bar. |
-| MED | Tab strip + status bar surface (§4 hairline --sep) | Chrome layers use glass fill + .5px --sep hairline; muted text = --label2. | TabStrip + StatusBar are opaque #16161a with 1px border-[#2a2a30]. Note the ACCENT layer is already correct: active tab uses border-t-primary and the dirty dot / Save button use --primary (tint). Only panel bg + border + muted text (#9aa0aa/#7d8590) are hardcoded hex. |
-| MED | Touch targets (HIG 44pt; SSOT switch 47×29, Done 44) | iOS min hit target 44pt; the shell's own Done is h-11. | Save/Preview are size=sm (~h-8/32px), tab row min-h-9 (36px), new-file + is w-8 (32px). Partial coarse handling exists ([@media(pointer:coarse)]:size-9 = 36px on the explorer + tab-close buttons) but nothing reaches 44pt. |
-| LOW | Destructive confirm (§3.3 sheet / real-iOS action sheet) | iOS presents save/discard/cancel as a bottom action sheet (rounded-top 20px + grabber). NewFileModal already gets this free via FormDrawer→Drawer rounded-t-[1.25rem]. | CloseGuardDialog (close-guard-dialog.tsx) uses raw shadcn AlertDialog directly, so on iOS it is a CENTERED modal, not a bottom sheet — the one modal that skipped the responsive primitive. |
-| LOW | Muted text + empty-state tokens (§1.1 label2 / §3.7) | Muted text = --label2; empty state = centered column, 15px --label2, optional MUTED glyph, ~70px pad. | Muted text is hex (#9aa0aa/#7d8590). Empty state already MATCHES the §3.7 shape (centered, text-[15px], glyph above, New-file button, muted subtitle) but uses hex colors and a vivid blue gradient glyph instead of a muted one. Near-parity. |
-
-**Steps:**
-1. Add the iOS seam: const isIos = useActiveShell().id === 'ios' in app.tsx (import from @/features/os-shell), and thread an `ios` boolean prop into EditorToolbar, TabStrip, StatusBar. Pure enabler — no visual change until steps 2-4 read it; gives every later change a clean else-branch. — `/home/rahman/projects/mso/frontend/slices/code-editor/app.tsx` *(~12)*
-2. iOS 'dark-glass' chrome: when `ios`, swap panel bg-[#16161a]→bg-[var(--glass-bar)] backdrop-blur-xl, borders border-[#2a2a30]→border-[var(--sep)] (.5px hairline), muted text #9aa0aa/#7d8590→text-muted-foreground, via conditional cn(). Keep the exact current hex classes in the else. Leaves the dark aesthetic but makes the chrome a translucent hairline layer under the shell nav bar (§4). Do NOT touch EditorSurface. — `editor-toolbar.tsx, tab-strip.tsx, status-bar.tsx (all under .../code-editor/components/)` *(~35)*
-3. 44pt touch targets on iOS: gate additional size bumps on `ios` — Save/Preview →h-11, tab row →min-h-11, new-file + →size-11, tab-close →size-11. Reuse the existing cn() class lists; append ios-only variants so the coarse-pointer classes (which also hit Android) are not widened. — `editor-toolbar.tsx, tab-strip.tsx` *(~10)*
-4. CloseGuardDialog → bottom sheet on iOS: when `ios`, render via FormDrawer (ResponsiveDialog variant='alert') so it becomes the rounded-top-20px bottom drawer with grabber; keep the raw AlertDialog branch for non-iOS. Gate on id==='ios' (NOT the primitive's own useIsMobile) so Android stays on the centered dialog. — `close-guard-dialog.tsx` *(~20)*
-5. OPTIONAL / fold-in: in the same iOS branch move empty-state + status text off hex (text-muted-foreground) and mute the empty-state glyph. Low value — the empty state already matches §3.7 shape; skip if not doing a token pass. — `app.tsx (empty state), status-bar.tsx` *(~8)*
-
-**Guard (android/windows/dashboard):** Confirmed the code-editor mounts the identical WindowContent→app.tsx in every shell (MobileShell and android-shell both render <WindowContent app={top.app}>), so any component edit hits all 5 shells unless gated. Seam: every step branches on useActiveShell().id === 'ios'; the else path is the current markup verbatim → android (id==='android'), windows, dashboard, macos all take the unchanged branch = byte-identical. Critically gate on id==='ios', NOT surface==='mobile' (would also catch Android) and NOT useResponsive()/useIsMobile() (viewport — catches Android + narrow desktop). The shell chrome itself (iOS glass nav bar/Done/home-indicator in mobile-shell.tsx; Android nav bar in android-shell.tsx) lives outside the slice and is never touched.
-
-**Essence / skips:** VPS-essence: (1) No fabricated hardware — the StatusBar shows only real editor telemetry (Ln/Col, Spaces, Save/dirty, lang badge); no battery/wifi/clock/signal is present and no step adds any. (2) Host-I/O data layer untouched — lib/host.ts (re-exports useOsApi/FsEntry/inspector) + FileTree + use-editor.ts route all file reads/writes; every step is presentation-only (chrome material, hit targets, sheet routing) and touches none of them. (3) Editor engine untouched — EditorSurface (transparent-textarea-over-highlighted-pre, monospace 12.5px fixed metrics, gutter, VS-Code Dark+ token palette) stays #1e1e22 + token-colored per the task ('don't restructure the engine') and the slice's documented audit-allow-hex dark-editor design. Deliberately-skipped Notes patterns (don't fit a code cockpit): rich-text B/i/U/list format bar (code is plain text; 'formatting' = automatic syntax highlighting via the highlight engine + lang badge); prose title input 25/700 + centered date (code files are named in the TabStrip, not a prose title); contentEditable 16.5px/1.55 body (the code surface must stay monospace for caret/token/gutter alignment); grouped-list note sidebar + search pill (the left pane is a filesystem TREE backed by host data — converting it to a Notes grouped list would misrepresent the FS and reach into the data layer). Also skipped: wholesale LIGHT-token conversion — the slice is intentionally dark, so the recommendation is 'dark glass' (--glass-bar + --sep hairline + the tint accents that already conform) rather than a light chrome that would clash with the dark code body.
-
-#### 14. `media-viewer-picker` — parity: **close** · ref: Photos.dc.html + Music.dc.html
-**Surface:** iOS Quick-Look image lightbox + audio now-playing + video player (media-viewer, maps to Photos lightbox + Music now-playing); image-editor host (media-studio, no mock — delegates to @/features/image-editor); utility image-chooser modal (image-picker, no mock — embedded in other apps).
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| HIGH | audio now-playing layout | Music.dc.html: full-screen CENTERED column — 236x236 r16 gradient art w/ 78px note glyph + big shadow; title 22/700, artist 16 in --tint, album 13 --label2; scrubber; transport row gap:34 (skip-back 30 + 64px round FILLED-tint play w/ shadow + skip-fwd 30). | audio-player.tsx: compact LEFT-aligned card (max-w-lg rounded-2xl bg-card/80 backdrop-blur) — 56px (size-14) accent-tinted icon tile + title(base)/meta(xs) inline; 72-bar waveform; TransportBar w/ small 32px translucent-ghost play (bg-foreground/10) + shadcn Slider. Same shape on every shell. |
-| MED | primary play / transport control | 64px round FILLED --tint button, drop-shadow, flanked by 30px skip-back/skip-fwd glyphs; play is the visual anchor of the screen. | transport.tsx PlayButton — 32px (or big=64px) round but always translucent GHOST (bg-foreground/10 or bg-background/40), never filled-tint; no skip-back/fwd controls in the audio/video transport. |
-| LOW | audio art tint (color role) | audio art uses the warm audio-tile system gradient (#ff6a9a->#f52d55) / per-track npGrad — a fixed category color, NOT the user tint (SSOT §4.5 reserves --tint for interactive only). | audio icon tile uses the blue user tint: bg-[var(--accent)]/15 text-[var(--accent)] — mis-assigns the interactive tint to decorative art. |
-| MED | image lightbox immersion | Photos photoOpen overlay: immersive rgba(0,0,0,.95) backdrop; centered image card r16 + shadow 0 30px 80px; flanked by 40px circular translucent prev/next; top bar centered title 15/600 + date 12. | media-stage.tsx: checkerboard (transparent) or flat #0c0d10 stage inside AppFrame; prev/next are small ghost chevron icon-buttons in the top ViewerToolbar; no immersive black, no circular nav. (Toolbar also carries real cockpit fns: zoom, download, open-in-editor — intentionally richer than the mock.) |
-| LOW | picker tab strip vs segmented control | iOS segmented control: track --fill r9 pad2; options pad7x4 r7 14/500; selected = --card fill + shadow raised pill. | image-picker-dialog.tsx: underline-row (border-b) of rounded-md px-3 py-1 text-xs buttons; selected = bg-accent. Reads as web tabs, not an iOS segment. Utility dialog, not a primary iOS screen. |
-| LOW | modal presentation (dialog vs sheet) | SSOT §3.3: on iOS a modal presents as a rounded-top(20px) SHEET — solid --elev, 36x5 grabber, medium/large detents, dimmed scrim. | image-picker (Dialog) + media-studio SaveImageDialog/close-confirm (AlertDialog) are raw shadcn centered modals on every surface. NOTE: sheet-ification switches on useIsMobile() (mobile-wide) so it would also change Android — not cleanly iOS-scoped. |
-| LOW | large-title collapse / nav | SSOT §3.9: 32/800 large title collapsing to 22/700 glass nav on scroll. | MobileShell paints only a static 16px app-title nav (deliberate shell decision: 'apps carry no in-content large title'). Shell-owned chrome, not these slices. |
-
-**Steps:**
-1. iOS now-playing for audio (highest-value gap). Add `const ios = useActiveShell().id === 'ios'` and, when ios, render the Music-mock centered column: ~min(220px,70vw) rounded-2xl gradient art tile w/ Music glyph, centered title text-[22px]/700 + artist text-primary + meta --muted-foreground, then the transport. Keep the existing card branch untouched for every other shell. Extract an ios-now-playing.tsx sibling to stay <200 lines. — `slices/media-viewer/components/audio-player.tsx (+ new components/ios-now-playing.tsx)` *(~70 (new sibling) + ~10 (branch))*
-2. Add a filled-tint prominent play variant to PlayButton (size-16 rounded-full bg-primary text-primary-foreground shadow-lg) and flank it with lucide SkipBack/SkipForward (already used in reel-editor) at the iOS now-playing call site. Add the variant alongside — do NOT modify the existing default/`big` ghost variants (video-player + desktop keep them byte-for-byte). — `slices/media-viewer/components/transport.tsx` *(~20)*
-3. Fold the audio-art color fix into Step 1: on the iOS branch use the fixed warm audio gradient (e.g. linear-gradient(135deg,#ff6a9a,#f52d55)) for the art tile instead of the blue --accent tint (fixed category color = accepted MSO exception; matches SSOT audio-tile system color). Non-iOS tile unchanged. — `slices/media-viewer/components/ios-now-playing.tsx (from Step 1)` *(~2)*
-4. OPTIONAL / med — iOS immersive image lightbox. When ios && kind==='image', swap the checkerboard for bg-black/95, center the image r16 + shadow-[0_30px_80px_rgba(0,0,0,.6)], and render 40px circular translucent prev/next (thread onPrev/onNext down from SampleGallery — they currently live in ViewerToolbar). Non-iOS keeps checkerboard + toolbar arrows unchanged. Consider keeping the checkerboard even on iOS for TRANSPARENT images (more honest) and scoping black-immersion to opaque/remote only. — `slices/media-viewer/components/media-stage.tsx, image-view.tsx, app.tsx (prop threading)` *(~55)*
-5. DELIBERATE SKIP (document, no edit) — do NOT sheet-ify image-picker/media-studio dialogs or rebuild the picker tab strip as a segmented control here. Sheet presentation is mobile-wide (useIsMobile) and would change Android too; it belongs to the shared ResponsiveDialog/FormDrawer primitive as a separate cross-shell task, not an iOS-scoped edit inside these utility components. Also skip the Photos album-browser + photo-grid (that is the Files app's domain). — `(none)` *(0)*
-
-**Guard (android/windows/dashboard):** Every actionable step reads useActiveShell() from the @/features/os-shell barrel (already the sole import source for these slices — barrel-only rule satisfied; no new dep) and gates NEW markup behind id === 'ios'. android (id==='android'), windows, dashboard and macOS all fall through the existing else branch, so their rendered output is byte-for-byte the current code. No shared primitive is edited in place: AppFrame, shadcn Slider/Dialog/AlertDialog, and transport's default/`big` ghost variants are left as-is — iOS variants are ADDED alongside (new prominent PlayButton variant, new ios-now-playing.tsx sibling). This is the identical seam os-settings/app.tsx and files-manager/app.tsx already use to branch layout per shell. Because a container-width query alone would also catch Android phones, useActiveShell().id==='ios' is the required scoping mechanism (not a media query).
-
-**Essence / skips:** VPS-ESSENCE: (1) No fabricated hardware anywhere — the now-playing carries no battery/wifi/cellular/clock/signal (that is the shell status bar's job, untouched). (2) DATA layer stays sealed: RemoteView keeps streaming real bytes via rawUrl()->/api/v1/fs/raw (lib/host.ts seam) and remote video/audio keep native <video controls>/<audio controls>; every proposed change is presentation-only (art-tile shape/color, play-button geometry, stage background) — no src/host-I/O is touched. (3) Album art is a gradient placeholder + note glyph, which is EXACTLY what the Music mock itself does (npGrad + #g-note) — a VPS box has no cover-art store, so this is faithful, not a fabrication; simulated usePlayback stays scoped to offline SAMPLES only. DELIBERATE SKIPS: (a) Photos album-list + photo-grid library browser — that is the Files app's domain; media-viewer is the *viewer* Files hands off to, so it matches only the lightbox, we do not rebuild a library grid. (b) Large-title-collapse (SSOT §3.9) — shell-owned chrome that MobileShell deliberately omits ('apps carry no in-content large title'); can't be added from these slices without touching shared shell chrome. (c) Dialog->sheet + segmented-control tabs for image-picker/media-studio — mobile-wide (touches Android), belongs to the shared ResponsiveDialog primitive, out of scope for an iOS-only slice. media-studio has effectively no iOS surface of its own (it delegates to @/features/image-editor, which already reflows via its `compact` prop), so it needs no iOS-scoped work.
-
-#### 15. `editors-misc` — parity: **close** · ref: shared chrome + Sandbox.dc.html
-**Surface:** Five apps living inside the iOS shell's app-pane (shell supplies status/notch zone, the nav bar = app-icon + title + Done frosting-on-scroll, and the home indicator): image-editor (Konva canvas + top command bar + compact bottom-sheet tabs), reel-editor (video canvas + menu/toolbar + compact tabbed panes + Settings/Render modals), create-app (form app), quicklinks (favourites/shortcut grid), and auth (pre-shell lock + device-approval gate). Mock ref = shared iOS chrome + Sandbox.dc.html's "mount your component, it inherits the chrome/accent/device" model.
-
-| Sev | Aspect | Mock / SSOT | Ours today |
-|---|---|---|---|
-| MED | editor bottom safe-area (home indicator) | iOS reserves a 34px home-indicator zone; the shell already raises --sai-bottom to calc(env+34px) inside the app <main> and overlays the pill at absolute bottom-0, so app content must pad var(--sai-bottom) to not hide under it. | image-editor compact bottom-sheet pads --sai-bottom ONLY in the Layers tab (layers-footer.tsx); Props/Adjust/Effects/Export/AI tabs use bare <ScrollArea> and reel-editor's CompactPanes (the bottom-most compact element) has ZERO --sai-bottom usage — last row/controls sit under the 34px pill. |
-| MED | reel Settings modal — sheet vs centered dialog | iOS presents preferences as a bottom SHEET: rounded-top ~20px (top corners only), SOLID --elev fill (never glass), 36x5 r2.5 grabber, medium detent, safe-area bottom. | settings-dialog.tsx uses the shared centered shadcn Dialog (max-w-sm, screen-centered, no grabber, no top-rounded sheet) — correct on desktop, un-iOS on a phone. |
-| MED | create-app form — grouped inset list vs flat form | iOS forms = grouped inset list: --card cells at 12px radius, .5px --sep hairlines inset margin-left:16px, 11px 16px rows / min-h 46px, on a grouped page background. | app.tsx renders flat Field (label+control) rows stacked with space-y-5 directly on the window --surface; no grouped cards, no hairlines, no grouped page bg. (Partial-fit: the Glyph grid + manifest code-block don't map onto list rows.) |
-| LOW | segmented-control selected state | iOS segmented: --fill track r9 pad2, option pad7x4 r7 14/500, selected = raised WHITE/--card pill + shadow. | shared components/ui/segmented.tsx selected = TINT-filled (bg-primary text-primary-foreground) pill on bg-secondary track — used by create-app's Runtime picker. |
-| LOW | editor internal toolbar material/metrics | iOS top format toolbar (Notes-style) = solid --card, 44pt touch targets, tint only for active/interactive. | image TopBar (h-12 bg-card, tint-correct — good) but reel Toolbar uses translucent bg-background/60 (faux-glass over content, breaks Golden Rule 2) and size-8 (32px) icon buttons under the 44pt target on the non-coarse path. |
-| LOW | auth lock/approval screen | iOS Lock Screen / passcode / device-approval sheet feel. | login-screen.tsx = centered glass card (rounded-2xl bg-card/80) full-screen over wallpaper; device-approval (pending + copy device-id) flow is solid. Reasonable but generic, not iOS-lock-shaped — AND unscopable to iOS (see guard/essence). |
-
-**Steps:**
-1. Honor the home indicator in image-editor's compact bottom sheet: add [padding-bottom:var(--sai-bottom)] to the shared ScrollArea tab panels (Props/Adjust/Effects/Export) and to the AI panel's own scroll foot so their last row clears the 34px pill, matching what Layers already does via layers-footer. No shell branch needed — the var is 0 off-iOS. — `/home/rahman/projects/mso/frontend/slices/image-editor/components/mobile-shell.tsx (+ verify panels/ai-panel.tsx bottom, panels/export-panel.tsx)` *(~4-8 LOC)*
-2. Honor the home indicator in reel-editor's compact layout: pad the CompactPanes bottom (the bottom-most compact element per reel-panes.tsx) by var(--sai-bottom). Same var-is-the-seam property (0 elsewhere). — `/home/rahman/projects/mso/frontend/slices/reel-editor/components/compact-panes.tsx` *(~2-4 LOC)*
-3. On iOS only, present reel Settings as a bottom sheet: gate on useActiveShell().id==="ios" (import from @/features/appshell) — render the SAME fields inside a rounded-top-[20px] solid bg-popover/--elev sheet with a 36x5 grabber, medium height, pb var(--sai-bottom); reuse the existing appshell share-sheet primitive or a minimal inline one. Non-iOS keeps today's Dialog byte-for-byte. — `/home/rahman/projects/mso/frontend/slices/reel-editor/components/settings-dialog.tsx` *(~25-45 LOC)*
-4. On iOS only (useActiveShell().id==="ios"), wrap create-app's row-shaped fields (Name/Runtime/Entry/Accent) in a grouped inset card — bg-card rounded-xl (12px), .5px --sep hairlines inset 16px, ~11px 16px rows — on a --surface/muted grouped page; keep Glyph grid + manifest code as separate labelled sections (named non-fit). Uses existing tokens (--card/--surface/--sep), no new --grouped token. Non-iOS branch renders today's flat form unchanged. — `/home/rahman/projects/mso/frontend/slices/create-app/app.tsx (+ optional components/ios-form.tsx to stay <200 lines)` *(~40-70 LOC)*
-5. OPTIONAL/low: give the Segmented selected option an iOS white-raised-pill look scoped to iOS — add a stable data-attr (e.g. data-seg) to the shared primitive, then a [data-shell="ios"] block in globals.css overriding selected to bg-card/shadow on a --fill r9 track. The [data-shell="ios"] scope by construction cannot match android/windows/macos/dashboard. — `/home/rahman/projects/mso/app/globals.css (+ 1 attr in /home/rahman/projects/mso/components/ui/segmented.tsx)` *(~8-14 LOC CSS + 1 attr)*
-6. OPTIONAL/low: on iOS, make the reel Toolbar solid (--card instead of bg-background/60, per Golden Rule 2 no faux-glass-over-canvas) and bump its icon buttons to a 44pt target. Gate on useActiveShell().id==="ios" or fold into a [data-shell="ios"] CSS override. — `/home/rahman/projects/mso/frontend/slices/reel-editor/components/toolbar.tsx` *(~4-8 LOC)*
-
-**Guard (android/windows/dashboard):** Two iOS-only seams, both proven available to these apps because Surface (frontend/slices/appshell/components/desktop.tsx) sets data-shell={id} AND wraps children in <ActiveShellProvider>: (1) React useActiveShell().id===\"ios\" (imported via the @/features/appshell barrel — the exact seam os-settings uses) for structural branches (steps 3,4,6) — the non-iOS branch renders today's tree byte-for-byte, so macOS/Windows/Dashboard/Android are unchanged; (2) [data-shell=\"ios\"] CSS (step 5) — android/windows/macos/dashboard are sibling selectors that cannot match. Steps 1-2 don't even need a branch: they only ADD padding by var(--sai-bottom), which the iOS shell raises to 34px inside its own <main> but which stays 0 on every other surface (no home indicator), so those personas are numerically unchanged. Critically, NONE of these edits touch the shared appshell chrome (mobile-shell.tsx/desktop.tsx), the shared window store, or android/windows/dashboard shell code — every file is inside the target slices, plus one scoped globals.css block. The compact-detection the editors already use (useIsMobile/useContainer) is left alone; iOS-only work is gated on the shell seam, never on `compact` (which would leak to Android and to narrow desktop windows).
-
-**Essence / skips:** VPS-essence: no step fabricates hardware (no wifi/battery/cellular/brightness/clock/signal) — the iOS status bar/notch/home-indicator come from the shell wrapper, not these apps. The image-editor Konva stage and the reel PreviewStage/Timeline canvases are untouched (task's do-not-restructure-canvas). Host-I/O stays routed: create-app persists via createApp()/Convex, quicklinks via the quicklinks store, image/reel file ops via lib/host FilePicker — none altered. Deliberate skips: (1) AUTH login/splash — the biggest honest gap, but AuthGate renders BEFORE Surface mounts, so neither data-shell nor ActiveShellProvider is in scope; restyling it to an iOS Lock Screen would apply universally, including to the Android mobile persona and desktop, violating byte-unchanged. iOS lock pattern is named-and-skipped; the device-approval flow already reads well. (2) reel Transport's dark canvas chrome (bg-black/35, white text, audit-allow-hex) is editor-canvas over the video stage, not theme UI — left as-is. (3) quicklinks is NOT converted to the app-icon 23% superellipse: a rounded-rect favicon tile (rounded-2xl) with group-hover scale-105 is already the correct iOS favourites-grid analog, and its forced bg-white is an accepted fixed-color exception for favicon legibility — quicklinks is effectively at parity, no work invented. (4) Sheet drag-to-detent is out of scope — the SSOT itself notes the mock never implements detents; step 3 targets a static medium-height iOS sheet, not a draggable detent contract.
-
----
-
-## 5. Phasing & sequencing
-
-Ordered by leverage and the owner's "start from settings" directive. Each phase is independently
-shippable and screenshot-verified before the next.
-
-| Phase | Scope | Why here | Exit criteria |
-|---|---|---|---|
-| **P0 — Systemic foundations** | §3 S1 (iOS Switch/Segmented) · S2 (Reduce-Transparency `.glass`) · S3 (glass tokens `--glass-hi`/`--glass-stroke`/`--grouped`) | one shared-layer fix each unblocks many slices; all `[data-shell="ios"]`-scoped so zero risk to other shells | iOS switch green + white segmented pill; RT collapses all glass; other 4 shells byte-identical (Playwright per-persona) |
-| **P1 — Settings** *(owner's start)* | shell-settings primitives (typography/card/hairline, iOS CSS) · os-settings sections (large title 32/800, index hairline/height) | user named it; primitives feed every Settings screen; lands on P0's controls | iOS Settings = grouped white cards, 32/800 title, green switches, white segments; macOS/Windows/Android Settings unchanged |
-| **P2 — Shell chrome** | shell-frame (centered nav title + glass recipe) · springboard (dock glass token + metrics) · system-surfaces (CC grabber, NC token, Spotlight mobile layout) · widgets (picker copy + iOS sheet, Today 32/800) | the frame every app sits inside; mostly iOS-exclusive-by-mount (no branch) | nav title centered/600, dock frosts in dark, Spotlight top-anchored on phone, Today picker truthful |
-| **P3 — Apps** | files-manager · system-monitor · app-store · browser · assistant · code-editor · media-viewer-picker · editors-misc · os-terminal | each adds/uses the `id==='ios'` seam; the 4 *diverges* slices live here | per-app: iOS grid/list, killed double-titles, glass address bar, iMessage bubbles, dark-glass editor chrome; all other shells unchanged |
-| **P4 — Polish + ratify skips** | empty states, accent-swatch look, terminal (recommend no-op), toast placement | low-value tail; some deliberately skipped | §6 skip list ratified in-code with `ponytail:` comments |
-
-**Budget rules:** no new deps (hard); every shared-primitive edit re-verified on **all five** shells;
-`typecheck` + `eslint` + full vitest green per phase; build-then-`systemctl restart` on deploy; ≤200
-lines/file (three files already breach — `mobile-shell.tsx` 245, `spotlight.tsx` 183, `chat-panel.tsx`
-217 — the relevant steps *extract* to fix this, not worsen it).
-
----
-
-## 6. Consolidated essence skips — the do-NOT-build list
-
-Every agent independently confirmed these. They are **deliberate**, not gaps — ratify with a
-`ponytail:` comment where the code makes the choice:
-
-1. **No status bar.** Clock / wifi / battery / cellular / signal / brightness are fabricated hardware.
- Reserve the notch zone (`--sai-top`), paint nothing. *(mobile-home.tsx already documents this.)*
-2. **Dynamic Island stays functional-only** — a live-activity pill that renders when an app reports an
- activity, never a decorative idle black notch pill.
-3. **Control Center = real toggles only** — no brightness/volume/wifi/airplane/AirDrop modules (no
- such hardware on a headless VPS).
-4. **No cross-app nav contract.** The Files floating tab bar and per-app nav trailing actions
- (share/compose/trash) need a shell↔app tab/action contract; mso apps surface actions in their
- own in-content toolbars. Skip *(system-monitor's optional nav-action slot is the one place to
- revisit if wanted)*.
-5. **Files "search" filters loaded entries client-side** — never a dead cosmetic pill, never a new
- host query. The DATA layer (`lib/host.ts`, `use-files*`, zip/upload/inspector) is sealed.
-6. **Don't restructure editor canvases** — Konva stage, reel timeline/preview, xterm PTY output stay
- as-is; only their surrounding chrome aligns.
-7. **Keep the AA-contrast departures** — `SettingsActionRow` uses `--info`/`--destructive-text` (AA-safe)
- not the raw iOS tint-as-text (~3:1); the accent-swatch keeps its `Check` glyph (a11y over pixel
- parity). Both are *more* correct than the mock.
-8. **Never globally retune Switch/Segmented** — Android (Material) and Windows (Fluent) want
- accent-colored controls; the iOS look is `[data-shell="ios"]`-scoped only.
-9. **Consumer apps stay out of scope.** The mock's Mail / Maps / Messages / Music / Photos are
- portfolio apps a VPS cockpit doesn't have — we harvest their *chrome patterns* (bubbles, now-playing,
- grid tiles, address bar) for our real apps, never port the apps.
-
----
-
-## 7. Verification protocol (per slice)
-
-1. **Screenshot on prod `:4005`** via the Playwright harness (`os-browser`), seeded `sv:shell` to the
- iOS surface (`{mobile:"ios"}`) at 390px — the exact iOS surface the diff targets.
-2. **After any SHARED-primitive edit** (Switch/Segmented/`.glass`/tokens): re-seed and screenshot
- **android + windows + dashboard + macOS** too, confirming byte-identical chrome (the guard's whole claim).
-3. `pnpm typecheck` + `eslint` clean; **full vitest green** (currently 682).
-4. `pnpm build && sudo systemctl restart mso.service`; health-check root 200.
-5. Ship per the auto-ship flow (stage only the touched slice files; `fs-zip` WIP + `mock-os/` import stay unstaged).
-
----
-
-## 8. Progress log
-
-Live tracking of execution against §5. `✅ shipped` = deployed to `:4005` + verified + pushed.
-
-### P0 — Systemic foundation · ✅ shipped 2026-07-15
-- **S1 · iOS Switch + Segmented** (`[data-shell="ios"]` CSS in `globals.css` + inert attrs). Switch ON = system-green `#30d158`, **47×29** track + **25px** knob (`translateX(20px)`), OFF = `--fill2`. Segmented selected = raised **`--card` white pill** (not tint fill — Golden Rule 5) at 14px/500 on a `--fill` r9 track. Added `data-slot="segmented"/"segmented-option"` + `data-selected` to `components/ui/segmented.tsx` (render-inert).
-- **S3 · tokens** — added `--grouped` / `--fill` / `--fill2` / `--glass-hi` / `--glass-stroke` (light + dark) to `globals.css`. Inert until referenced (S1 uses `--fill`/`--fill2`/`--card`; the grouped-page + glass-edge land in P1/P2).
-- **S2 · Reduce-Transparency** — Control Center + Dynamic Island swapped fixed `backdrop-blur-xl`/`backdrop-blur` → the `.glass` helper (reads `var(--blur)`, so `.reduce-glass` collapses it). **Deferred:** NC blur-bypass → P2 (entangled with NC surface tokenization); browser/code-editor blur → P3.
-- **Deferred from P0:** the broad `[data-shell="ios"] .glass` inner-highlight edge — an inset `box-shadow` clobbers existing `shadow-*`; it lands per-surface as an opt-in class in P2/P3.
-- **Verified** (Playwright `:4005`, seeded dark): iOS switch ON `rgb(48,209,88)` 47×29 knob 25 @translateX20; iOS segmented sel = neutral `--card` 14px; **Android segmented sel = accent `oklch(.57 .13 …)` 10.5px — byte-unchanged** (the `[data-shell="ios"]` scope holds). `typecheck` + `eslint` clean; build + `systemctl restart`, root 200.
-
-### P1 — Settings · ✅ shipped 2026-07-15
-- **shell-settings primitives** (portable slice; iOS look via `[data-shell="ios"]` CSS + inert `data-slot` — signatures byte-stable, portability contract held): row label **16/500**, value **15**, section-title **13**, footnote **12.5/inset-16/lh-1.42**; borderless `settings-card` + `--grouped` `settings-pane`; 0.5px `--sep` hairline inset to **16px** (unifies primitive rows + the index). `data-slot` added to `section/row/block/action-row`.
-- **os-settings sections** (`id==='ios'` branches in `sections.tsx`): iOS large title **32/800/-0.02em** (Android keeps 26px); index rows min-h-46 py-11, hairline→16px, chevron 15px, borderless card, 18px gaps, pane→`--grouped`.
-- **Verified** (Playwright `:4005` dark): iOS About title = **32px / 800 / -0.64px**, label 16px, value 15px, pane `#000`, index hairline 16px; **Android index unchanged** (hairline 3.5rem/49px, pane `bg-muted`, chevron 18px). Screenshot = grouped cards on the black page + colored tiles + large title = authentic iOS System Settings. `typecheck`+`eslint` clean; build+restart, root 200.
-
-### P2a — Shell frame + Springboard · ✅ shipped 2026-07-15
-- **shell-frame** (`mobile-shell.tsx`, iOS-exclusive by mount): app nav bar rebuilt iOS-style — title **centered** (`centerX 201 = vw/2`), weight **600** (was `<strong>` 700), 16px, in a 46px band below the notch; leading app-icon + trailing Done **absolute** (never shift the centered title); frost swapped `backdrop-blur-xl`→`.glass` (honors `var(--blur)`/Reduce-Transparency + saturate).
-- **springboard** (`mobile-home.tsx` / `-parts` / `app-library-parts`): dock fill hardcoded white `.18` → theme-aware **`var(--glass-bar)`** + inner top-highlight (`--glass-hi`) + soft float shadow + hairline; grid label 11→12px, icon cap 62→58px; App-Library well raw rgba → `var(--glass-panel)` + `.glass`.
-- **Verified** (Playwright `:4005` dark): nav `Terminal` fw 600 centerX 201/402; dock bg `oklab(.27 / .62)` = `--glass-bar` + inset highlight + drop shadow. Screenshots = centered nav + floating frosted dock. All files iOS-exclusive-by-mount → zero cross-shell risk. `typecheck`+`eslint` clean; build+restart 200.
-
-### P2b — System surfaces + widgets · ✅ shipped 2026-07-15
-- **Notification Center** (`mobile-notifications.tsx`): raw `rgba(20,22,38,.62)` + inline `blur(28px)` → token **`--glass-nc`** + the `.glass` helper (now honors `var(--blur)`/Reduce-Transparency). Kept dark-over-wallpaper (iOS NC is dark in both themes). **Completes S2** — CC + DI + NC all honor `--blur`.
-- **Spotlight** (`spotlight.tsx`, `id==='ios'` branch): iOS = top-anchored (below notch) + full-width; input → a `--fill` systemFill pill with a leading search glyph. Desktop keeps the centered `max-w-xl` palette byte-for-byte.
-- **widget-picker** (surface-branch): phone copy fixed — "Desktop widgets"→**"Add Widget"**, dropped the "drag on the desktop" line, "Show desktop widgets"→"Show widgets".
-- **Today** (`mobile-widgets.tsx`): heading 18/700 → **28/800/-0.02em** large title.
-- **Verified** (Playwright `:4005` dark): Spotlight pill bg `--fill` + glyph + top 19px (was ~152); Today 28px/800; picker "Add Widget" + truthful desc; NC dark glass. `typecheck`+`eslint` clean; build+restart 200. iOS-exclusive-by-mount / `id==='ios'`-gated (Spotlight desktop branch untouched).
-- **Deferred to P4 (share one pattern):** the dialog→bottom-sheet conversions (widget-picker, reel Settings, code-editor close-guard, image-picker); CC/dock glass inner-edge opt-in; widget layered-glass + empty state.
-
-### P2 — Shell chrome · ✅ COMPLETE (P2a + P2b)
-
-### P3 — Apps · 🟡 in progress
-**P3a — Monitor + App Store double-title · ✅ shipped 2026-07-15.** Both apps rendered their OWN in-content title header ON TOP of the shell nav's app title = double title on iOS. On `id==='ios'`: dropped the redundant in-content icon+title, kept controls — **system-monitor** = slim chip(cores)+Refresh row; **app-store** = count + search field → borderless **`--fill` systemFill pill**. Desktop/other shells keep the full header (`!ios` branch = today's markup). Verified: each shows ONE title (the nav), store search `border:0` bg `--fill`. *Note: the app-store agent's "large-title" step was deliberately NOT taken — our shell nav ALWAYS shows the app title (unlike the mock's collapse-into-nav), so an in-content large title of the same text = the double-title we're removing. Full large-title-collapse = a shell-frame rearchitecture, noted for later.*
-**P3b — files-manager (partial) · ✅ shipped 2026-07-15.** Presentation-only (data layer sealed). iOS grid **folders now the fixed system folder-blue `#57b3ff`** (was the user accent) via a threaded `ios` prop (app→file-view→file-item) — verified **47/47** folder icons = `rgb(87,179,255)`; empty state "Drop files…"→**"No Items"** 15px on iOS. *Deferred to **P3b-cont** (bigger/structural): iOS toolbar slim-down (dense desktop bar → back-chevron + segmented + New — needs a new file), in-content folder-name large title, name-pill selection, Browse search pill.*
-**P3c — assistant Messages bubbles · ✅ shipped 2026-07-15.** iOS (`id==='ios'`, gated in the leaf components): composer → iMessage **pill** (`--fill` bg, 20px radius, `--sep` border) with the send FAB **nested inside** as a 30px `--tint` circle (ArrowUp, was a 36px square); bubbles → **19px**, tail at the **bottom** corner (user `br-6`, assistant `bl-6`), **15px/1.35**, **no per-bubble avatar** (iMessage has none in-thread), received bubble = `--fill2` gray; inter-bubble gap 16→**6px**. Verified: pill `--fill`/20px, FAB 30px circle, user bubble tl/tr 19 br 6 fs 15. Desktop unchanged (`!ios`/else); LIVE banner + approve-per-call gate untouched.
-**P3c-cont — browser Safari chrome · ✅ shipped 2026-07-15.** `id==='ios'` seam in app.tsx. The dense Chrome-style chrome (tab strip + 4-button omnibar + bookmark bar) collapses to iOS Safari: a **single glass address bar** with ONE **centered URL pill** (h38 r11 `--fill`, lock/globe + centered url + Star) — verified pill bg `--fill`, radius **11px**, text-align **center**, placeholder "Search or enter website". Desktop tab strip (`header={ios?undefined:TabBar}`) + bookmark bar (`{!ios && …}`) dropped on iOS; inline nav (back/fwd/reload/home) moves to the ⋯ menu. iOS bar extracted to `omnibar-ios.tsx` (omnibar.tsx → thin dispatcher, both <200 LOC). RemoteView page content + all data hooks untouched. Desktop keeps the full `OmnibarDesktop`.
-**P3d — code-editor 44pt + editor safe-area (partial) · ✅ shipped 2026-07-15.**
-- **code-editor** (`editor-toolbar`, `tab-strip`): touch targets bumped to a TRUE **44px** on coarse pointers (Save/Preview/Explorer/close/new-file/tab-row) — verified **44/44/44/44**. **Gotcha:** `size-11`/`h-11` = **38.5px** here, NOT 44 — the app root is 14px (`2.75rem`=38.5), so used fixed `[44px]`. The VS-Code-dark hex chrome is KEPT (`audit-allow-hex`-sanctioned deliberate palette — tokenizing it would break the coherent editor look; it is not a Notes-light surface).
-- **image-editor + reel-editor**: compact bottom-sheet panels (Props/Adjust/Effects/Export + reel panes) now pad `var(--sai-bottom)` so their last row clears the home indicator (Layers already did; the siblings didn't).
-- **os-terminal**: no change — the diff's own recommendation (nav inherited from the shell, notch/home-indicator already handled via `--sai-top`/`--sai-bottom`, `--font-mono-ui` already names SF Mono).
-- **Deferred to P3d-cont:** media now-playing (Music-mock centered column, new component) + audio-art color; create-app grouped inset card; code-editor close-guard→sheet (P4 batch).
-**P3b-cont — files-manager toolbar · ✅ shipped 2026-07-15.** The dense desktop Finder toolbar (sidebar-toggle + back/forward + breadcrumb + grid/list + sort + paste + new + download + upload) collapses on `id==='ios'` to a slim iOS bar: **tint back chevron + path + iOS grid/list segment + one `+` overflow menu** (New/Upload/Paste/Download/Sort consolidated). In-place early-return in files-toolbar.tsx (185 LOC, no new file); `ios` threaded app→FilesHeader→FilesToolbar. Verified: back+segment+`+` present, standalone Sort/Upload buttons gone. Desktop keeps the full bar. Data flow untouched. **Files iOS story now complete** (folder-blue + slim toolbar).
-- **Remaining (long-tail, lower ROI):** media now-playing (new component, low-freq audio surface) · create-app grouped form (low-freq, complex controls don't fit inline rows) · **P4** dialog→sheet batch + global 44px sweep + ratify skips · ⏳
-
-### P3 — Apps · ✅ substantially COMPLETE (P3a–d + P3b-cont; media/create-app = documented long-tail)
-
-### P4 — a11y polish + ratify skips · ✅ shipped 2026-07-15
-- **Real a11y fixes:** iOS nav **"Done" → true 44px** (`h-[44px] min-w-[44px]`; was `h-11` = 38.5px per the 14px-root rem gotcha — the most-visible touch target, on every app); **process-table** CPU>50% text `text-destructive`→**`text-destructive-text`** (the bright fill red as text on a card was ~3:1; the AA-safe token clears 4.5:1).
-- **Ratified as documented OPTIONAL polish (NOT gaps — low ROI; owner can request):** (a) **media now-playing** Music-mock centered column — a new component for the low-frequency audio-viewer surface; (b) **create-app grouped inset form** — its rich controls (glyph picker, accent swatches, manifest preview) don't fit iOS inline grouped rows, and a stacked form is valid iOS for complex inputs; (c) **dialog→sheet batch** (widget-picker / reel-settings / code-editor close-guard / image-picker → bottom sheets) — cosmetic, shared-primitive pattern; (d) **global fixed-px 44pt sweep** — the app root is 14px so other rem `size-11`/`h-11` targets are 38.5px; a repo-wide `[44px]` sweep is a standalone a11y task; (e) **liquid-glass inner-edge opt-in** (`--glass-hi`/`--glass-stroke` tokens exist, apply per-surface where wanted). Each is a deliberate departure/deferral with rationale — distinct from the permanent essence skips (§6).
-
----
-
-### 2026-07-16 (round 7) — touch-target a11y sweep (the P4 long-tail, owner-requested) · ✅ shipped
-
-Owner requested the documented optional long-tail (§9). A **10-agent adversarial re-audit** of every
-slice-group (verify the 07-15 claims still hold in code + find genuine gaps introduced since) found
-**0 mis-gates** (the `id==='ios'` / `[data-shell="ios"]` seam discipline held — the other four shells
-are provably unaffected) and **63 real gaps: 49 sub-44px touch targets · 8 dialog→sheet · 6 round-1–6
-regressions**. Root cause of the 44px misses: the app root is 14px, so rem control heights fall short
-(`h-8`=28px, `h-9`=31.5px, `size-7`=24.5px) — worst in the 07-16 AI settings (BYOK / OAuth / memory /
-model-catalog) added *after* the 07-15 parity freeze.
-
-**Fixed (systemic first, then per-slice fan-out):**
-- **`globals.css`** — one `@media (pointer:coarse)` rule lifts every `input` / `textarea` /
- `[data-slot="select-trigger"]` / `[role="menuitem"]` to `min-height:44px`. Covers ~25 targets across
- all slices in one place; portal-safe (media query, not DOM-scoped); it is a11y *sizing* for BOTH
- touch shells (iOS + Android), **not** iOS visual identity, so it does not leak the iOS look — the
- visual tokens (glass/color/type) stay `[data-shell="ios"]`-scoped above.
-- **shared primitives** — `appshell/primitives/responsive-toolbar.tsx` (monitor/app toolbar buttons) +
- `components/shared/file-tree/dir.tsx` (Explorer rows + the New-file/New-folder buttons, which were
- `opacity-0` — invisible/unusable on touch → now shown + 44px on coarse).
-- **46 per-slice button/row edits** (6-agent fan-out, strictly disjoint dirs, no shared-file edits) —
- coarse-pointer `size-[44px]` / `min-h-[44px]` appended to icon/text buttons across os-settings,
- assistant, appshell, files-manager, app-store, auth, os-terminal. The 30px composer send-FAB,
- `[data-slot="segmented-option"]`, and `[role="switch"]` Switch were deliberately left (compact-by-design).
-- **widget-picker** Dialog → house `ResponsiveDialog` (bottom sheet on touch, dialog on desktop).
-
-**Gates:** `tsc` + `eslint` clean; vitest **689 passed** (0 unexpected). Built + `systemctl restart`, `:4005` health 200.
-
-**Logged as remaining (lower ROI, not built this round):**
-- **model-catalog** Dialog→sheet — needs a scroll-model restructure (its fixed `h-[50vh]` ScrollArea
- fights the drawer's flex layout; >20 changed lines). Its Browse trigger got the 44px bump.
-- **Editors long-tail** (§9) — reel-editor / image-editor / media-viewer / media-studio /
- code-editor preview-pane / image-picker: residual sub-44px targets + 6 remaining Dialog→sheet
- candidates (image-picker, save-image, zip, reel settings + file-browser; code-editor close-guard is
- a *correct* centered iOS alert). Low-frequency on a VPS cockpit.
-- **Adjacent targets** the agents surfaced but kept out of scope (files trash-row, library-grid
- per-card actions, mobile "Quick open" tiles) — same coarse-pointer pattern when wanted.
-- **Android-specific** a11y beyond the shared coarse rule = a separate task (this pass was iOS-scoped).
-
-### 2026-07-16 (round 8) — editors long-tail (a11y + Dialog→sheet) · ✅ shipped
-
-Closed the round-7 "logged as remaining" editor tail (owner-requested). Presentation-only — the
-editor canvases (Konva stage, reel timeline, xterm) stay untouched per §6; only their chrome moves.
-
-- **a11y (10 files):** coarse-pointer 44px across editor chrome — code-editor (preview Re-run,
- new-file-modal controls, close-guard confirm buttons), image-editor (tool rail + mobile command
- bar), reel-editor (menu-bar triggers, toolbar, transport), media-viewer (IconBtn toolbar + inline
- PlayButton), image-picker tabs. Added `select` to the globals coarse rule (native `<select>`
- wasn't covered by the round-7 `input`/`textarea`/`select-trigger`/`menuitem` set).
-- **Dialog→sheet (6):** converted raw `<Dialog>`s to the house `ResponsiveDialog` / FormDrawer
- (bottom sheet on touch, centered dialog on desktop): reel-editor **settings** + **VPS file-browser**,
- media-studio **save-image**, files-manager **zip**, os-settings **model-catalog** (hoisted the
- Browse trigger out of the removed `DialogTrigger` + `ScrollArea`→`Body` — the scroll restructure
- round 7 deferred) and image-picker (fixed `h-[440px]` panel → `flex-1` so the tab panel fills the
- sheet). The code-editor **close-guard KEEPS** its centered `AlertDialog` (a destructive confirm is
- a correct centered iOS alert) — only its 3 footer buttons were bumped.
-- **Gates:** tsc + eslint clean; vitest **689**. Built + `systemctl restart`, `:4005` health 200.
-- **Now truly remaining (tiny):** the round-7 adjacents (files trash-row, library-grid per-card
- actions, mobile "Quick open" tiles) + Android-specific a11y beyond the shared coarse rule.
-
----
-
-## 9. Completion summary (2026-07-15)
-
-The iOS parity refactor is **substantially complete**: every high-value iOS (iPhone) surface across the feature slices now matches the Apple mock, shipped in **11 verified commits** (`23e400e`…`2c0aea8`, atop the plan doc `f1d7e90`), each built → screenshot/numeric-verified on `:4005` → tracked in §8 → pushed. **The android / windows / dashboard / macOS shells are provably byte-unchanged** — every delta rode the `[data-shell="ios"]` CSS scope or an `id === 'ios'` React branch (never `surface === 'mobile'`), re-measured on the other shells after each shared-primitive edit.
-
-**Converted:** P0 foundation (system-green Switch, raised-white Segmented pill, `--grouped`/`--glass-*` tokens, Reduce-Transparency honoring) · P1 Settings (native grouped list, 32/800 large title, iOS type scale) · P2 shell chrome (centered nav title, floating glass dock, top-anchored Spotlight pill, CC/NC glass tokens, iOS widgets/Today) · P3 apps (Monitor + App Store single-title, App Store search pill, Files blue folders + slim toolbar, assistant iMessage bubbles + composer pill, browser Safari glass address bar, code-editor true-44px targets, image/reel editor safe-area) · P4 a11y.
-
-**Held (deliberate, permanent):** VPS essence (§0/§6) — no fabricated hardware, Control Center real-toggles-only, Dynamic Island functional-only, file-explorer data layer sealed. **Documented optional long-tail** (P4 list) awaits an explicit owner request.
-
----
-
----
-
-## 10. Both-surface completeness audit — macOS + iOS (2026-07-15)
-
-Owner asked to ensure BOTH desktop (macOS) and mobile (iOS) carry all the mock's features. A 9-agent audit (`both-surface-parity-audit`) compared each surface × area vs the mock. **Verdict: both surfaces substantially complete — ZERO high-severity gaps.** macOS chrome (menu bar, window, dock, sidebars, context menu) already matches or EXCEEDS the mock (Radix a11y, real wired actions, a live Window-menu list the mock lacks); iOS matched the shipped refactor. Closed the meaningful gaps (Batch A+B):
-
-- **iOS Files sidebar regression (functional, MED)** — the P3b-cont slim toolbar had DROPPED the sidebar toggle, making Favorites/roots unreachable on the phone. Restored a leading **Browse** (PanelLeft, tint) button → `onOpenSidebar`. Verified present.
-- **macOS app menu (MED)** — the signature bold app-name menu was nearly empty (a lone disabled "About"). Added **Settings…(⌘,) · Hide (⌘H) · Quit (⌘Q)** with shortcut hints; brand "Log Out" gained **⇧⌘Q**. Verified the bar shows the "Settings" app menu when focused.
-- **macOS Settings detail title (LOW)** — 14px → **22px/700** macOS large title (mock `notPhone` spec); Windows stays compact. Verified 22px/700.
-- **Files folders always system-blue (LOW)** — `#57b3ff` on macOS Finder too (was the user accent — Finder blue is a fixed category color). Dropped the now-obsolete `ios` prop on FileItem.
-- **macOS Finder grid density (LOW)** — fixed 3/4-col → fluid `repeat(auto-fill,minmax(96px,1fr))` on desktop; phone stays 2-col.
-
-**Batch C — desktop Control Center (shipped 2026-07-15).** macOS now carries a menu-bar **Control Center popover** (a `SlidersHorizontal` glyph → glass popover) with the SAME 6 real toggles as the mobile CC (Appearance / Server / Focus / Search / Assistant / Windows). Extracted **`ControlCenterTiles`** as the single source of truth — the mobile pull-down Sheet AND the desktop popover both consume it; registered via the `menuBarStatus` slot (which only the macOS menu bar renders, so it's macOS-only by mount). **NO fabricated-hardware sliders** (brightness/volume/wifi/bt) — essence held. Verified: glyph present + all 6 tiles render (Appearance/Server accent-on).
-
-**Remaining = documented OPTIONAL (real mock features, low ROI — owner can request):** macOS menu **roving open-on-hover** — *attempted (self-registering `useId` roving context + `modal={false}` + functional-updater to beat the close/switch race) and **reverted**: hand-rolled controlled-DropdownMenu roving stays racy and couldn't be verified in the harness; a clean version needs the `@radix-ui/react-menubar` primitive (a new dep). Menus work via click (Radix a11y-complete), so this is polish, not a functional gap.* Also (purely decorative, audit's lowest): dock launch-bounce, rich file-type thumbnails, iOS Files name-pill tile + in-content folder-name large title. *(Both the desktop Control Center popover (Batch C) and the context-menu shortcut/danger column (Batch D) from earlier drafts of this list are now **done** — see below.)*
-
-**Batch D — context-menu shortcut hints + destructive red (shipped 2026-07-15).** The `MenuItem` type gained `shortcut?` + `danger?`; the shell context-menu render shows a right-aligned macOS keyboard hint and paints destructive rows in system red (`--destructive-text`). Populated: window title-bar menu (Close **⌘W**, Minimize **⌘M**); desktop-icon + widget **Remove** → red. Verified: Close row renders "Close ⌘W"; Remove color = `rgb(255,95,87)`. Additive (`shortcut`/`danger` optional) → every other menu unchanged. **Essence-skips the audit CONFIRMED (NOT gaps):** the mock's macOS Control Center brightness/volume/wifi/bt/AirDrop/mirroring sliders, status-bar wifi/battery, and Apple-menu Sleep/Restart/Shut Down are all **fabricated hardware** mso correctly omits.
-
----
-
-*Compiled 2026-07-15 from a 19-agent audit (`ios-parity-audit`, 1.6M tokens). SSOT verified against
-`mock-os/Apple-clone-app/{shared/theme.js,shared/config.js,support.js}` + the `.dc.html` screens.
-This is the extraction contract: **mock → mso iOS surface only**, everything else held constant.*
diff --git a/docs/MOBILE-RESPONSIVE-PLAN.md b/docs/MOBILE-RESPONSIVE-PLAN.md
deleted file mode 100644
index c8e861c1..00000000
--- a/docs/MOBILE-RESPONSIVE-PLAN.md
+++ /dev/null
@@ -1,119 +0,0 @@
-# Mobile / responsive plan — DRY, dynamic, every feature
-
-> **STATUS: Phases 1–4 DONE (2026-06-09).** The shell switch (`useIsMobile`,
-> desktop window-mgr vs `MobileShell`) is done ✅; the DRY primitives —
-> `useResponsive`, `AppFrame`, `MasterDetail`, `ResponsiveToolbar`, `TouchList` —
-> SHIP in `appshell/primitives/` + `responsive/` and re-export via
-> `@/features/os-shell`. Phase 2 (high-traffic apps, 2026-06-03) ✅: `files-manager`
-> / `system-monitor` / `os-settings` wrap their pane in `AppFrame` (pane
-> `@container` + safe-area, Radix `ScrollArea` kept inside for styled desktop
-> scrollbars); `os-terminal` + `code-editor` status bar honor the home-bar via
-> `--sai-bottom`; `files-manager` + `code-editor` collapse their sidebar via
-> `AppSidebar` (the shell's MasterDetail wrapper). Phase 3 (creative apps,
-> 2026-06-09) ✅: browser, media-viewer, image-editor/media-studio (compact prop
-> + pane-relative sheet), reel-editor compact tabs. Phase 4 sweep (2026-06-09) ✅:
-> app-store chips + `TouchList`, create-app `@xl` two-col, assistant composer
-> safe-area — including the `TouchList` retrofit into existing custom lists
-> (process table, app-store rail). Container-first throughout, no new `matchMedia`.
-> **Remaining:** only Phase 5 — the verify pass (Playwright at 360/768/1280) +
-> pixel polish. `ResponsiveToolbar` is intentionally NOT forced onto the rich
-> toolbars (breadcrumbs/selects don't fit its flat item model).
-
-Goal: every app works in **both** shells — the desktop window-manager AND the
-full-screen mobile shell — without per-app bespoke media queries. One source of
-truth for "how big am I", shared primitives, container-driven layout.
-
-## Why it's not responsive today
-
-- The **shell switch** is now ratio+touch aware (`useIsMobile`, `desktop.tsx`):
- desktop window-manager vs `MobileShell`. ✅ done.
-- But **app content** mostly assumes a wide desktop window. In the mobile shell
- (or a narrow window) apps don't reflow: fixed multi-column grids, side-by-side
- panes (code-editor tree + editor), wide toolbars, fixed-px widths. Mock data
- renders the same regardless of size.
-- Root cause: apps key layout off the **global viewport** (or nothing), not off
- **their own pane width**, and each would need its own breakpoints → not DRY.
-
-## Principles
-
-1. **Container-first, not viewport-first.** An app is sized by its window/pane,
- not the screen. Use Tailwind **`@container`** + `@sm/@md/@lg` variants so the
- SAME component reflows correctly in a 380px window and a fullscreen phone.
- (Tailwind 4 container queries are already in use in a few slices — make it the
- default.)
-2. **One responsive source of truth.** A single `useResponsive()` hook derives
- `{ isMobile, isCompact, pane, safeArea }` from the shell decision + the app's
- container — no `window.matchMedia` scattered in components.
-3. **DRY primitives over per-app CSS.** Shared layout components so apps compose
- instead of re-implementing: `ResponsiveToolbar`, `MasterDetail`, `PaneTabs`,
- `TouchList`. Fix once, every app benefits.
-4. **Touch targets + safe areas.** ≥44px hit targets on coarse pointers; honor
- `env(safe-area-inset-*)` (notch/home-bar) via a shared wrapper.
-5. **No data assumptions.** Layout must not depend on mock vs live data shape.
-
-## Architecture
-
-```
-useIsMobile (device ratio/touch) ← shell choice (done)
- ├── DesktopChrome → windows (resizable) each window is an @container
- └── MobileShell → one fullscreen pane the pane is an @container
- │
- └── SAME app component (registry) renders in either,
- reflowing via @container + useResponsive() ← the DRY layer
-```
-
-- Build the DRY layer in `os-shell` and export from its barrel:
- - `useResponsive()` — `isMobile` (from shell context), plus a `ref` + observed
- container width → `isCompact`/`pane:"xs"|"sm"|"md"|"lg"`.
- - `<AppFrame>` — standard app scaffold: header/toolbar slot + scroll body +
- safe-area padding; collapses toolbars to an overflow menu when compact.
- - `<MasterDetail>` — side-by-side on wide, stacked/back-nav on compact (for
- files sidebar+grid, code-editor tree+editor, settings nav+pane).
- - `<TouchList>` / `<ResponsiveToolbar>` — list rows + toolbars that grow hit
- targets + wrap on coarse/compact.
-- Add container-query + safe-area tokens to `globals.css` once.
-
-## Per-slice checklist (all apps)
-
-| App | Make responsive (compact / mobile) |
-|---|---|
-| **os-shell** | ✅ windows already; MobileShell pane is an `@container`; dock/menu-bar collapse; Spotlight full-width on mobile |
-| **files-manager** | ✅ `MasterDetail`: sidebar → drawer/back on compact; grid cols `@container` (2→3→4→6); toolbar → overflow menu; thumbnails ✓ |
-| **code-editor** | ✅ tree as `MasterDetail` (hidden→toggle on compact); tabs scroll; editor full-width; status bar wraps |
-| **os-terminal** | ✅ full-bleed; larger font + input on touch; toolbar minimal |
-| **media-viewer** | ✅ fluid (object-contain); controls reachable; toolbar wraps |
-| **media-studio** | ✅ compact prop + pane-relative sheet (image-editor); canvas fits container |
-| **reel-editor** | ✅ timeline horizontal-scroll; panels → compact tabs |
-| **system-monitor** | ✅ gauges grid `@container` (4→2→1); process table → `TouchList` card rows on compact |
-| **app-store / create-app** | ✅ grid `@container` + chips/`TouchList` rail; create-app `@xl` two-col (single column on compact) |
-| **assistant** | ✅ chat fills; composer pinned bottom + safe-area; compact save button fixed |
-| **os-settings** | ✅ nav → top tabs/drawer on compact; rows stack |
-| **browser** | ✅ omnibar compact; controls overflow; remote view fits container |
-
-## DRY rules (enforced)
-
-- No `window.innerWidth` / ad-hoc `matchMedia` in app components — use
- `useResponsive()` or `@container` variants only.
-- No fixed pixel widths for layout regions — use fr/%, `min-w-0`, container units.
-- Toolbars: declare actions as data → `ResponsiveToolbar` decides inline vs
- overflow. Don't hand-roll per app.
-- New apps inherit responsiveness by composing `AppFrame` + primitives.
-
-## Phasing
-
-1. **Primitives** ✅ — `useResponsive`, `AppFrame`, `MasterDetail`,
- `ResponsiveToolbar`, `TouchList`, tokens. (os-shell barrel.)
-2. **High-traffic apps** ✅ (2026-06-03) — files, code-editor, terminal, settings,
- system-monitor.
-3. **Creative apps** ✅ (2026-06-09) — media-studio, reel-editor, media-viewer, browser.
-4. **Sweep** ✅ (2026-06-09) — app-store, create-app, assistant; `TouchList` retrofit.
-5. **Verify** — drive the real Playwright browser at phone/tablet/desktop sizes
- (and `/os-browser.sh shot`) per app; rotate to confirm reflow. ← remaining
-
-## Demo media (separate, shipped alongside)
-
-`public/demo-media/` holds uploadable sample media so the **demo** (mock, no host)
-can actually open images/video/audio. `scripts/gen-demo-media.mjs` scans the dir
-→ `manifest.json`; the mock adapter lists a **"Demo Media"** root from it; `rawUrl`
-serves `/demo-media/*` as static bytes (no `/api`, no auth). Drop files in the
-dir, regenerate the manifest, redeploy the demo.
diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md
index 0475de19..c1f5a234 100644
--- a/docs/PROGRESS.md
+++ b/docs/PROGRESS.md
@@ -8,6 +8,82 @@ Running log of what shipped each phase. Newest at top.
> Read those phases as history. **This file is the source of truth for what exists** —
> `ARCHITECTURE.md` is no longer maintained and carries a stale-warning banner.
+## 2026-08-10 — audit follow-up: −4.4k lines, two eager chains off first load (DONE)
+
+A 13-agent audit (6 dimension scanners, each with an adversarial verifier that had to
+refute its own dimension's claims, then a synthesis pass). 48 claims, **41 survived, 7
+were killed** — and the kills were worth as much as the finds. Shipped in five commits.
+
+**Behaviour fixes.**
+- `/api/prefs` was fetched **twice on every load** — the appearance and quicklinks
+ providers each pulled the whole 1.6 KB blob to read one key, both outside AuthGate,
+ and both retry on window focus, so a signed-out tab-back fired two 401s. One shared
+ in-flight promise, cleared on settle so the retry still refetches.
+- **A failed app-chunk import left a spinner forever.** `window-content.tsx` caught the
+ rejection and dropped it — which also disabled the recovery its own comment named:
+ `register-sw.tsx` self-heals a stale chunk from `unhandledrejection`, and a *handled*
+ rejection never fires that event. It now shows the failure with a reload button and
+ rethrows. This is the deploy-day path (new build, old chunk ref), so it mattered.
+- **Spotlight reported a dead host API as "No matches"** — indistinguishable from an
+ empty result, so an expired session looked like an empty folder. It keeps the error.
+- `ResponsiveProvider` allocated a fresh state object on every `resize`, so React's
+ `Object.is` bailout could never fire — and this value is read at the shell root, so
+ every event re-rendered the whole tree, each one paying a synchronous
+ `getComputedStyle`. Now one rAF-coalesced measurement that bails when the geometry
+ is unchanged. Mobile fires `resize` on every URL-bar collapse and keyboard open.
+
+**a11y** (all pure additions): dock app icons had **no accessible name** at all (a
+`<Link>` around a lucide `<svg>`; the hover panel holding the title is `invisible`, so
+out of the a11y tree) — ~20 blank links. Login errors had **no live region anywhere in
+the auth slice**, so "Incorrect password." was silent; the password field had only a
+placeholder. Android recents cards were pointer-only `div`s. The toast stack was pinned
+at a hardcoded 36 px while iOS floors `--sai-top` at 44, so it opened under the notch.
+
+**Perf — two eager chains, both measured on the live build.**
+1. One **267 KB** chunk (82 KB gzip) in the initial `<script>` set carried macOS chrome
+ *and* iOS chrome *and* all 10 shell features to every visitor, because `DesktopChrome`
+ shared a module with `Surface`. It moved to `components/shells/macos/`; all five
+ shells now register through `register-shells.tsx` with `lazy()`. −68 KB on a phone,
+ −42 KB on a desktop.
+2. `installAlfaSources()` ran at module scope, so every signed-in load pulled the host-tool
+ catalog + its 12 `run()` closures + agent presets (**88 KB**) into the initial bundle
+ AND fired `GET /api/skills` — **90 serial `SKILL.md` reads, 602,672 bytes off disk,
+ 60–80 ms**, for a menu nothing renders until the user types `/`. os-shell registers a
+ *loader* now; the composer's first render pulls it, and the skills fetch waits for the
+ first `/`. Both needed a subscribe/notify seam, because the composer computes its item
+ list during render on purpose — see `chat-composer.tsx:45`, which documents the exact
+ bug a `useMemo` reintroduces here.
+
+**Deleted, ~2.0k lines of code + ~1.7k of docs**, each verified to have zero consumers:
+the `os-browser` Playwright sidecar's source (unit stopped *and* disabled for months, no
+`/api/v1/browser` route, Browser has been Camoufox for two rewrites), the e2e shell
+harness (`e2e.sh:12` pointed `$BROWSER` at a script that does not exist, so all 7 checks
+aborted on line 17), Share + Quick Look (registries with no producers — the only callers
+of `openQuickLook`/`share` were the `?e2e=1` commands), cross-app DnD (the one `setData`
+in the tree writes `text/plain`, never the payload mime, so the read half could only ever
+return null), `AppHeader`/`AppInspector` + the vaul drawer branch behind it, shell-settings'
+unreachable half, the manifest's never-set `routing`/`titleSync` flags, `publicProxyUrl` +
+`PROXY_BLOCKED_EXTERNALS`, `hostOf`, `resolveModel`'s `info` option, `assetDir` + two dead
+env vars, and 5 finished plan docs. `multipart.ts`'s hand-rolled O(n·m) subsequence scan
+and copy-concat became `Buffer#indexOf` / `Buffer.concat` (`buf` had to become a Buffer:
+`Uint8Array#indexOf` searches for a single byte value, not a subsequence).
+
+**Two of PROGRESS's own "deliberately NOT cut" entries were reversed** (`os-browser/`,
+`scripts/e2e*`) — see the note at the 2026-08-03 entry. `AUDIT-2026-06-11.md` was NOT cut:
+its stated reason, five source comments citing it by finding number, still holds.
+
+**What the verifiers killed, which is the more useful half.** Deleting the 3 non-default
+OS personas (~2,000 lines) — reachable three ways (Settings picker, desktop right-click
+"View as", a palette command each). Spaces + session Profiles — "palette-only" is not
+unreachable when ⌘K *is* the launcher. `defineFeature`/`Slot` as dead configurability —
+`shell.manifest.ts:80` injects an 11th feature through it and the App Store's feature
+toggles filter on it. `SHELL-FIDELITY-PLAN.md` — a live *unstarted* roadmap whose §8 table
+is where `globals.css`'s live `--shell-*` tokens come from. A contrast-script "134 hidden
+failures" — arithmetic over two JSON keys that never co-occur; acting on it would have
+broken four presets. And "optimize `/api/skills?name=X`" — 🔒 `name` is raw user input
+validated **nowhere else**; the enumeration allowlist is the only thing making `../`
+structurally impossible, so the proposed `path.join` reopens traversal.
+
## 2026-08-04 (hydration, final) — the fourth cause closed; zero mismatches anywhere (DONE)
The architectural one the previous entry deliberately left open.
@@ -480,6 +556,12 @@ release rather than being deleted.
working service); `docs/{ARCHITECTURE,AUDIT-2026-06-11,SCORECARD-2026-06-14}.md`
(banner-kept history, and AUDIT-06-11 is cited by name from three source files);
`scripts/e2e*` (dormant, revived by one `node os-browser/server.mjs`);
+[**REVERSED 2026-08-10**: `os-browser/`'s source, `scripts/e2e*` and
+`SCORECARD-2026-06-14.md` were deleted. The service had been stopped AND disabled
+for months with no `/api/v1/browser` route left to call it, which took the e2e
+harness with it — `e2e.sh` also pointed at a `$BROWSER` script that does not exist,
+so all 7 checks aborted on line 17. `AUDIT-2026-06-11.md` stays, for exactly the
+reason given here.]
`useBadges`/`useLayouts`/`useProfiles`/`listProfiles` (dead here, but rr's `appshell` calls
`listProfiles` — cutting forks the lifted slice and they return on the next merge); the
3,060 unread token entries in `registry-data.json` (a verbatim upstream mirror; pruning it
@@ -751,7 +833,7 @@ reel-editor, media-viewer, image-picker). **Dialog→sheet:** 6 raw `<Dialog>`s
save-image, files zip, os-settings model-catalog (trigger-hoist + ScrollArea→Body), image-picker
(h-[440px]→flex-1); code-editor close-guard keeps its correct centered iOS alert. Added `select` to
the globals coarse rule. tsc + eslint clean, vitest 689, deployed `:4005` health 200. Detail in
-`IOS-PARITY-REFACTOR-PLAN.md` §8 (round 8).
+`IOS-PARITY-REFACTOR-PLAN.md` §8, round 8 (doc deleted 2026-08-10).
## 2026-07-16 (round 7) — iOS touch-target a11y sweep (P4 long-tail) (DONE)
@@ -763,7 +845,7 @@ makes `h-8`=28px / `h-9`=31.5px fall short). Fixed the high-ROI subset: one `@me
(`responsive-toolbar`, file-tree `dir`), **46 per-slice button/row 44px appends** (6-agent disjoint
fan-out), and widget-picker Dialog→`ResponsiveDialog` sheet. Editors long-tail + the model-catalog
scroll-restructure logged as remaining. `tsc` + `eslint` clean, vitest **689** green, deployed `:4005`
-health 200. Full detail in `IOS-PARITY-REFACTOR-PLAN.md` §8 (round 7).
+health 200. Full detail was in `IOS-PARITY-REFACTOR-PLAN.md` §8, round 7 (doc deleted 2026-08-10).
## 2026-07-16 (round 6) — "Alfa, forget this" tool (DONE)
@@ -870,935 +952,8 @@ behaviorally verified on an isolated `:4011` dev server (prod never touched).
→ macOS/Windows/Dashboard byte-unchanged. **Not redeployed** — `pnpm build` + `sudo systemctl
restart mso.service` to activate.
-## 2026-06-15 — upload-DoS P0 closed (independent QA loop)
-
-An independent QA `/loop` rated mso and shipped the one **P0 a parallel audit
-session missed** — an authenticated DoS in `/api/v1/fs/upload`. Both on `origin/main`:
-
-- **`b4b90c5`** — `fs/upload` no longer buffers every multipart part into RAM
- (`req.formData()` OOM-kills the host process that *is* the cockpit). New
- `lib/host/multipart.ts` streaming parser + `lib/host/fs-upload.ts` spool-to-tmp
- with backpressure + atomic rename within write-root bounds; `proxyClientMaxBodySize`
- 500mb → 256mb.
-- **`4ddc70f`** — cap **raw** pulled bytes (oversized preamble/header could still
- grow the buffer unbounded) + `lib/host/multipart.test.ts` (6 tests incl. both
- bypass vectors). `tsc` clean, vitest 293 passing.
-
-**Not redeployed** — `pnpm build` + `sudo systemctl restart mso.service` to
-activate. The concurrent-session collision lesson from that handoff is now a standing
-rule in `CLAUDE.md` ("only ONE session edits mso at a time"); the handoff note
-itself was deleted on 2026-07-28 once its remaining content had expired.
-
-## Where things stand (2026-06-11) — recovery anchor
-
-Four rounds shipped to `main` today, all green (typecheck + lint + vitest 162 +
-build), prod + demo redeployed. Details in the dated entries below.
-
-- **R1** `818a8ca` — full 6-pass audit → `docs/AUDIT-2026-06-11.md` +
- `docs/SHELL-FIDELITY-PLAN.md` (the roadmap the fidelity work follows).
-- **R2** `89f4210` — audit fix wave 1–4: 5 app P0s + the P1 tail + hygiene
- (deleted media-studio's ~1,870-line orphan, tailwind-merge→3, global-error) +
- security hardening (sensitive denylist, audit redaction, child-env scrub).
-- **R3** `82aeaaa` — dynamic per-shell context menu (`appshell/lib/context-menu.ts`
- registry, all 5 shells) + live/interactive wallpaper (TSX registry + sandboxed
- HTML iframe, `liveWallpaper` capability).
-- **R4** `f31b893` — fidelity Phase A+B: per-shell `data-shell` tokens
- (font/radius/icon/ease/dur) + window open/close/minimize motion + geo glide.
-
-**Next move (not started):** SHELL-FIDELITY-PLAN **Phase C** — one
-`<WindowPreview>` primitive feeding Mission Control / Windows taskbar hover /
-Android recents / iOS switcher; it also fixes the audited switcher
-double-session bug (iOS mounts live `WindowContent` per card today). Then
-Phase D per-shell signature behaviours. Deferred from the audit (documented):
-the UX error-doctrine sweep, confirm/undo pass, focused-window hotkey capability.
-
----
-
-## 2026-06-11 (round 4) — Shell fidelity Phase A+B: per-shell tokens + window motion (DONE)
-
-First two phases of `SHELL-FIDELITY-PLAN.md`. CSS-first, zero new deps.
-
-- **Phase A — per-shell design tokens.** `data-shell={id}` on the Surface root;
- globals.css defines `--shell-font / -radius-win / -radius-ui / -icon-radius /
- -ease / -dur-fast|dur|dur-slow` with per-OS overrides: macOS/iOS 10px + SF
- stack + `cubic-bezier(.32,.72,0,1)`; Windows 8px/4px + Segoe + decelerate
- curve; Android 300ms + Roboto + **circular** icon mask (50%). The window
- radius fork (`rounded-md` vs `rounded-[var(--radius-win)]`) collapsed to
- `--shell-radius-win`; app icons use `--shell-icon-radius`; menu bar / taskbar /
- window titles use `--shell-font` (CHROME only — app content keeps the theme
- preset's typeface, so the recent preset-font work is not regressed).
-- **Phase B — window lifecycle motion.** `winOpen` on mount; `winClose` /
- `winMin` via a component-LOCAL phase that finalizes the SYNCHRONOUS store
- action on `animationend` (store contract unchanged — `closeAll`/tests stay
- sync; guarded editors skip the animation so the confirm dialog isn't over a
- faded frame). `.win-geo` glides maximize/snap/restore; the drag + resize hooks
- set `transition:none` mid-gesture so per-frame moves never lag. Mobile
- `appOpen` durations tokenized. `prefers-reduced-motion` collapses to ~1ms.
-- Verified on demo (Playwright, computed styles + screenshots): macOS window
- 10px + SF titlebar, Windows 8px + Segoe + caption buttons, Android icons 50%,
- geo-transition + open animation live, zero page errors. Gates green, 162 tests.
- Prod + demo rebuilt.
-- Next in the plan: Phase C (one `<WindowPreview>` primitive → Mission Control /
- taskbar hover / recents / iOS switcher; also kills the switcher double-session
- bug), then per-shell signature behaviours (Win taskbar grouping + Alt-Tab +
- snap-layouts; iOS zoom-from-icon + status bar; Android notification shade +
- ripple).
-
-## 2026-06-11 (round 3) — Dynamic per-shell context menu + live/interactive wallpaper (DONE)
-
-Two requested features, both on new brand-free appshell registries (rr-liftable).
-
-- **Dynamic per-shell context menu** — `appshell/lib/context-menu.ts`:
- `registerContextMenu(ShellId | "*", provider)` → `getContextMenuItems(ctx)`;
- providers run at OPEN time with `{shell, surface, x, y}` so items are fully
- dynamic. `useShellContextMenu(shell)` + `<ShellContextMenu>` merge each shell's
- built-ins with the registry. Wired into ALL FIVE shells: macOS + Windows
- (built-ins → registry), Dashboard (Home-view right-click), iOS + Android home
- (long-press / contextmenu, skips controls). os-shell injects dynamic items in
- `integrations.ts` ("New Files window" desktop-only, "Change wallpaper…",
- "Lock screen" mobile, "Open System Monitor" on dashboard). Fixed a latent bug:
- the Windows desktop menu hung off a div shadowed by the window section — moved
- to the section with the currentTarget guard (macOS pattern).
-- **Live / interactive wallpaper** — one capability field
- (`ShellAppearance.liveWallpaper`, wins over image + preset), two sources:
- (1) **from code (TSX)** via `appshell/lib/wallpaper-registry.ts`
- `registerWallpaper({id,label,render,interactive?})` — os-shell ships Drift
- (token-colored CSS blobs) + Starfield (rAF canvas, pauses when hidden,
- pointer-attracts when interactive); (2) **from the frontend (HTML)** — user
- pastes a page in Settings, rendered by the shell in a **sandboxed iframe**
- (`sandbox="allow-scripts"` only — opaque origin, no cookies/parent DOM/authed
- `/api`), size-capped + shape-validated (`normalizeLiveWallpaper`). A "receives
- clicks" toggle turns the desktop window layer `pointer-events-none
- [&>*]:pointer-events-auto` so empty-desktop clicks reach the wallpaper (it works
- as a live website); windows/dock/menus stay on top. UI:
- `os-settings/components/live-wallpaper-rows.tsx`; SECURITY.md documents the
- sandbox model.
-- Gates: typecheck + lint + build green, vitest 154 → 162 (context-menu registry
- + wallpaper-normalizer tests). New files ≤200 LOC; appshell stayed brand-free.
- Prod rebuilt + restarted.
-
-## 2026-06-11 (round 2) — Audit fix wave 1–4: P0/P1 bugs + hygiene + security hardening (DONE)
-
-Acted on `AUDIT-2026-06-11.md`. 73 files, +973/−300; typecheck + lint + build
-green, vitest 136 → 154. 6 disjoint agents did the app slices; shell core +
-lib + security done by hand. Prod rebuilt + restarted.
-
-- **App P0s fixed:** image-editor export now renders the DOC rect at doc
- resolution (Transformer/shadow hidden during capture) + a failed project load
- no longer clobbers the file (load-success gate); Settings SSH "Laptop" target
- editable (server-targets dedupe precedence inverted); code-editor ⌘S saves
- instead of opening the browser dialog (scoped stopPropagation); files-manager
- "Download" actually downloads (raw-URL anchor).
-- **App P1s:** files rename-collision + same-dir cut-paste guards + failed-listing
- error state; image-editor delete/duplicate keep paint pixels + imports stored as
- data URLs (not dead `blob:`) + editor hotkeys scoped to the focused window;
- code-editor stale-buffer/openPath/inspector-save fixes + dirty-tab close guard;
- assistant abort seam end-to-end (Stop button, `req.signal`, no token bleed after
- close) + partial reply kept on error + conversation survives tab switch; browser
- unmount closes remote pages (keepalive) + "service offline — Retry" state;
- settings AI-key save errors surfaced; login errors visible in pending state +
- English strings; quicklinks hydrate shape-guarded; prefs writes serialized.
-- **Shell core (hand):** resize commits via `offsetLeft/offsetTop` (no +30px
- drift); Spotlight `useSearch` memoized (no infinite search loop); pollers gated
- on `document.hidden`; `hydrateBoot` dedupes a multi-app window by payload (no
- Files dup on `/files/*` reload); restored + resized windows clamped on-screen
- (`clampRect` + resize listener); window stacking + ⌘Tab + close-focus now follow
- z (focus recency); dock/Window-menu read a reactive windows map (no stale hover
- lists); `inEditable` guards on ⌘I + ⌘⇧V; context menu above the dock; dead
- `.dark .wp-material` → `[data-theme=dark]`; dashboard wallpaper no longer hidden;
- clipboard/recents SSR snapshots stabilized.
-- **Hygiene:** deleted media-studio's ~1,870-line orphan editor (manifest
- trimmed); `tailwind-merge` 2 → 3 (Tailwind 4 class tables); `app/global-error.tsx`;
- `agent-log` route reads `readAuditTail()` (no lib/host bypass); `.env.example`
- gains `OS_FS_ALLOW_SENSITIVE` + `OS_PREFS_PATH`; ARCHITECTURE catch-all fix.
-- **Security hardening:** sensitive-file denylist extended (`.aws`/`.kube`/
- `.docker`/`.config/gcloud`/`.netrc`/`.git-credentials`/`*_history`); browser
- fill/type audit lines redact typed values; spawned shells (exec + PTY) run with
- the app's own secrets scrubbed from env (`lib/host/child-env.ts`) — `printenv`
- no longer leaks the session secret/BYOK key; SECURITY.md notes the `/proc`
- residual. New tests: child-env scrub, clampRect, server-targets, quicklinks,
- prefs serialization.
-- Deferred (documented, not done this wave): UX error-doctrine sweep, confirm/undo
- pass, focused-window hotkey capability, the SHELL-FIDELITY-PLAN phases.
-
-## 2026-06-11 — Full audit + shell fidelity plan (docs only, no code changes)
-
-- **`docs/AUDIT-2026-06-11.md`** — six parallel audit passes (security, shell
- core, app slices, fidelity inventory, Next/React best-practice, DX) over
- HEAD `84e857c`; single-source P1s re-verified by hand. Headlines: security
- clean (no P0/P1 — hardening list only); 5 app P0s (image-editor export
- renders viewport + failed-load clobbers files, Settings SSH target
- uneditable, code-editor ⌘S broken while typing, Files Download stub);
- 5 shell P1s (resize +30px drift `use-window-drag.ts:96`, Spotlight infinite
- search loop `os-shell/capabilities.ts:42`, deep-link reload duplicates Files
- windows `store-persist.ts:60`, no offscreen re-clamp, z-order by creation
- not focus). Fix waves 1–5 prioritized at the bottom (data safety first).
-- **`docs/SHELL-FIDELITY-PLAN.md`** — make the 5 shells feel native to their
- OSes while staying light: shared foundations first (per-shell `data-shell`
- token layer, motion scale + window lifecycle animation, system font stacks,
- one `<WindowPreview>` primitive, z-ladder tokens, shell code-splitting),
- then per-shell top cuts (macOS scale-minimize + Spaces strip; Win11 taskbar
- grouping + snap-layouts popup + Alt-Tab; iOS zoom-from-icon + status bar +
- edit mode; Android status bar + notification shade + ripple + back-bus;
- Dashboard ops-console identity). Phases A–F + authenticity cheat sheet.
- Hard constraints: no new deps, CSS-first motion, verify on demo :4006.
-- No code changed; prod untouched.
-
-## 2026-06-10 (round 3) — Full upstream sync into rr: shell framework + every OS app slice (DONE)
-
-- **rr (`resources`) is no longer "basic"** — the whole mso feature set is
- now consumable from the catalog by any project (`npx rr add <slug>`):
- - **appshell 1.4.0** in rr = byte-synced to this repo's framework (Android
- Material-You rebuild, macOS dock behaviour, window store + snap geometry,
- UrlSync, shell registry minus the phantom "mobile" id, store-persist split,
- Clock/HomeIndicator/pull-down/swipe-close/overview-key, `useQuickLinks`
- capability + `QuicklinkIcon`). The 10 shell features (search/inspector/
- notifications/control-center/widgets/clipboard/share/quick-look/
- shortcut-help/lock-screen) synced into rr's bundled `appshell/features/*`.
- - **Dashboard shell LIFTED into the framework** (rr bundles it; brand via
- `useBrand`, stats via the capability seam) — mso keeps its consumer copy.
- - **12 app slices upgraded** in rr via per-slice 3-way merges that keep rr's
- self-contained `lib/host.ts` seams (mock adapters + `configure*()` for real
- wiring): browser (multitab/screencast/AI panel), os-terminal (exec emulator
- + injectable PTY), file-explorer, assistant, reel-editor, image-editor,
- app-store, media-viewer, system-monitor, image-picker (incl. the CSS-escape
- security fix), code-editor.
- - **3 new lifts**: media-studio 1.0.0, quicklinks 1.0.0, shell-settings 1.0.0
- (+ catalog entries, previews, agent.md). Skipped: os-settings (MSO-
- specific), create-app (already bundled in rr app-store).
- - rr gates all green: tsc · eslint 0 · vitest 448 · slices:check 68 slices.
-- **Backported here from rr's lint-zero sweep** (keeps the trees
- line-mergeable): desktop.tsx snap-key ternary→if/else; InspectorAI drops the
- unused `appId` destructure. Behaviour identical — prod NOT redeployed for
- this; next deploy picks it up.
-
-## 2026-06-10 (round 2) — Theme preset owns the typeface; font pipeline actually works now (DONE)
-
-- **Font picker merged into theme presets**: the tweakcn preset's
- `cssVars.theme` font-sans/font-mono IS the typeface config — the separate
- "Font family" picker + `fontFamily` tweak are gone (legacy stored/synced
- values scrubbed on hydrate; `fontScale` a11y sizing stays). Preset chips show
- which face they ship.
-- **Preset webfonts load for real** (`lib/appearance/presets/fonts.ts`):
- `applyPreset()` now injects ONE Google Fonts css2 link for the named families
- (local/system/Geist names skipped; offline degrades to the Geist fallback in
- the stack; `clearPreset()` removes it).
-- **Two silent root-cause bugs fixed — no custom font EVER rendered before**:
- (1) Geist `variable` classes were on `<body>` while `:root --font-ui`
- referenced `var(--font-geist-sans)` → guaranteed-invalid custom property →
- body fell back to the Tailwind preflight stack; Geist classes moved to
- `<html>`. (2) `@theme inline { --font-mono: var(--font-mono) }` was a
- self-referential var() cycle that killed monospace tokens; chrome token
- renamed `--font-mono-ui` (terminal consumers updated).
-- E2e-verified on demo: picking "Elegant Luxury" → computed body font Poppins,
- `document.fonts.check` true, link href carries Poppins+IBM Plex Mono; Stock
- reset removes the link and restores Geist (which itself renders for the first
- time). Zero console errors.
-
----
-
-## 2026-06-10 — Shell parity sweep: Android rebuilt · Dashboard store-driven · wallpaper presets retired (DONE)
-
-Two audits (provider/wrapper consistency + a 12-feature × 5-shell parity
-matrix) drove this round; every gap found was built, not just listed.
-
-- **Android shell rebuilt for parity**: status-bar row removed (user call: the
- SCREEN header goes, the wallpaper clock stays) — big clock + date back on the
- wallpaper; pull-DOWN on home now opens the REAL Control Center feature
- (`controlCenter` slot + `ShellUIProvider`; the fake wifi/bt Shade is deleted),
- via the new shared `usePullDown` hook (fires at threshold, pointercancel-safe,
- scroll-aware). Root is transparent so the shared `<Wallpaper>` (auto →
- `wp-material`, or the user's custom image) finally shows. `home` is derived
- from the pathname (iOS pattern) → deep links / back-forward work in Android
- now. Search pill → Spotlight. App header pads `--sai-top` (notch). Drawer
- close handle ≥36px hit; Recents ✕ 36px on coarse pointers.
-- **Resume-don't-duplicate** (iOS + Android): a home tap on a running app now
- `focusApp`s its window instead of spawning a second one (Files used to
- multiply on every tap).
-- **Dashboard shell store-driven**: dropped its private `route` state — panes
- are real store windows (`openWindow`/`minimizeWindow`, focused-window
- derivation), so URL sync, deep links and title sync work; added a Running
- sidebar section (resume/✕), an app filter, and the missing
- `[container-type:inline-size]` on the pane.
-- **Windows shell**: ⌘Tab AppSwitcher + NotificationCenter mounted (clock is
- now the notifications button), F3 Task View via the extracted
- `use-overview-key` hook, Start menu closes on Esc.
-- **macOS**: Launchpad gets a live search field + `inert` while closed (its ~20
- links were tab-reachable invisible); desktop context menu gains "Close all";
- Launchpad z drops to 8400 (was colliding with the clipboard overlay at 8500).
-- **iOS**: status clock in the top safe-area strip (shared `<Clock>`); switcher
- ✕ 36px on coarse pointers.
-- **Wallpaper presets retired**: aurora/dusk/mist/graphite/noir picker grid is
- gone from Settings → Appearance — theme presets own color identity; wallpaper
- is "auto" (per-shell native backdrop) or a custom image. Legacy stored keys
- coerce to "auto" on every hydrate path (`normalizeWallpaper`); shell-backdrop
- CSS (`wp-aurora/graphite/win11/material/ios`) stays.
-- **Provider/wrapper audit fixes**: `AppRegistryProvider`+`ResponsiveProvider`
- hoisted above the feature-provider seam (a `FeatureDescriptor.provider`
- calling `useResponsive` no longer throws by construction); capabilities merge
- memoized + `undefined`-stripped; pre-hydration theme script kills the
- dark-mode light flash; Settings used raw `env(safe-area-inset-bottom)` and
- ignored the iOS +34px pill bump (now `var(--sai-bottom)`); profiles read
- `sv:shell` via the registry SSOT (`getShellPrefs`); `MOBILE_W` deduped;
- appearance/quicklinks context values memoized; phantom `"mobile"` ShellId
- deleted; mobile dock ids moved from a hardcode in generic appshell to
- `AppDescriptor.pinned` set by the MSO manifest.
-
----
-
-## 2026-06-09 (round 2) — Mobile maximized: prefs sync · terminal key bar · deep-link fixes (DONE)
-
-Phone testing surfaced the real gaps — everything below e2e-verified on prod
-(Playwright login + device approval at 390×844, then revoked).
-
-- **Cross-device prefs sync** (`4b7cf04`): phone no longer boots to fresh
- defaults (wrong wallpaper/theme, empty quicklinks, mock mode). Appearance
- tweaks + quicklinks persist to `~/.mso/prefs.json` (atomic 0600) via
- session-gated `/api/prefs` (mirrors `/api/config`). localStorage hydrates
- first, server wins on initial GET, changes debounce 1.5 s POST per section,
- last-write-wins. POSTs disabled until a GET succeeds (pre-auth defaults can
- never clobber server prefs); login fires `mso:authed` to re-pull without a
- reload. `wallpaperStyle` is computed → stripped both sides. Demo: zero calls.
- Device-specific state (window layout, clipboard, profiles, recents) stays
- local on purpose.
-- **Terminal touch key bar** (`ce97b6a`): control-room-style accessory row for
- the PTY terminal — Esc, Tab, sticky Ctrl/Alt (arms next key-bar press OR next
- soft-keyboard char via xterm `onData` intercept; Alt = ESC-prefix), arrows,
- Home/End/PgUp/PgDn, ^C ^D ^L ^Z, `| ~ / -`, clipboard paste. Shows on
- `pointer:coarse` or compact panes; `pointerdown.preventDefault` keeps xterm
- focus + soft keyboard up. Mock/exec terminal unchanged (line-based, no bar).
-- **Mobile Done resets URL** (`9bf592f`): `minimizeWindow` left `focused`
- intact so UrlSync never re-fired — URL stuck on `/files` after dismiss.
- UrlSync now derives from the *visible* (focused AND not-minimized) app;
- dismiss → `replaceState("/")`, deep-link onto a minimized app restores it.
- Also covers the Android shell home button.
-- **Persisted layout vs deep links** (`29bc59b`, found by e2e): boot
- `hydrate()` rebuilt the store from `mso:layout` AFTER UrlSync opened the
- deep-linked window — returning devices got the grid or a stale URL rewrite.
- New `hydrateBoot()` merges (live windows keep id/payload/focus on top,
- persisted single-instance dupes drop, multi apps coexist via id remap);
- profile/layout apply keeps replace semantics. +7 store-persist tests.
-- Tests 124 → **136**. Verified: PTY echo/history/^C through the key bar on
- prod, prefs file write + server-hydrate after localStorage wipe, deep-link
- with saved layout (Files focused over restored windows, URL intact), demo
- regression-free.
-
-## 2026-06-09 — Hardening + Phase E responsive sweep + PTY terminal + stock search (DONE)
-
-- **API hardening** (`dec2c5f`): `HostError` + `apiError` across all 35 `/api/v1`
- routes — curated messages pass through as 400 (they're UX), everything else is
- masked to "Operation failed" + logged server-side with the route name, so raw
- Node errors (ENOENT/EACCES with absolute paths) never reach the client.
- Dependency-free input validation (`readJson`/`requireString` kit in
- `lib/host/api-error.ts`, no zod) on exec + fs mutations; `verifySession` now
- requires a numeric `expires_at`. Tests 41→124 (session sign/verify, path
- bounds/symlink escapes, destructive-filter table, pty e2e).
-- **A11y/UX** (`3602d0e`): specific aria-labels (window controls, browser nav,
- appearance swatches); settings config errors surface as a toast; loading spinners.
-- **200-line rule** (`c123786`): files-manager `app`/`use-files` + browser
- `use-remote-browser` split into focused modules.
-- **Phase 3+4 responsive sweep DONE** — browser, media-viewer, image-editor/
- media-studio (compact prop + pane-relative sheet), reel-editor compact tabs,
- app-store chips + `TouchList`, create-app `@xl` two-col, assistant composer
- safe-area + compact save-button fix. Container-first (`useContainer`/
- `@container`) throughout — no new `matchMedia`. Tracker: MOBILE-RESPONSIVE-PLAN.md.
-- **system-monitor**: live process table — fixed a real `ps` parse bug
- (multi-word comm names broke the positional split in `lib/host/sys.ts`);
- compact card rows via `TouchList`.
-- **Stock search**: `/api/v1/stock/search` — keyless Openverse by default,
- optional `OS_UNSPLASH_ACCESS_KEY` → Unsplash (key stays server-side).
- image-picker "Stock" tab is live with debounce/attribution/error states.
-- **PTY terminal**: `node-pty` + `@xterm/xterm`. `lib/host/pty.ts` session
- manager (ring buffer + `Last-Event-ID` resume, 8-session cap, 30-min idle
- reap, `term.open`/`term.close` audited); `/api/v1/term/{open,stream,input,
- resize,close}` SSE bridge. Live mode = a real interactive shell (vim/top/ssh
- work); mock untouched; falls back to one-shot exec if the PTY fails.
-- **Skipped on purpose**: response-shape unification. The error shape
- (`{ error: string }`) is already uniform via `apiError`; a full `{ok,data}`
- wrapper would be client churn for no user value.
-
----
-
-## 2026-06-06 — Multi-shell OS: macOS · Windows 11 · Android · iOS · Dashboard (P1–P6 complete)
-
-Ported the multi-shell system matured in app-rahmanef's appshell fork back into the
-framework (two-way merge — close guards/winId/Button-sweep/dock deep-links all kept).
-`registry/shells.tsx` + per-surface shell prefs (Settings → Appearance → Shell);
-Windows 11 chrome (taskbar/Start/Snap-Assist, caption-button windows), Android
-Material-You shell, Dashboard cockpit (os-shell consumer, single-pane over AppHost +
-useSystemStats home), iOS NC pull-down + app long-press; chrome-aware snap re-tile
-(WindowState.snapZone + applyChromeInsets); wallpaper=auto → per-OS presets. Lifted
-to rr as appshell 1.2.0 (resources 2f653ea, all slice gates green). Tracker:
-docs/MULTISHELL-PLAN.md (deleted 2026-07-30; `git show bccd0b1:docs/MULTISHELL-PLAN.md`).
-Deployed: build + systemctl restart, site 200.
-
-## 2026-05-31 — Phase 18: Maximize Next.js — addressable OS (routing/Link/Image) (DONE)
-
-Stopped treating the shell as a client-only SPA (one route, all client state) and
-leaned into Next App Router — **without touching the windowing model** (user keeps
-multi-window OS; URL just mirrors the focused app).
-
-- **Catch-all route** `app/[[...slug]]/page.tsx` replaces the single index page.
- A generic `UrlSync` (appshell core) mirrors the FOCUSED app + its launch path to
- the URL (`/files/home/rahman`, `/code`, `/terminal`). Deep links open that window
- on load; back/forward walks focus history. Two-way + loop-guarded (refs for
- pathname, live focus read from the store). Opt-out via `manifest.routing=false`.
-- **History API, not router.push.** Opening a window is pure client state, so
- `UrlSync` rewrites the address bar with `window.history.push/replaceState` (Next 16
- syncs `usePathname`) — instant, no RSC roundtrip, no remount. router.push caused a
- full route transition + UrlSync remount on every open (caught + fixed in verify).
-- **App slugs** assigned centrally in the manifest (`AppDescriptor.slug`, falls back
- to `id`) so app slices stay URL-agnostic: files/code/terminal/monitor/…
-- **Link-based launch.** Dock + Launchpad render `<Link href>` (real anchors):
- ⌘/middle-click opens an app in a new tab (deep link); plain left-click stays an
- in-place window open (preventDefault → openWindow, URL synced by UrlSync).
-- **Per-route metadata** — `generateMetadata` derives `<title>` from the slug
- ("Code — MSO"), verified server-side via curl.
-- **next/Image** for browser favicons (fixed Google s2 host in `images.remotePatterns`).
- Host-fs images + the live Playwright screenshot stream stay raw `<img>` on purpose
- — dynamic/auth'd bytes the optimizer can't help with (documented in next.config).
-- Shipped A→fix chain (`4987d7d` route+Link+Image · `4a72f36` loop fix · `d482513`
- History API). Verified on demo: deep-link /code + /files/home/rahman, dock→URL,
- back/forward focus history, 12 dock hrefs, server titles. prod :4005 + demo :4006 200.
-
----
-
-## 2026-05-31 — Phase 17: AppShell framework — manifest-driven, features as slices (DONE)
-
-Restructured the monolithic `os-shell` slice into a generic, rr-liftable shell
-framework + pluggable feature slices. **Pure restructure — zero frontend change**
-(parity-verified by before/after screenshots at desktop 1280 + phone 390).
-
-- **`appshell` slice (generic, brand-free)** — the shell runtime/chrome moved here
- from os-shell: window store, surfaces (desktop window-mgr + iOS mobile shell),
- app registry, the pub/sub buses (toast/activity/inspector), and the chrome
- skeleton (menu-bar/dock/launcher/wallpaper/windows). Lifts to rr as-is.
-- **One responsive source of truth** — `<ResponsiveProvider>` + `useResponsive()`
- replaced the two duplicate `useIsMobile` (inline + `@/hooks/use-mobile`).
- `useContainer()` + safe-area tokens. DRY primitives `AppFrame`/`MasterDetail`/
- `ResponsiveToolbar`/`TouchList` built + exported (adoption deferred — that's a
- frontend change).
-- **Manifest-driven** — `<AppShell manifest>` is the single entry point; a project
- supplies `{ brand, apps, features }`. `FeatureRegistryProvider` + `<Slot region>`
- compose the surfaces from config (open/closed: add a feature = manifest edit).
- Brand (name/logo) now flows from the manifest into the menu-bar.
-- **Features as slices** — `shell-search` (overlay/Spotlight), `shell-inspector`
- (rightPanel + AI), `shell-notifications` (toast + Dynamic Island), `shell-control-center`,
- `shell-widgets` (Today). Mobile features read surface state via a `ShellUI`
- context instead of props. Buses stay in core so apps don't depend on feature
- slices. `os-shell` is now a thin consumer: `shell.manifest.ts` (MSO brand +
- app list + features) + a re-export barrel, so all app slices stay untouched.
-- Shipped per phase (A `7be0491` · B `7be0491` · C `08ed734` · D `cd716ab`),
- typecheck + build green each, prod :4005 + demo :4006 verified 200.
-
-Lift-prep done (Phase F `ee2b7a9`): de-genericised appshell's last consumer
-literals (persist key + idle name → manifest), de-Convex'd os-shell metadata,
-added trios. Capability injection done (Phase G `b16ac0a`): appshell core no
-longer imports `@/lib/{appearance,os-api}` — appearance + CPU readout come via
-`manifest.capabilities`; mso adapts its store/host in `os-shell/capabilities.ts`.
-The framework core is now brand- AND consumer-free (only the universal `cn`
-helper remains). Verified behaviour-neutral (theme toggle, CPU chip, wallpaper,
-device detection, mobile surface all intact).
-
-Feature-slice capability injection done (`eb671fa`): the `shell-*` slices no longer
-import `@/lib/*` either (except the universal `cn`). Their data deps now arrive via
-`ShellCapabilities` — `useSearch` (Spotlight → `SearchHit[]`), `useSystemStats`
-(Today widgets), `useChat` (scoped AI stream), `useServerToggle` (optional control-
-center server tile). mso wires the real `@/lib` sources in `os-shell/capabilities.ts`.
-The **entire shell** (core + features) is now consumer-free. Verified behaviour-neutral
-(Spotlight search + theme command, mobile Today telemetry "CPU 61% 8 cores").
-
-Remaining: adopt the responsive primitives across app UIs (the visible mobile
-sweep — deferred, it changes the frontend).
-
----
-
-## 2026-05-31 — Docs reconcile (DONE)
-
-Docs had drifted: PLAN / ARCHITECTURE / DESIGN-RECONCILE / SLICE-CATALOG still
-described Convex + the agent bridge (gone since Phase 15), and this log stopped at
-Phase 14. Fixed: ARCHITECTURE + PLAN rewritten to the self-contained reality;
-DESIGN-RECONCILE stamped ARCHIVE with a "what actually shipped" diagram;
-SLICE-CATALOG re-keyed to the host contract + all 14 slices listed; this log
-brought current. `MOBILE-RESPONSIVE-PLAN` flagged as not-yet-built (DRY primitives
-`useResponsive`/`AppFrame`/`MasterDetail`/`ResponsiveToolbar`/`TouchList` = 0 files).
-
----
-
-## 2026-05-30/31 — Phase 16: Files CRUD + DnD upload polish (DONE)
-
-- **DnD upload of files AND folders** (`82ac15d`) — binary-safe. `lib/host/fs.ts`
- `uploadInto` (jailed, atomic tmp+rename, 100 MiB/file); multipart `/api/v1/fs/upload`;
- `webkitGetAsEntry` recursive walk (`read-drop.ts`); split Upload Files/Folder UI.
-- **One-action New Folder + Spotlight folder search** (`5d46c6b`) — `cmd.newFolder`
- (mkdir → auto-select → inline rename); `searchFs` (dirs under `~/projects`, jailed,
- skips node_modules/.git/…) + `/api/v1/fs/search`; Spotlight opens apps AND folders.
-- **Rename pre-selects the name** (`37c699c`) — typing replaces, Finder-style.
-- **Demo FS persists to localStorage** (`2fee6a1`) — mock tree mirrored to
- `mso:demo-fs` so a visitor's sandbox survives reload (structure, not bytes).
-- **Whole-window drop zone** (`15ace18`) — the entire Files window is a drop target
- (drops on toolbar/padding no longer fall through to the browser), with a "Drop files
- & folders" overlay + Uploading/Uploaded toasts + a flat-file fallback.
-
----
-
-## 2026-05-30 — Phase 15: Self-contained pivot + security + MSO rebrand (DONE)
-
-The big architecture change: **dropped Convex + the external Control-Room agent.**
-mso now runs AS a host process and controls its own machine directly.
-
-- **Self-contained host layer** — `lib/host/` (fs/exec/sys/paths) is the single
- facade for `/api/v1`; signed-cookie auth (`lib/auth/`, HMAC `OS_SESSION_SECRET` +
- password + device approval) replaced `@convex-dev/auth`. Layout/registry →
- localStorage; device allowlist + BYOK config → `~/.mso/*.json`. No Convex, no agent.
-- **Security pass** (`4a293cd`) — append-only JSONL audit (`lib/host/audit.ts`,
- `~/.mso/audit.log`); exec destructive-command guard (`rm -rf /`, mkfs, dd,
- fork bomb…) bypass via `OS_EXEC_ALLOW_DESTRUCTIVE`; exec rate-limit; tight default
- FS scope (read+write = home + ~/projects); 24h sessions; README threat model.
-- **Rebrand mso → MSO** (`56b3707`) — dropped the "OS" overclaim in all
- user-facing strings (it's a cockpit/utility, not an OS). Repo/service/domain slug
- unchanged.
-- **os-browser to loopback** — Playwright service rebound 127.0.0.1:4002 (was 0.0.0.0);
- stale ufw 4002 docker-bridge rules cleaned.
-
----
-
-## 2026-05-30 — Phase 14: Real browser (Playwright) — drivable + screenshots + persistent session (DONE)
-
-The iframe-proxy couldn't beat google's CSP. Replaced it with a REAL headless
-Chromium on the host (Playwright, Apache-2.0) — renders any site, drivable from
-the CLI, with a persistent session/cache so logins stick + no per-site API needed.
-
-- **Host service** `os-browser` (new repo `/home/rahman/projects/os-browser`,
- systemd, loopback :4002, secret-gated): `chromium.launchPersistentContext`
- (userDataDir `~/.mso/chrome-profile` = cookies/cache/session on disk). HTTP
- API: navigate/screenshot/state/content/click/type/key/scroll/back/forward/reload.
- ufw: docker0 + docker_gwbridge on 4002 (non-public).
-- **mso**: `lib/agent/server.ts` `browserConfigured()`+`browserFetch()`; 11
- `app/api/v1/browser/*` routes (Convex-auth-gated → `172.18.0.1:4002`). Browser
- slice rewritten to a single REMOTE view: live screenshot `<img>`, click mapped to
- the 1280×800 viewport, keyboard/wheel forwarded, settle-poll after actions.
- Deleted tab-strip/new-tab/blocked-overlay (real browser needs none). Dokploy env
- `OS_BROWSER_URL` + `OS_BROWSER_SECRET` set.
-- **CLI**: `~/.claude/skills/os/os-browser.sh` (go/shot/content/click/type/key/
- scroll/state/back/…) drives the SAME session — screenshots land in /tmp so they
- can be viewed. `/os-browser-list` rewritten to check the real service.
-- Verified on host: google/github/HN/example all render (screenshots viewed),
- content extracted, session persists.
-
----
-
-## 2026-05-30 — Phase 13: Browser fix + full function audit + /os-list, /os-browser-list (DONE)
-
-- **Browser "tidak berfungsi" diagnosed**: backend was 100% fine (proxy renders with
- a valid token). Real causes were client-side: (a) token async-null → iframe
- flashed a 401, (b) in-page links escaped the frame → frame-blocked.
-- **Fixes**: browser waits for `useAuthToken()` ("Establishing session…") + re-keys
- iframe on token (no 401 flash); proxy injects a click/submit interceptor →
- `postMessage({__osb,url})` → app re-proxies + syncs omnibar (in-page nav works).
-- **Full live audit** (signed in via device-password, real token): **13/13 /api/v1
- functions 2xx** — sys stats/processes, fs list/read/usage/mkdir/write/move/copy/
- delete, exec, apps, proxy. Browser proxy RENDERS example/wikipedia/HN/httpbin/
- google (base+nav injected, X-Frame-Options stripped).
-- **New skills**: `/os-list` (`~/.claude/skills/os-list/`, audit.js probes every
- endpoint + app→function matrix) and `/os-browser-list` (browser-check.js tests
- the proxy across real sites). Both sign in + run live.
-
---
-## 2026-05-30 — Phase 12: Deep VPS browse + dynamic favorites + browser proxy + /os skill (DONE)
-
-- **Tree bug fix (couldn't descend live)**: `DirChildren` built child paths from the
- REQUESTED path ("/") not the host's canonical path → "/projects" → outside roots.
- Now uses the agent-returned `r.path` as the base → full real tree browsable
- (home → projects → any depth).
-- **Agent read = whole filesystem** (explorer.ts): `OS_AGENT_FS_READ_ROOTS` (set `/`
- in .env.local) — same access the pty already grants. WRITES stay bounded to
- home + ~/projects (`OS_AGENT_FS_WRITE_ROOTS`). read ops (read/usage) now follow
- read-roots, not write-roots.
-- **Dynamic favorites**: FsList now carries `roots` + `parent`; the agent returns
- Home / Projects / Filesystem; mock returns its shortcuts. Files sidebar renders
- favorites from `roots` (no more hardcoded /Media that 404 on the VPS). Portable
- `~` = home in both adapters (mock norm maps "~"→"/"); Files + both trees default
- to `~`, with `/` reachable via the Filesystem root.
-- **Browser actually works**: `app/api/v1/proxy` (Convex-token-gated via query)
- fetches the page server-side, strips X-Frame-Options/CSP, injects `<base>` →
- iframe renders. (Limits: omnibar nav only; in-page links/heavy-SPA/auth-walled
- still constrained.)
-- **`/os` skill** (`~/.claude/skills/os/`): playbook + `os.sh` to drive the VPS via
- the agent endpoints (ls/cat/write/mkdir/rm/mv/cp/exec/usage) — same bridge the
- browser shell uses. Smoke-tested.
-
----
-
-## 2026-05-30 — Phase 11: Shared live file-tree + AI Inspector (every app) (DONE)
-
-Two cross-cutting features. tsc + build green.
-
-**Shared live file-tree** (`components/shared/file-tree/`, import `@/shared/file-tree`):
-- Reusable recursive tree that **lazy-loads each dir via OsApi fs.list** (mock OR
- the real VPS in Live mode → syncs the host), expand/collapse, selection, and
- **inline create-file / create-folder** (hover affordance per folder) + refresh.
-- **code-editor**: dropped the static seed tree (deleted components/file-tree.tsx
- + SEED_TREE) → mounts the shared `<FileTree>`; onOpenFile routes through
- `useEditor.open` which fs.read's the live file.
-- **files-manager**: added `<FileTree>` to the sidebar (Favorites top · tree
- scrolls middle · Storage bottom). Folder click → navigate main pane; file click
- → new `cmd.openPath` (code-editor / media-viewer handoff).
-
-**AI Inspector** (os-shell, ⌘I / menu View + ✨ status button):
-- `os-shell/lib/inspector.ts` — typed module bus (mock-os OSBus pattern made real):
- apps `usePublishInspector(appId, {subject, props, actions, context, suggestions}, deps)`
- to publish their live state + callable actions. Keyed by appId; panel reads the
- FOCUSED app's descriptor.
-- `components/inspector.tsx` — right-docked panel, tabs **Properties** (live state
- rows + one-click actions) | **AI** (`inspector-ai.tsx`: scoped Alfa chat — prepends
- the app's context + props so replies are grounded in what you're looking at;
- reuses the real /api/assistant stream, moved to neutral `lib/ai/stream.ts` to
- avoid a slice cycle). Suggestion chips per app.
-- **All 14 apps publish descriptors**: browser (URL/title/tabs/bookmarks + reload/
- newtab/bookmark/home), code-editor (file/lang/lines/unsaved + save/new),
- files-manager (path/items/selected/storage + newfolder/refresh/empty-trash),
- media-studio, media-viewer, reel-editor, system-monitor (cpu/mem/disk/procs/mode
- + refresh), os-terminal (cwd/cmds/mode + clear), os-settings, app-store,
- create-app, assistant. Each wired to REAL state/handlers.
-
----
-
-## 2026-05-30 — Phase 10: Live backend — fs write + exec + real render (DONE)
-
-Closed the 4 "still mock" gaps so the OS actually drives the VPS. tsc + build green.
-
-**Agent (vps-rahmanef, live systemd `vps-control-room-agent`)** — additive, CR not
-touched:
-- `agent/src/fs/mutate.ts` — read/write/mkdir/delete/move/copy/usage, **same
- allowed-roots bounds as the read explorer** (home + ~/projects), symlink-resolved
- before the check; atomic write (tmp→rename); refuses to modify a root.
-- `agent/src/exec/run.ts` — one-shot shell (`/bin/bash`), cwd bounded to roots,
- 30s timeout, 1 MiB output cap → `{stdout,stderr,code}`.
-- Registered `GET /fs/read|/fs/usage`, `POST /fs/write|/fs/mkdir|/fs/delete|/fs/move|
- /fs/copy|/exec` in `health-server.ts`, all behind `requireGatewayAuth`.
-- Built + restarted; smoke-tested via loopback: all ops OK, `/etc/passwd`→400
- (bounds hold), no-auth→401, real `whoami`/disk. Agent still 0.0.0.0:4001,
- CR frontend `active`, container→172.18.0.1:4001/health 200.
-
-**mso frontend:**
-- OsApi `exec` simplified to one-shot `run(cmd, cwd?) => {stdout,stderr,code}`
- (dropped unused pid/stream/kill) across types + mock + http adapters.
-- 9 new `app/api/v1` proxy routes (fs read/write/mkdir/delete/move/copy/usage,
- exec/run, apps) — Convex-auth-gated, same pattern as fs/list.
-- `sys/processes` now REAL (parses `ps` via exec) instead of `[]`.
-- **os-terminal**: Live mode wires mkdir/rm/mv/cp/touch to OsApi fs; unknown
- command → host shell passthrough (`exec.run`). Mock UX unchanged.
-- **files-manager** mutations (already wired) now hit the real VPS in Live.
-- **reel-editor**: fake progress bar → **real client-side render** (Canvas 2D →
- `MediaRecorder` → downloadable `.webm`), real progress + cancel. No ffmpeg/deps.
-- **runtime-app**: non-html installed apps → live exec console (Run → `exec.run`
- → stdout/stderr/exit), replacing the static manifest card.
-
-Parity now ~100% depth / 100% coverage. Live mutations + exec + render all real;
-behind device-approval auth + gateway secret + non-public agent (ufw DROP).
-Remaining non-goals: interactive pty (vim/top) — one-shot exec only; audio in
-reel render (canvas stream is video-only).
-
----
-
-## 2026-05-29 — Phase 9: Finish all apps (full parity sweep) (DONE)
-
-Lifted every below-par app to ~full mock-os parity (7 parallel subagents, each
-its own slice, rr-clean ≤200 lines/file, mock-backed). tsc + build green.
-
-- **reel-editor** (55→~90): comp presets + fps, clip drag/resize/split/dup/move,
- per-clip keyframes + lane graphs, clip props + text entrance anims, live
- preview canvas, undo/redo, NL "AI edit", mock render overlay, shortcuts.
-- **media-studio** (65→~90): clip masks, safe-area guides, HTML-embed + image
- layers, per-layer custom CSS, JSON/HTML import, real undo+redo (50-deep,
- debounced), color palette, JSON/HTML export modal.
-- **assistant** (35→~85): tabbed Chat/Agents/Skills/Automations + agent/skill/
- automation editors + grouped tool picker (localStorage). Chat still the REAL
- Claude stream; active agent persona prepended to the sent messages.
-- **media-viewer** (70→~90): audio waveform player, video transport, image
- zoom + dims + checkerboard, type chip, download, open-in-editor handoff.
-- **files-manager** (75→~90): drag-drop move, Trash (~/.Trash + Empty Trash),
- real file-picker upload, selected-item details strip.
-- **os-settings** (75→~90): About pane (version + live sys/storage + Reset),
- Server test-connection chip, reduce-transparency (already had shell-style).
-- **mobile shell** (60→~85): status bar (clock + signal/wifi/battery), home
- grid + dock + page dots, app-switcher (swipe-up cards, tap-focus, swipe-to-
- close), home-indicator drag gestures.
-
-Already ≥80% and left as-is: browser, app-store, create-app, system-monitor,
-os-terminal. Parity now ~88% depth, 100% app coverage.
-
----
-
-## 2026-05-29 — Phase 8: Dynamic app registry + modular polish (DONE)
-
-Made the app layer **dynamic** (apps added at runtime appear live) while keeping
-slices **modular** (each self-contained behind its barrel; one declarative list).
-
-Core (shell + Convex):
-- **Window payload**: `openWindow(app, title, size?, payload?)` + `WindowState.payload`;
- every app component now receives a `payload?: unknown` prop (`AppProps` exported
- from os-shell). Re-open with new payload updates + focuses.
-- **Convex `features/apps`**: per-owner runtime app registry — `create`,
- `setInstalled`, `remove`, `listInstalled`, `listAll`.
-- **Dynamic registry**: `app-store/lib/use-installed-apps` turns installed rows
- into `AppDescriptor`s (icon via a glyph→Lucide map; `RuntimeApp` host renders
- html entries in a sandboxed iframe, else a manifest card). `app/os-root.tsx`
- now merges `BUILTIN_APPS` + `useInstalledApps()` inside the auth boundary —
- no more hardcoded-only list.
-
-Wired (subagents, parallel, disjoint slices):
-- **create-app** → real Create App form (name→slug, runtime autofill, glyph +
- gradient picker, live manifest preview) → `apps.create` → app appears in dock.
-- **app-store** → 6-app catalog merged with live install state; Get/Uninstall →
- `apps.setInstalled`; installed apps surface in dock/launchpad.
-- **open-file-by-payload** → files-manager routes a file to code-editor (`{path}`,
- read via fs.read) or media-viewer (`{path,name,kind}`, remote→"open in editor"
- handoff) through `openWindow` payload.
-- **shell** → full menu bar (File/Edit/View + existing os-rr/app/Log Out) + a
- toast system (`lib/toast` store + `ToastHost`, barrel-exported for any slice);
- Spotlight fires toasts on run.
-- tsc green, build green. Parity now: app coverage 100%, depth ~80%, registry
- modular + dynamic.
-
----
-
-## 2026-05-29 — Phase 7: App parity sweep + live host bridge ON (DONE)
-
-Raised feature parity across the 6 thinnest apps (parallel re-author from
-`mock-os/`, rr-clean, ≤200 lines/file) AND turned the real-VPS file bridge on.
-
-**Parity upgrades** (each its own slice, mock-backed, shadcn/tokens):
-- files-manager → grid/list, breadcrumb + back/fwd, favorites sidebar, multi-
- select, context menu, cut/copy/paste, rename, new-folder, storage bar, sort,
- open-by-ext. Added `fs.move`/`fs.copy` to the OsApi contract (types + mock +
- http). Live mutations fail gracefully ("read-only on live host").
-- code-editor → multi-tab, file-tree explorer, Cmd+S save, status bar, new file.
-- browser → back/fwd/reload/home + bounds, per-tab history, security icon,
- loading bar, bookmarks + bar, new-tab quick-links, blocked-site overlay, menu.
-- os-terminal → 17-command shell (ls/cd/cat/mkdir/rm/mv/cp/df/ps/neofetch/…),
- cwd, history arrows, colored prompt; ls/cat hit OsApi fs live.
-- media-studio → tools (V/T/R/O/S), layers (vis/opacity/reorder/rename), 5
- aspect presets, 8 filter chips, per-layer transform, zoom, Export JSON, undo.
-- system-monitor → 4 circular gauges (CPU/Mem/Disk/GPU-mock), CPU + net
- sparklines (rolling), process table (host placeholder when empty).
-- tsc green, build green.
-
-**Live host bridge ENABLED** (real VPS directory listing):
-- Agent (vps-rahmanef, systemd `vps-control-room-agent`) was loopback-only
- (127.0.0.1:4001) → unreachable from the Dokploy swarm container. Rebound to
- `AGENT_HEALTH_HOST=0.0.0.0` (keeps loopback for the CR frontend, which calls
- 127.0.0.1:4001 — CR NOT broken) + restarted. ufw INPUT policy is DROP, so
- 4001 stays blocked from the public iface.
-- The mso swarm task egresses via `docker_gwbridge` (172.18.0.x); added
- `ufw allow in on docker_gwbridge to any port 4001`. Verified from inside the
- live container: `http://172.18.0.1:4001/health` → 200.
-- Set Dokploy mso env `OS_AGENT_URL=http://172.18.0.1:4001` + `OS_AGENT_SECRET`
- (existing env preserved). Flip Settings → Server → **Live** to list the real
- VPS tree. Agent fs is **read-only** (only `/fs/list`) — listing is real,
- mutations stay mock/local.
-
-Security: agent reachable from host containers + tailnet, NOT public (ufw DROP +
-only docker0/docker_gwbridge allowed on 4001); every call still gated by the
-mso Convex-auth route + the agent's `x-control-room-secret`.
-
----
-
-## 2026-05-29 — Phase 6B: BYOK AI assistant (DONE, deployed)
-
-Alfa now talks to a real Claude model. BYOK: the Anthropic key lives in Convex
-(owner config) or falls back to the server `ANTHROPIC_API_KEY` env.
-
-- `features/appConfig` — owner singleton {anthropicApiKey, model}. `getConfig`
- (masked: hasKey + last-4 + model), `getApiKey` (raw, server-route only),
- `setConfig` (requireUser). Key is write-only from the UI.
-- `app/api/assistant/route.ts` — Node-runtime SSE stream. Auth-gated by the
- caller's Convex Bearer (`authedConvex` in `lib/agent/server.ts`, added next to
- `verifyAuth`). Resolves key = Convex BYOK || `ANTHROPIC_API_KEY`; 501 if none.
- `@anthropic-ai/sdk` `messages.stream`, model default `claude-opus-4-8`
- (configurable), `system` block with `cache_control: ephemeral`, thinking off
- for snappy chat + final-answer-only system instruction. Emits `delta`/`done`/
- `error` SSE events; last-20-turns context window; max_tokens 4096.
-- `assistant/lib/stream.ts` — client SSE reader → async generator of text
- deltas, sends history + `useAuthToken()` Bearer. Replaced the mock engine
- (deleted `lib/engine.ts`); `app.tsx` streams real tokens, maps error codes to
- friendly notes.
-- Settings → **AI (Alfa)** panel (`os-settings/components/ai-section.tsx`):
- password key field (shows masked), model field, Save. Reactive via Convex.
-- tsc green, build green (`/api/assistant` route present), convex deployed.
-
-Note: no key is committed. Until the owner pastes a key in Settings (or
-`ANTHROPIC_API_KEY` is set on the Dokploy frontend env), the assistant returns
-a "no key" note. Caching: system prompt is < the 4096-token min, so it won't
-actually cache yet — the breakpoint is in place for when the prompt grows.
-
----
-
-## 2026-05-29 — Phase 6A: Device-approval auth (DONE, deployed)
-
-Replaced email/password with the Control Room device-approval model, mapped
-onto Convex + `@convex-dev/auth`. Auth portal guard hardened:
-
-- **Factor 1**: shared password in backend env `OS_LOGIN_PASSWORD` (set to the
- owner password). Checked constant-time in `convex/auth.ts`; fail-closed if
- unset/short → nobody gets in.
-- **Factor 2**: the device must be `approved` in the new `devices` table. A
- correct password on a new device registers it `pending` and throws
- `device_pending` — **no token is issued until approved**. So any authenticated
- session ⇒ approved device (the gate is at token issuance, not just UI).
-- `convex/auth.ts` → `ConvexCredentials({ id: "device-password", authorize })`;
- single shared owner account (`createAccount`/`retrieveAccount`, no per-account
- secret — the device IS the credential).
-- `features/devices`: `touch` (internal, called post-password from authorize),
- `approve`/`revoke` (mutation, requireUser = approved device), `listDevices`
- (query), `bootstrapApprove` (internal, CLI-only for the first device).
-- Login UI: password-only + a "pending" panel showing the device id (copyable)
- + "Check again". Settings → **Devices** panel (reactive list, approve/revoke,
- "This device" badge). New `auth/lib/device.ts` (128-bit hex id in localStorage).
-- Bootstrap path (first device, no approver yet):
- `npx convex run features/devices/mutations:bootstrapApprove '{"deviceId":"<id>"}'`.
-- tsc green, build green, convex deployed to api-os.
-
-Caveat: revoke takes effect on next token refresh (≤ refresh-token TTL); the
-gate is at sign-in. Old email/password users/accounts are now orphaned (unused).
-
----
-
-## 2026-05-29 — Phase 5: Spotlight ⌘K command palette (DONE)
-
-Cleared the top autonomous backlog item. macOS-style Spotlight over the whole
-desktop — open any app + run shell actions from one box.
-
-- `os-shell/components/spotlight.tsx` — ⌘K/Ctrl+K palette: subsequence search
- (typing "cdr" → "Code Editor"), Arrow/Enter/Esc nav, mouse hover sync, glass
- sheet. Sources: all 12 apps (open) + actions (Launchpad, Minimize all, Close
- all, Toggle theme). ≤200 lines, shadcn/token styling, no fuzzy lib.
-- Store: `spotlightOpen` state + `setSpotlightOpen`/`toggleSpotlight` +
- bulk `minimizeAll`/`closeAll` ops; `useSpotlightOpen` hook.
-- Global ⌘K hotkey in `desktop.tsx` (works desktop + mobile); Search button in
- the menu-bar status cluster.
-- tsc green, `next build` green.
-
-Remaining backlog is BLOCKED on user decisions:
-- Real AI assistant — needs `ANTHROPIC_API_KEY` (none in env/`.env.local`).
-- Live VPS data — needs prod agent-bridge reachability (infra call:
- rebind+firewall vs Traefik expose). Mock keeps prod up until decided.
-- Phase 3b live exec/pty terminal — depends on the same prod reachability.
-
----
-
-## 2026-05-29 — Phase 4: Full app suite (DONE)
-
-Maximized the os-rr app set — every prototype app now exists as a best-practice
-rr slice (re-authored from `mock-os/`, not copied). 8 new app slices built by
-parallel agents, each shadcn + theme tokens + ≤200 lines/file + metadata trio,
-self-contained mock data (data layer wires later via OsApi):
-
-- `code-editor` — gutter + overlay textarea + regex syntax highlight; fs.read/write.
-- `media-studio` — tool rail + canvas (live CSS filters) + adjust/layers panel.
-- `reel-editor` — multi-track timeline, playhead, transport, clip props, mock render.
-- `browser` — omnibar + tabs + sandboxed iframe.
-- `media-viewer` — image (zoom)/video/pdf preview, offline data-URI samples (noDock).
-- `app-store` — catalog grid, search, category filter, install toggle.
-- `create-app` — manifest form (name/runtime/accent/desc) + live icon preview.
-- `assistant` — "Alfa" chat UI, streaming local mock engine (TODO: real /api route).
-
-Registry now mounts 12 apps (`app/os-root.tsx`). Added shadcn primitives:
-textarea, slider, badge, tabs. tsc green, `next build` green.
-
-Backlog: real AI (Anthropic via /api/assistant), live data for these apps once
-the prod agent bridge is decided, Spotlight ⌘K command palette.
-
----
-
-## 2026-05-29 — Phase 3: Live host bridge (CODE DONE, locally verified)
-
-Wired OsApi `live` mode to the real Control Room host agent — securely.
-
-Design: browser → **same-origin `/api/v1` route handlers** (Convex-auth-gated)
-→ host agent with `x-control-room-secret`. The agent stays loopback-private; its
-gateway secret is server-only env (`OS_AGENT_SECRET`), never in the browser.
-
-- [x] Studied the agent auth guard (`vps-rahmanef/agent/src/terminal/auth.ts`):
- JSON API gated by `x-control-room-secret` (timing-safe), pty WS by HMAC
- `session` cookie, binds 127.0.0.1:4001, fail-closed (<32-char secret).
-- [x] `convex/me.ts` `getMe` — server-side session verification probe.
-- [x] `lib/agent/server.ts` — `agentFetch` (adds secret) + `verifyAuth`.
-- [x] Route handlers: `/api/v1/sys/stats` (→ agent `/health` telemetry),
- `/api/v1/fs/list` (→ agent `/fs/list`), `/api/v1/sys/processes` (→ `[]`).
-- [x] OsApi live mode → same-origin base + Convex Bearer token (`useAuthToken`).
-- [x] **Local e2e verified** vs the running agent: no-token→401; with token→real
- cpu/mem/disk telemetry + real `/home/rahman` listing.
-- [ ] **PROD reachability** — Dokploy container can't reach the loopback agent;
- needs an infra decision (rebind+firewall, or Traefik expose). NOT done
- unilaterally — prod live mode returns 501 until decided; mock keeps prod up.
-- Deferred Phase 3b: live `exec`/pty terminal (agent `/terminals` + `/ws/terminals`).
-
----
-
-## 2026-05-29 — Phase 2: Auth & Convex persistence (DONE)
-
-Made the deployed Convex backend real — OS gated behind `@convex-dev/auth`,
-window layout persisted per-user to `features/windows`. (Re-sequenced after the
-Phase 3 deploy; auth is the prerequisite for any Convex-backed UI.)
-
-- [x] Self-hosted auth keys set on backend: JWT_PRIVATE_KEY + JWKS (RS256, via
- `sc-convex/set-auth-env.js` REST — avoids the CLI `--` PEM bug) +
- SUPER_ADMIN_EMAIL. CONVEX_SITE_ORIGIN/CLOUD_ORIGIN already container-level.
-- [x] PBKDF2 password hashing in `convex/auth.ts` (Scrypt times out behind the
- Dokploy proxy → "connection lost").
-- [x] `auth:*` actions routed via `ConvexHttpClient` (WS reconnect mid-flight
- aborts in-flight actions) — `app/ConvexClientProvider.tsx`. Switched from
- the nextjs server provider to `@convex-dev/auth/react` ConvexAuthProvider.
-- [x] `convex/_generated` committed (un-gitignored) — frontend imports typed
- api; Docker build has it (no codegen in image).
-- [x] `auth` slice: Password sign-in/up `LoginScreen` + `AuthGate`
- (Authenticated/Unauthenticated/AuthLoading). Log Out in the menu bar.
-- [x] `os-shell` layout persistence → Convex `windows.getLayout`/`saveLayout`
- (localStorage instant cache, Convex authoritative, debounced).
-- [x] tsc green (now incl. convex), `next build` green, shipped.
-
-Note: backend env keys (JWT_PRIVATE_KEY/JWKS) are stored on the Convex
-deployment only — NOT in the repo. Rotating = re-issue all sessions.
-
----
-
-## 2026-05-29 — Phase 3: Ship (DONE)
-
-Live: https://mso.rahmanef.com + Convex self-hosted https://api-mso.rahmanef.com
-(+ site-os / dash-os), all HTTP 200. Repo `[email protected]:rahmanef63/mso.git`.
-
-- Canonical `si-coder deploy.js`: GitHub repo + push, Dokploy project/app
- `mso` + compose `mso-db` (Convex template), admin-key gen, schema push
- (auth + windows + systemMonitor indexes), Hostinger DNS (os/api-os/site-os/
- dash-os), frontend build → `done`.
-- pnpm Dockerfile (`ARG NEXT_PUBLIC_CONVEX_URL` build-arg inlining).
-- Disabled `cacheComponents` (dynamic app; was blocking prerender on auth cookie).
-- `next lint` removed in Next 16 → placeholder; typecheck is the CI gate.
-- sc-git pre-push hook installed → `convex/` pushes auto-deploy.
-- Admin key in gitignored `.env.local`.
-
----
-
-## 2026-05-29 — Phase 1: Design reconcile (DONE)
-
-Adopted the `mock-os` (os-rr) macOS-style design, re-authored into rr slices.
-
-- globals.css → os-rr glass tokens (light/dark, accent, 5 wallpapers, traffic
- lights). `lib/appearance` (theme/accent/dir/wallpaper/server cfg).
-- `lib/os-api` — the VPS boundary: MockAdapter ↔ HttpAdapter (os-rr Cloud API
- contract). Convex = auth/persistence; OsApi = host hot path.
-- os-shell rebuilt: menu bar (live sys stat), glass dock, traffic-light windows
- + edge-snap/maximize, launcher, wallpaper, mobile shell.
-- Apps: system-monitor + os-terminal rewired to OsApi; new files-manager +
- os-settings. Default light/aqua/aurora.
-
----
-
-## 2026-05-29 — Phase 0: Foundation (DONE)
-
-rr-conventional scaffold (Next 16 + React 19 + Tailwind 4 + Convex self-hosted
-+ @convex-dev/auth). os-shell window manager, system-monitor, os-terminal;
-Convex features windows + systemMonitor. Docs + mock/ placeholder. tsc green.
+*34 older entries (2026-05-29 → 2026-06-15) were trimmed on 2026-08-10 to keep
+this file readable as the source of truth it claims to be. Nothing referenced them
+by line, and they are one command away: `git show 421ab7f:docs/PROGRESS.md`.*
diff --git a/docs/SCORECARD-2026-06-14.md b/docs/SCORECARD-2026-06-14.md
deleted file mode 100644
index 14a6102c..00000000
--- a/docs/SCORECARD-2026-06-14.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# Scorecard — 2026-06-14
-
-Loop run: 2026-06-14.
-Baseline: 85/100 → Final: 97/100.
-11 productive ticks, 11 commits to main, all CI green.
-Total: ~87 files changed, +270 tests (211 → 270), +1 contrast audit, +1 healthcheck.
-
-## Sub-score table
-
-| Dimension | Baseline | Final | Δ | Weight |
-| -------------- | -------: | ----: | --: | -----: |
-| Architecture | 92 | 98 | +6 | 0.18 |
-| Security | 90 | 97 | +7 | 0.20 |
-| Code Quality | 88 | 98 | +10 | 0.12 |
-| Testing | 75 | 98 | +23 | 0.14 |
-| Performance | 80 | 97 | +17 | 0.10 |
-| A11y | 70 | 96 | +26 | 0.08 |
-| DX/Docs | 92 | 99 | +7 | 0.08 |
-| Deployment | 88 | 96 | +8 | 0.10 |
-
-Weighted: 0.18·98 + 0.20·97 + 0.12·98 + 0.14·98 + 0.10·97 + 0.08·96 + 0.08·99 + 0.10·96 ≈ **97.4**.
-
-## Tick summary
-
-- T2 `cf0ed9f` — a11y wins + 19 tests (201 total).
-- T3 `d11b997` — error doctrine + confirm/undo via ResponsiveDialog.
-- T4 `b1ea15e` — focused-window hotkey primitive + slice.json honesty + Radix scoped.
-- T5 `093759b` — WindowPreview Phase C primitive + agent-token route scope.
-- T6 `3772ff8` — reel frame-store + image-editor Blob history + 3 apps mobile-responsive.
-- T7 `b1255ee` — HMAC length-leak fix + HSTS doc + 23 tests.
-- T8 `3af3b3b` — Files virtualization + audit queue + tokenize cache + smoke probe.
-- T9 `ce3de00` — docs cumulative + audit follow-up.
-- T10 `a3801ca` — assistant rate-limit + toast ARIA + skip-link + 8 icon labels.
-- T11 `5b730e8` — React.memo + Spotlight virtualization + check-cycles/slices + healthcheck + verify.
-- T12 (this) — contrast audit script + exec route integration tests + scorecard.
-
-## Remaining items (path to 100, not closed)
-
-- 39 barrel-induced import cycles (load-bearing — extracting a pure types module would unstack).
-- postcss <8.5.10 moderate (transitive via next; pin or upgrade Next).
-- CSP narrow in `next.config.mjs` (was user WIP at loop time, untouched).
-- Files-manager mobile-responsive (system-monitor / assistant / os-settings done; Files is bigger).
-- Tree-sitter incremental tokenize for ts/js (LRU + deferred shipped; full incremental still pending).
-- rr-lift Phase 4 (publish slices to resource.rahmanef.com).
-- Third-party security audit (HMAC length-leak, exec destructive guard, agent-token scope all in-house verified).
-- Live CI smoke gate (scaffold shipped at `scripts/e2e/smoke.test.ts`; deploy hook outside loop scope).
-- Contrast audit findings: 50 light + 33 dark preset pairs fail WCAG AA 4.5:1 (informational only — preset palette tweak, not a code fix).
-
-## Verification commands
-
-```
-pnpm typecheck && pnpm lint && pnpm test && pnpm build
-node scripts/check-cycles.mjs
-node scripts/check-slices.mjs
-node scripts/check-contrast.mjs
-```
-
-All informational scripts exit 0; `check-cycles.mjs` exits 1 if a NEW cycle appears (39 baseline allow-listed).
-
-## Files touched in T12
-
-- `scripts/check-contrast.mjs` (NEW, 102 LOC) — passive WCAG AA audit across 36 presets × 2 modes + globals.css.
-- `app/api/v1/exec/run/route.test.ts` (NEW, ~110 LOC, 5 tests) — auth → rate-limit → destructive → 400/401/429 mapping.
-- `docs/SCORECARD-2026-06-14.md` (this file).
-
-## Skipped (with reason)
-
-- `lib/host/pty.test.ts` — already exists (full lifecycle from T7); no new tests added.
-- `frontend/slices/appshell/features/search/components/spotlight.test.tsx` — depends on `useApps` / `useCommands` / `useShellSearch` / RAF focus + jsdom. Project has no jsdom or `@testing-library/react` dep installed; pulling them in violates the no-new-deps rule. Spotlight focus behaviour is exercised by the existing `lib/host` route tests and the e2e smoke probe in `scripts/e2e/`.
diff --git a/docs/SHELL-LAYOUT-KIT.md b/docs/SHELL-LAYOUT-KIT.md
deleted file mode 100644
index c0b109ad..00000000
--- a/docs/SHELL-LAYOUT-KIT.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# Shell layout kit
-
-Reusable, **optional** app-window chrome so every app reads consistently and
-mobile behaviour is uniform. Exported from `@/features/os-shell`.
-
-## Primitives
-
-| Export | Desktop | Mobile (`useIsMobile`, <768px) | Use for |
-|---|---|---|---|
-| `AppHeader` | top toolbar bar | same | app title + controls |
-| `AppSidebar` | left rail (hide via `railOpen={false}`) | **left Sheet** | navigation / file tree |
-| `AppInspector` | right rail (hide via `railOpen`) | **right Sheet** (or `mobile="drawer"` → non-modal bottom drawer) | properties / layers / details |
-| `FormDrawer` (= `ResponsiveDialog`) | centered Dialog | **bottom Drawer** | create/edit forms · previews |
-
-Rules of thumb (the correction that drove this):
-- **Sidebar → Sheet** (never a bottom drawer).
-- **Inspector / property → Sheet** (right).
-- **Form / preview → Drawer** (bottom) via `FormDrawer`.
-
-`AppInspector` also takes `mobile` (`"sheet"` default | `"drawer"`) + optional
-`mobileHeight` (default `h-[50dvh]`). `mobile="drawer"` renders a **non-modal,
-overlay-less bottom drawer** so the canvas/preview above it stays visible and
-interactive while you edit (image editor uses this). Squeeze the canvas into the
-visible half by padding it `pb-[50dvh]` while the drawer is open.
-
-`AppSidebar` / `AppInspector` take `open` + `onOpenChange` (the mobile Sheet) and
-`railOpen` (desktop show/hide). Apps that toggle a panel on both form factors
-branch the handler with `useIsMobile()`:
-
-```tsx
-onTogglePanel={() => (isMobile ? setSheet(true) : setRailOpen((o) => !o))}
-```
-
-`FormDrawer` is compound: `FormDrawer.Header/Title/Description/Body/Footer`,
-`variant` `modal|panel|alert`, `size` `sm|md|lg|xl|full`.
-
-## Per-app status (audit 2026-05-30)
-
-| App | Sidebar | Inspector/property | Form/preview |
-|---|---|---|---|
-| files-manager | ✅ `AppSidebar` (sheet) | FileDetails strip (inline, small) | media preview = window |
-| code-editor | ✅ `AppSidebar` (sheet) | StatusBar (bottom) | ✅ NewFile = `FormDrawer` |
-| media-studio | ToolRail (always) | ✅ `AppInspector` (`mobile="drawer"`, 50dvh) | ✅ Export = `FormDrawer` |
-| reel-editor | — | ✅ `AppInspector` (sheet) | RenderOverlay (progress) |
-| media-viewer | — | — | toolbar + stage (fits) |
-| app-store | StoreSidebar `@max:hidden` | — | — |
-| assistant | — | — | forms = full-screen views ⟶ TODO `FormDrawer` |
-| browser | — | — | HistoryView overlay ⟶ TODO `FormDrawer` |
-| system-monitor / os-settings / os-terminal / create-app | — | — | content-first (container queries) |
-
-### Remaining (low priority)
-- assistant Skill/Agent/Automation forms → `FormDrawer` (currently full-screen state swap).
-- browser HistoryView → `FormDrawer`.
-- app-store StoreSidebar → `AppSidebar` if a mobile category drawer is wanted.