Repository navigation
Closed
Description
Execution plan: claude/design/Apps/Workbench/stages/stage-1-shell.md · Runways: 08-api-evolution.md, 09-shell-evolution.md · depends on #372 (Stage 0).
Goal: Bring the shell — zones A · B · C · E · F(logs) · G + the cross-cutting infra — to target, built clean (not strangler-migrated under live views), validated by a load-a-file slice across Open / Trace / Attach. No zone-D deep views.
Exit gate: the load-a-file slice (below) is green for all three session kinds, and the conformance suites pass.
Build order (dependency sequence)
- 1. Selection bus (keystone) — extend
useSelectionStoreto the object model; write-through + recency + projection laws; strangler: mirror the siloed stores (profiler/dbmap/dataBrowser) → bus, then retire. (GAP-05) - 2. Right-rail Inspector — card registry off the bus + the containment context stack. (GAP-05 consumer, GAP-03 de-stub)
- 3. Navigators — Resource Tree (Open) + Systems & Queries Navigator (Trace/Attach) + per-kind data loading; selection → bus. (GAP-01 nav)
- 4. Context bar — identity · scope · breadcrumb · env tag. (GAP-07/11/23)
- 5. Command palette — prefix routing (
>/@/#/:/?) + object resolution over the bus. (GAP-08/09) - 6. Nav history + deep links — every bus change pushes; URL round-trip. (GAP-06)
- 7. Keyboard & focus — F6 via dockview
moveToNext;:focus-visiblering + active-panel; roving in navigator/inspector; focus-follows-navigation. (GAP-10, PC-8, DS-4) - 8. Session model — unify Welcome+Connect; switch-without-close + clear cache; blocked-state diagnostics. (GAP-12a, GAP-13)
- 9. Cross-cutting infra —
use202Query+<ViewState>(PC-2); density + focus tokens (DS-1/DS-4); Logs drawer carrying engine/tracelogevents. (closed with exit gate met; see closing note for the deferred remainder.)
Integration milestone — the load-a-file slice
- For each of Open / Trace / Attach: load → navigator (C) + context bar (B) + status (G) populate; select a navigator item → bus → right-rail Inspector (E) card (+ context stack); F6/focus, palette object-resolution, nav-history back, and a deep link all work — with no zone-D view.
Acceptance criteria (each ↔ a conformance suite or the slice E2E; all must be green)
- AC1.1 Bus laws — write-through per type · idempotence · recency=leaf · projection≠leaf · containment (suite A).
- AC1.2 Nav history & deep links — push on every bus change; back/forward; URL round-trip (suite B).
- AC1.3 Palette — prefix routing; object resolution per type; session-kind filtering (suite C).
- AC1.4 Keyboard & focus — F6 cycling; single-tab-stop + roving (navigator/inspector); Esc; focus-follows-navigation; focus≠selection; no trap (suite F).
- AC1.5 Focus visuals & color —
:focus-visiblering; one active-panel indicator; stable hue-per-object;onColorAA (suites F/G). - AC1.6 State set — loading(202)/empty/error/no-selection on every shell surface (suite D).
- AC1.7 No broken affordances (suite E).
- AC1.8 Density — switching density re-measures virtualized lists (suite H).
- AC1.9 Load-a-file slice passes E2E for Open, Trace, and Attach (headline gate).
- AC1.10 Session switch-without-close clears cache; no cross-session bleed.
- AC1.11 Context bar shows identity/scope/breadcrumb per kind; env tag tints chrome.
- AC1.12 Blocked states (incompatible/migration) show a diagnostic + a forward action, not just "close".
Risks / out of scope
- Strangler order: mirror old→bus before retiring any silo; the Inspector is the only consumer to flip (
09-shell-evolution.md). - Single-session sweep (~175
sessionIdreads) is mechanical for switch-without-close; multi-session is deferred (Compare/Diff). - Build focus on dockview
moveToNext/onDidActivePanelChange; override the default active-group accent for DS-4 (views/shell-and-dockview.md). - Don't go fully dark — the load-a-file slice (navigator + inspector) keeps the shell continuously validated.
- Out of scope: zone-D deep views (Stages 2–4), multi-session, write/edit, engine-gated data (index find, source attribution, real revision).
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Priority
None yet
Activity
nockawa commentedon May 23, 2026
Accepted implementation plan (Stage 1)
Scope: whole stage, executed in 3 dependency-ordered phases, each ending at a review hand-off. The shell spine is half-built (9-slot
useSelectionStore,useNavHistoryStore,selectionUrlSync, 5-source recency inDetailPanel, navigator data hooks all exist) — so this is largely rationalize + extend. Client-only; no API deltas.Phase 1 — Bus + Inspector + Navigators (now)
useSelectionStorewith typed leaf slots for the still-siloed selections (profiler/dbmap/dataBrowser/field) +selectLeaf(recency) +project()(projection≠leaf) +resolveChain(containment); strangler-mirror the 4 silos into the bus (parity-guarded).DetailPanel→ card-registry Inspector + context stack (leaf full + ancestor summaries), bus-driven, real-verbs-only footer.useProfilerMetadata.systems+useQueryDefinitions; wire navigators → bus.Phase 2 — Context bar + Palette prefix routing + Nav-history/deep-links (suites B, C).
Phase 3 — Keyboard/focus + Session switch-without-close + infra (
use202Query/<ViewState>/density) → completes the load-a-file slice ×3 (AC1.9) (suites D, F, G, H).AC1.1–1.12 each map to a conformance suite or the slice E2E (table in the plan). Strangler order (mirror→flip Inspector→retire) and the continuous load-a-file slice are the safety rails. Hand off "ready for review + commit" at each phase boundary.
nockawa commentedon May 23, 2026
Phase 1 complete — Bus + Inspector + Navigators ✅ (ready for review + commit)
Build-order steps 1-3 done on
feature/wb-revamp(client-only, 9 files changed + 5 new).1. Selection bus (keystone) —
useSelectionStoregains a recency-stampedleaf({type, ref, touchedAt}) across all 17 object types,select()(primary) vs the existing scalar setters (projection),clearLeaf; newselectionChain.tsresolveChain()for containment ancestors. All five silos (profiler/dbmap/dataBrowser/schema-component+field/resource) strangler-mirror into the bus leaf (parity-guarded; silos retained as detail-holders).2. Right-rail Inspector —
DetailPanelrefactored from 5-silo recency arbitration into a bus-driven card registry + context stack (leaf in full + collapsible ancestor summaries) + pin; reuses every existing detail body. Handoff footer intentionally omitted (PC-6: no dead verbs while deep panels are gated — returns with them in Stages 2-4).3. Navigators — new Systems & Queries Navigator (zone C, Trace/Attach) reusing
useProfilerMetadata.systems+useQueryDefinitions, wired into DockHost's trace/attach left edge; Resource Tree (Open) already feeds the bus. Layout-store key bumpedv5 → v6.Acceptance criteria — Phase 1
selectionBus.test.ts, 13 tests): write-through per type · idempotence · recency=leaf · projection≠leaf · containment chain · mirror-parity.Inspector.test.tsx, 5 tests); navigator loading/empty/error states.slice-load-inspect.spec.ts): load → navigator → bus → Inspector card. (Trace/Attach complete in Phase 3.)Verification
tsc✓ ·eslint✓ ·vite build✓ · Vitest 936 pass (+18 new) · Playwright slice + Stage-0 specs 6 pass.Next: Phase 2 (context bar + palette prefix routing + nav-history/deep-links). Handing off Phase 1 for review + commit.
nockawa commentedon May 23, 2026
Phase 2 complete — Context bar + Palette routing + Nav-history/deep-links ✅
Build-order steps 4-6 done on
feature/wb-revamp.4. Context bar (zone B) — new
ContextBar.tsxbetween menu and workspace: connection-dot identity + session kind, scope (@HEADfor Open,⟮ start–end ⟯time window for Trace/Attach), breadcrumb mirroring the Inspector chain off the bus (each crumb navigates the bus up the chain), and a per-file environment tag (useEnvTagStore, persisted) that tints the bar.5. Palette prefix routing —
CommandPalettenow routes''/>(commands) ·@/#(object resolution) ·:(jump to tick/page) ·?(help). New purepaletteRouting.ts(parsePaletteMode/parseJump) +objectHits.ts(buildObjectHits) resolve objects across resources/components/archetypes/systems/queries → busselect, session-kind filtered (no Systems in Open, no Resources in Trace, etc.).6. Nav-history + deep links — a generic
bus-leafnav entry records every selection (closing the old G9 gap where schema/data selections never entered history); back/forward re-drive the source store. A new?leaf=type:refURL param round-trips the navigator-object leaf (system/component/archetype);installNavHistorySyncwired into bootstrap.Acceptance criteria — Phase 2
navHistory.test.ts, 7): push-per-change · back/forward restore · capacity 100 ·?leaf=round-trip.paletteRouting.test.ts, 8): prefix routing · jump parse · object resolution per type · group order · session-kind filtering.ContextBar.test.tsx(4): identity/scope, trace window, breadcrumb navigation, env-tag persist+tint.Verification
tsc✓ ·eslint✓ ·vite build✓ · Vitest 955 pass (+19 across Phases 1-2) · Playwright slice + Stage-0 specs pass (the one redresource-tree-polishCtrl+/ test is pre-existing, unrelated — StatusBar/keyboard untouched).Next: Phase 3 — keyboard/focus (F6, roving, DS-4) + session switch-without-close + infra (
use202Query/<ViewState>/density) → completes the load-a-file slice ×3 (AC1.9).nockawa commentedon May 23, 2026
Phase 3 complete — Stage 1 shell is done ✅
Build-order steps 7-9 landed on
feature/wb-revamp.7. Keyboard & focus —
F6/Shift+F6cycle dockview panels (focusNextPanel/focusPrevPanel→moveToNext/Previous);onDidActivePanelChange→ focus-follows-navigation; DS-4 visuals inglobals.css(:focus-visiblering +.dv-active-groupaccent); focus≠selection (selection =bg-accent, focus = ring).8. Session model —
installSessionResetSyncwipes session-scoped stores (bus / nav-history / silos) onsessionIdchange → switch-without-close, no cross-session bleed; Migration/Incompatible banners gained a real forward action ("Open another file…" → Connect), dropping the disabled stub.9. Infra —
use202Query+<ViewState>(one PC-2 state-set: loading/building(202)/empty/no-selection/error-with-title+Retry); runtime density (useDensityStorecompact/comfortable,useDensityRowHeight,data-densitytokens, resource tree re-measures,Toggle Densitycommand).Acceptance criteria — full Stage 1
:focus-visible/active-panel CSS; DS-2/3 color util ships with the first colored view (Stages 2-4)Verification (whole stage)
tsc✓ ·eslint✓ ·vite build✓ · Vitest 974 pass (+56 across Stage 1) · Playwright 18 pass (1 pre-existing unrelated red:resource-tree-polishCtrl+/, StatusBar untouched).Stage 1 shell is feature-complete (21 files changed + 23 new). Two items intentionally ride with later stages, per the design's own sequencing: intra-panel roving (per-view, Stages 2-4) and the DS-2/3 categorical-color util (ships with the first colored zone-D view). Ready for end-to-end review + commit.
nockawa commentedon May 24, 2026
Closed with the Stage 1 exit gate met — all 12 ACs green + the load-a-file slice green for Open / Trace / Attach.
Build-step #9 (cross-cutting infra) is checked at the gate, but two parts are explicitly deferred (recorded here so they're not silently dropped):
use202Query/<ViewState>convergence — the dual 202 idioms already work (AC1.6 green); unifying them behind one wrapper is a cleanup refactor, not a gate item. Deferred.log-event stream — engine-gated, on the roadmap's deferred (Phase 5) list. Deferred.What did ship under step 9: DS-1 density tokens (3-mode font+spacing scale, View-menu submenu, suite-H lint) and DS-4 focus tokens.
If/when the 202/ViewState convergence is wanted, it should be its own small follow-up issue rather than reopening this stage.
Workbench redesign — Stages 1–4 + perf hardening + J2/J3 E2E (#379)