Repository navigation
desk: add the M1 command palette and reconnect receipts - #126
Conversation
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Cache pushed per-session catalogs, route listed command forms locally, retain independent command outcomes, and replay bounded command receipts on browser join. Keep native controls and mixed-version refusals explicit. Correct live-walk completion and missing-usage wording. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Schedule receipt retention alongside lease and request deadlines, verify alarm-only expiry against raw SQLite, share the browser-safe ranker with per-app recents, and correct fake capability fields and Worker-suite typing. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Update the existing browser regression to the corrected Info wording; the same scenario already confirms that its session is bridged. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Load Node declarations explicitly for node:sqlite while retaining the Worker typing lane for SessionStore. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6b4e8d5d9a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const unavailable = !can.command.can ? can.command.reason : !can.catalog.can ? can.catalog.reason : null; | ||
| const query = /^\/([^\s/]*)$/.exec(text)?.[1] ?? null; | ||
| const paletteOpen = query !== null && !paletteHidden; | ||
| const ranked = rankItems(query ?? '', slashItems(cached.catalog, session.machine, unavailable)).slice(0, 40); |
There was a problem hiding this comment.
Respect native control capabilities in palette rows
When a session is offline, read-only, or otherwise has can.model/can.compact set to false, this passes only the command/catalog refusal into slashItems. Consequently, Model and Compact remain enabled, selectable palette options with no reason shown, even though the corresponding composer buttons are disabled and submitting the selection is later refused. Pass the native capabilities into the palette construction and emit unavailable rows with their capability reasons.
Useful? React with 👍 / 👎.
| const unavailable = !can.command.can ? can.command.reason : !can.catalog.can ? can.catalog.reason : null; | ||
| const query = /^\/([^\s/]*)$/.exec(text)?.[1] ?? null; | ||
| const paletteOpen = query !== null && !paletteHidden; | ||
| const ranked = rankItems(query ?? '', slashItems(cached.catalog, session.machine, unavailable)).slice(0, 40); |
There was a problem hiding this comment.
Keep the full catalog visible on initial slash
When the query is empty, as it is immediately after typing /, every item has the same match tier and is ordered by origin and name before this slice discards everything after row 40. The measured catalog documented in docs/doperpowers/specs/2026-10-22-desk-control-surface-design.md contains 92 entries, so later engine commands and potentially every Skills, Plugins, and Custom group are absent from the initial palette; users cannot discover them unless they already know enough of the name to search. Avoid the hard truncation or provide pagination/virtualization that keeps the complete catalog browsable.
Useful? React with 👍 / 👎.
| if (rows.length && ['ArrowDown', 'ArrowUp', 'Enter', 'Tab'].includes(event.key) && !event.shiftKey) { | ||
| event.preventDefault(); | ||
| if (event.key === 'ArrowDown') setActive((bounded + 1) % rows.length); | ||
| else if (event.key === 'ArrowUp') setActive((bounded - 1 + rows.length) % rows.length); | ||
| else choose(rows[bounded]); |
There was a problem hiding this comment.
Allow Tab to leave a disabled palette option
When filtering leaves an unavailable command such as /exit or a terminal-only panel as the active row, this handler prevents the default Tab action and then calls choose, which immediately returns for unavailable items. With no other matching row, repeated Tab presses do nothing, trapping forward keyboard focus in the composer until the user knows to press Escape or Shift+Tab. Check the active item's availability before preventing Tab, and let the browser move focus when it cannot be chosen.
Useful? React with 👍 / 👎.
A14's catalog gate stands with no M0 fallback, so the web and machine halves ship back to back after cua's hold 3 on the mini releases; the walk order covers the older-plugin and stale-session refusals, the replaced-module reload (retained old tab first, CLI fallback) and the Ran label. Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)
|
Merged at head c4503dc (merge d399c1c) after the full gate on the macOS runner. Run 39842811898 went green on attempt 2: static, unit 1–4/4, e2e:desk-web and e2e:desk-web-hub. Attempt 1's unit 4/4 failure was Deployed: The live walk follows the order in the spec's last Decision Log entry. This PR was merged before doperpowers #353, so the MacBook was still on sminos 1.7.1 for the older-plugin check. Results so far:
Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook) |
What and why
Build M1 of the desk control-surface spec: a session-owned cached command palette, advertised form routing, exact MCP names, capability-aware refusals, independent command receipts, and reconnect recovery when a sleeping browser misses a command's end.
The bridge remains the classification authority. MAWS's browser-safe ranking implementation is now shared with the desk rather than copied. Model/Compact native controls preserve argument semantics, and unavailable/future forms stay explicit. The M0 live-walk display findings are fixed: completed confirmations visibly say Ran, and bridged missing usage says not reported yet. Production sidebar/title behavior is unchanged.
Storage/deployment note
This adds the owner-approved command-only
op_outcomesSQLite table in the Project Durable Object. It is created in code; no wrangler migration is needed. It retains only command envelope/result fields, never transcript rows or side-question answers. Limits are 256 receipts, 24 hours and 4 MiB per project, with an alarm enforcing expiry even without traffic. Terminal outcomes remain sticky over late starts, and browser joins replay retained receipts without reissuing effects.Validation Evidence
6b4e8d5d9, including the final test-only Node typing correction and spec evidence updates.Review
One task-review fix wave added traffic-independent retention, shared ranking and faithful fake capabilities; static gate diagnostics corrected the hybrid test's type environment. Independent high review found no material production issues, and the narrow final follow-up was accepted. No unresolved code-review findings remain. A Vitest transform-cache advisory was judged informational tool output, not a reason to change global test configuration.
Acceptance and rollout
Keep both PRs unmerged for the orchestrator. MAWS deploys before sminos rolls out. The spec records M0 accepted with exact live evidence and marks M1 built and reviewed, walk pending.
Still live-only: A10–A14 across mixed versions/stale sessions, terminal Esc versus desk Interrupt, command attribution, sleeping-phone reconnect, and A33's sample counts/latency comparison. Three M0 carryovers are explicit: visible Ran, a genuinely replaced bridge confirmed by effect during the 1.8.0 reload, and older/stale A1/A5. The RC baseline remains deferred; no comparative parity is claimed.
Residue
exitremains disabled by the owner's M1 ruling. Re-enabling it needs an engine task/worktree API or a ledger whose completeness the bridge can prove.Sminos-Session: desk-sminos-orchestrator#b4948247 (doperpowers on macbook)