feat(ui): Ctrl-K command palette #101
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lz/agent-nexus!101
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/command-palette"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue #96, design D7. Fourth and last PR in the chain — stacked on #100, merge after it.
A filter over the
workspacesstore, an overlay, and a keydown listener.Index = every workspace, every session, and each of the five
DockViews for each of them, plusNew workspace….Enteropens the highlighted target's terminal;Tabnarrows to that target's views;Escapebacks out of the narrowing before it closes the palette, so leaving costs the same keystrokes as entering.An empty query is not "everything": it shows the two groups worth showing unprompted — Needs you (workspaces stuck in
pulling/bootingor errored, and previews awaiting approval) and Recent. Once the operator types, the list is flat and ranked — grouping there put a pending-port row above the workspace you just named, andEnterthen opened the wrong thing.Two deliberate deviations from the spec
GET /api/previews/pending, behind the same operator gate as everything else. Without it the group can only report half of what it promises.Tabstep into "the D3 menu, rendered inline". Half of that menu (new-session,Container logs) is wired to component-local state a palette cannot reach, so a faithful version would ship rows that do nothing — and each newonPickswitch is a new place for exactly that.Tabnarrows to the target's views instead: the drill-down a palette is for, with nothing dead in it.Also here, because the palette is what makes them reachable
Ctrl-Kchip — the whole affordance on a phone. Hidden off the main page, where the palette is not mounted and it would do nothing.NewWorkerModalmoves fromWorkersup toMainSplit: three surfaces raise it now and only one is the list. Focus returns to whichever raised it.The binding
isPaletteChordis a pure predicate with its own test, because the interesting part is what it must not match and that is only checkable in a test. Measured in a real browser:Ctrl-K/Ctrl-PpreventDefaultCtrl-Shift-KCtrl-Kwith caps lock'K'withshiftKey: falseCmd-KVerification
Gates: 4875 files / 0 errors 0 warnings, 113 files / 1075 tests, lint clean.
Browser (seeded instance,
playwright-cli): open by chord / chip / rail footer; the Needs-you group against seeded stuck workspaces and pending previews; ranking;Tabdrill andShift-Tab;Enteropening a panel and recording a recent; the modal from all three entry points with focus return; and the mobile layout at 390px.New unit tests:
palette-index.test.ts(index construction, the Needs-you predicate, shell-preview routing to the workspace target, token filtering and ranking),palette-chord.test.ts,palette-recents.test.ts.Rebased after the spec audit
Rebased onto the updated #100. One conflict resolution worth naming: both branches added a
VIEW_LABELrecord topanel-target.ts, which is a compile error together. The palette's copy stayed — it documents why the ellipsis onSettings…belongs at the call site rather than in the name.Verified after the rebase that the palette and the new menu work together:
Ctrl-Kstill opens, the rail's pinned footer (Search / +) coexists with the rail's new context menu, and the fleet-wideworkspaces.portCount()feeds the sharedmenuContextForrather than the per-card fetch it replaced.Rebased again after #100's review pass. Gates at this tip: 4889 files / 0 errors 0 warnings, 117 files / 1133 tests, lint clean.
f6d4619931fc2872ba4efc2872ba4ed164870f48