Docs / UX-ARCHITECTURE
UX architecture — Kitty desktop app (2026 redesign)
Source: docs/UX-ARCHITECTURE.md
Phase 2 of the owner's redesign brief. Product truth, route identifiers, IPC contract, Kiri state
rules and the Kitty cat brand asset are governed by PRODUCT.md, README.md,
docs/REA-UI-AUDIT.md and docs/instances.md. This document describes structure and flow; visual
tokens live in DESIGN.md. Phase 5 implements it without deleting an existing destination,
capability, route id or test.
Principles
- One shell, one route source.
renderer.jsandwizard-shell.jscurrently own separate
navigation systems and bind the same rail buttons. The new shell owns routing; the existing
route ids (project,sandboxes,registry,consoles,games,controllers,settings,
plusregistry/detail, wizard and group subroutes) remain valid identifiers and aliases. - Manifest first, Kiri second. A sandbox exists only after explicit Create. Everything before
that is a read-only preview or a local draft validated by Python. - Real state only. Every status, port, URL, log and container fact comes from Kiri through the
existing IPC/Python path. Declared resources are labelled as declared; no telemetry is invented. - Creators and developers share the room. The same shell serves "find a template and launch"
and "debug a manifest and one instance"; neither is a second-class view. - Keyboard and i18n are structural. One focus model, visible focus, Back always works, all
copy throught()(en/es parity).
Information architecture
Kitty (single Electron window)
├── Studio home route: project [existing id, new role]
│ ├── runtime health / install command
│ ├── open projects (multiple) + Open manifest…
│ ├── continue: recent or running worlds (read-only entry into Sandboxes)
│ └── primary: Create a sandbox → Select
├── Discover route: registry
│ ├── registry/detail read-only entry detail + manifest preview
│ ├── four kinds: templates, consoles, games, controllers
│ ├── search + kind/console filters (current filter contract)
│ └── actions: Add to library, Use in new sandbox (starts Select with a source)
├── Library routes: consoles | games | controllers
│ ├── my consoles / games / controllers (local only, never uploaded)
│ ├── add local game/file/folder, title, console, cover, favorite, edit, notes
│ └── controller layout + remap (writes controls.mapping)
├── Sandboxes / Worlds route: sandboxes
│ ├── world = one project instance; rows = its services
│ ├── live Kiri state, group/instance actions, per-service actions, logs, health
│ ├── manifest editor entry (read → edit → validate → save/apply)
│ └── "other Kitty sandboxes in Kiri" as provenance-labelled read-only section
├── Manifest editor subroute: sandbox/<configPath>#<instance> (new) / wizard.manifest
│ ├── schema form (all v0.2 properties, Advanced preserved)
│ ├── YAML editor, live Python validation, inline errors
│ └── import / export / save / duplicate / copy; "file needed on other machine" note
├── Create sandbox route alias: wizard (3 stages, see below)
│ ├── Select → Configure → Review & Launch
│ └── Cancel/Back creates nothing; only Launch calls sandbox.create* with start: true
└── Settings route: settings[/<group>]
└── appearance, language, runtime, registry, library, sandboxes, controllers,
menu bar, updates/about; reset per group; "restart needed" where applicable
Why this structure
- Studio home replaces the old "Project" page as the front door without destroying the route:
the runtime banner, template cards and Open file action all remain reachable. It now answers
"what can I do next?" — open existing work, discover a template, or start the creation flow. - Discover is the marketplace language the owner asked for (registry + preview). The detail
view stays read-only; "Use in new sandbox" hands a real source to Select instead of creating. - Library groups the three local collections that were three sibling rail buttons. Their route
ids stay so links and tests keep working; the navigation presents them as one section. - Sandboxes / Worlds keeps the item-173 multi-instance identity
(project, instance, service, manifest, template). "World" is a presentation label for one
project instance; the underlying data and IPC vocabulary stayinstance/service. - Manifest editor is promoted from a wizard step and a detail-panel read-only view to a
destination reachable from a world. It reuses the existing schema form, YAML editor and Python
validation; no second parser is introduced. - Settings keeps all nine groups and their stored keys. The new lime accent maps to the
existingappearance.accentkey without invalidating stored settings.
Destination mapping (nothing removed)
| Existing destination / capability | New location | Notes |
|---|---|---|
Project view (nav-project, #view-project) |
Studio home (project) |
Same route id; runtime banner, templates and Open file… preserved. |
Sandboxes view (nav-sandboxes, #view-sandboxes) |
Sandboxes / Worlds (sandboxes) |
Same route id; summary, table, detail, logs, other list preserved. |
Registry (data-route="registry") |
Discover (registry) |
Same route id; catalog, chips, search, cards, verified/license/version metadata. |
Registry preview overlay (preview()) |
Discover → registry/detail |
Read-only manifest; Add to library / Use in new sandbox unchanged. |
| Consoles / Games / Controllers routes | Library (consoles, games, controllers) |
Same three route ids; library list, local game form, controller remap preserved. |
| Wizard overlay, five steps | Create flow (wizard alias, 3 stages) |
Step 1+2 → Select; 3+4 → Configure; 5 → Review & Launch. |
| Schema form + Advanced fold | Configure stage and Manifest editor | Every v0.2 property and the Advanced <details> remain. |
YAML editor / manifest.validate |
Configure stage and Manifest editor | One parser (Python), two-way sync preserved. |
| Export / Import / Duplicate / Save as | Manifest editor actions | Uses existing api.request operations and CLI-compatible YAML. |
| Sandbox detail manifest + logs | Worlds detail + Manifest editor entry | Logs stay a real logs result; declared values labelled as declared. |
| Settings groups and tray key | Settings (settings[/<group>]) |
Nine groups, showInMenuBar, versioned store and migration unchanged. |
Tray newSandbox / sandbox / logs navigation |
Deep links into Studio / Worlds | Handler contract and validation unchanged. |
nav.js back stack / breadcrumb |
Single shell's back and breadcrumb | nav.back() becomes real for routed stages; wizard step Back also works. |
The three-stage creation flow
Select → Configure → Review & Launch. One primary action per stage; Back always works; Cancel
at any stage creates nothing; preview before creation; Kiri is contacted only at Launch.
Stage 1 — Select
- Source options: a registry template (after read-only preview) or console + game + controller
from the library or a local ROM (file picker or drag/drop), matching today's wizard step 1. - Local source captures title, detected console/controller, optional cover, and path + SHA-256;
nothing is uploaded or copied to a sandbox yet. - Collect the required unique name and optional description here (today's step 2), using
sandbox.checkNameexactly as now. - Exit: a validated draft (
name,description,source) and a manifest skeleton from Python;
no project directory, no container. - Empty state: "Pick a template, a library set, or a local ROM to begin." No fake example cards.
Stage 2 — Configure
- Schema-driven form walks
specs/game-compose.schema.jsonv0.2 with every property; enums are
selects, required fields marked, defaults prefilled, power-user keys remain under Advanced
(resources,storage,network,outputs,lifecycle,depends_on,environment, etc.). - Editable YAML editor is side-by-side or a clearly labelled tab, synced both ways with the form
throughmanifest.parse/manifest.dump;manifest.validategives inline errors immediately. - Validation errors appear next to the offending path and in one status line; nothing is delayed
behind a spinner or animation. Invalid input blocks Continue, not reading or editing. - Existing manifests opened from a world enter here (read → edit → validate → save/apply with the
existing confirmation before re-create).
Stage 3 — Review & Launch
- Read-only summary: name, description, source, console/game/controller, declared resources,
container port, network, storage/saves, and the final YAML. Real values only. - One filled action: Create (label retained for tests and product language), which calls the
existingsandbox.create/sandbox.createLocalwithstart: true. No earlier stage creates. - After Create: route to Sandboxes/Worlds with the new instance selected and a real
sandboxes:listrefresh (fixing the current need for a manual refresh, without changing the
lifecycle API). - Cancel/Back returns to Discover or Studio with no side effects.
Preserved advanced access
| Current capability | Where it lives now |
|---|---|
Schema walk of every property / Advanced fold |
schema-form.js, used unchanged in Configure |
| YAML ↔︎ document sync, live validation | manifest.parse, manifest.dump, manifest.validate |
| Import from disk/URL with missing-file note | Manifest editor, via manifest.import |
| Duplicate / Export / Save as | Manifest editor, via sandbox.duplicate / sandbox.export |
Controller remap into controls.mapping |
Library controller panel, still wired to compose |
| Per-instance start and address | up --new, -i ID, unchanged |
Runtime state transitions (no invented states)
Select / Configure / Review ── local draft only ── Python validation
│ Create
▼
up requested ── pending (local UI) ── Kiri: created/restarting → Starting
│
▼
Kiri: running → Running + loopback URL + health probe
│ stop / down
▼
Kiri: exited/paused/removing → Stopped; dead/unknown → Error/Unknown
startingis shown while anuprequest is pending or Kiri reportscreated/restarting; a
successfulupreturn is not proof of running (existingsandbox-modelrule).healthis the loopback probe result, not a container metric.failed(new voxel-scene vocabulary) maps to the existingerrorUI state; it never implies a
number, percentage or CPU/RAM reading.
Sequencing and boundaries
- Phase 3 (
DESIGN.md) fixes the visual system, component inventory and motion rules. - Phase 4 adds the local Three.js dependency, the isolated injectable voxel module and motion
tokens/tests. Nothing is wired intoindex.htmlyet. - Phase 5 replaces views/shell under this architecture, preserves ids/aria-labels/routes/IPC,
moves all copy through i18n, and recaptures screenshots with per-view assertions.

