Repository navigation
Description
Context
Surfaced during hardware testing of #1400 (phase-aware review dials). In canvas/review mode the
Stream Deck can now navigate an artifact and open the comment composer at the focused block
(composer-open on a dial press). But committing the comment still requires the keyboard
(Cmd+Enter to submit, Esc to cancel).
Reviewers working in this mode typically dictate the comment body, so the keyboard round-trip
just to submit or cancel breaks an otherwise hands-free flow. This issue makes submit and cancel
reachable from the deck.
#1400 deliberately scoped out any bridge/canvas change ("no bridge changes"), so this was split off
rather than folded in. The wire commands themselves already exist — composer-submit and
composer-cancel are in the CanvasCommand vocabulary (#1401), forwarded by the host, and handled
by the canvas — so the gap is purely: (a) the deck has no gesture for them, and (b) making it feel
like one control needs the canvas to decide open-vs-submit.
The design constraint
Only the canvas knows whether a composer is currently open — the deck never learns composer
state back over sendCanvasCommand (the result carries {ok, target} only). So a deck that "guesses"
the state (remembering it sent composer-open) desyncs the moment the composer is submitted/cancelled
via the keyboard or closes itself, and a wrong guess is not harmless: composer-open re-anchors the
composer and unmounts the in-progress draft (ArtifactCanvas.tsx openComposer), so a mis-fire can
discard a dictated comment. The deck must not be the party that decides.
Proposed behavior — one dial owns the composer, the other cancels
Add a single context-aware canvas command, resolved canvas-side against the state it already
tracks (composingLine):
composer-open-or-submit: if no composer is open → open at the focused block; if a composer is
open → submit it. Because the canvas makes the call, it is always correct and can never eat a draft.
Deck gesture mapping in canvas/review mode (reuses the existing review dial presses — no new keys):
- Fine dial (
Review: Changes / Blocks) press →composer-open-or-submit. Press to open at the
focused block, dictate, press again to submit. - Coarse dial (
Review: Files / Headings) press →composer-cancel. Discard the open composer
(already a guarded no-op when none is open).
This supersedes #1400's decision that both review-dial presses fire composer-open (they were
redundant), and it reverses #1400 requirement 6's "deck-driven submit/cancel — default no", now
justified by the dictation workflow.
Requirements
- New canvas command
composer-open-or-submit(or equivalent name): canvas-side resolution of
open-vs-submit fromcomposingLine; a defined no-op is not applicable (it always does one or the
other), but it must never discard an existing draft. - Add it to the closed
CanvasCommandunion (packages/types), the host allowlist
(apps/vscode/.../canvas-view-registry.tsCANVAS_COMMANDS), and the canvas action map
(packages/artifact-canvas/.../ArtifactCanvas.tsx). - Remap the two review-dial presses in canvas mode (
apps/streamdeck/.../actions.ts): fine →
composer-open-or-submit, coarse →composer-cancel. Diff-mode presses (forward file/hunk)
unchanged. - Touchstrip legibility (the Stream Deck: phase-aware review dials — canvas navigation reuses the diff dials (deck half; bridge is #1401) #1400 hard requirement) must still hold: the strip should make the
press meaning discoverable in review mode. - Text entry itself stays dictation/keyboard — this issue is submit/cancel only, not typing.
Layout note
The Stream Deck + profile is full (8/8 keys, 4/4 dials). This design adds no keys — it reuses the
two review-dial presses — so it does not reintroduce the key-budget pressure #1400 was built to avoid.
Coordinate with #1410 (fleet layout / two-zone grammar) so the composer-control mapping is consistent
with whatever Row-2 / palette work lands there.
Out of scope
- Comment body text entry (dictation/keyboard owns it).
- Any change to diff-mode dial behavior.
- The Stream Deck SD+: two-zone builder workflow (selectors + action palette, dial-driven feedback queue) #1410 fleet layout itself.
Sequencing
Follows #1400 (the dial-navigation half, which ships the composer-open press). Builds on #1401's
sendCanvasCommand bridge. Coordinate the deck mapping with #1410.
Activity
amrmelsayed commentedon Aug 12, 2026
Cross-lane split (agreed, main + streamdeck architects):
composer-open-or-submitcommand is an addition to the closedCanvasCommandvocabulary incodev-types, plus apackages/artifact-canvasresolution and a host handler. Run as a bridge-extension lane (the mirror of artifact-canvas: remote command channel for review navigation (Tower relay + sdk route) #1401), specced by main with the streamdeck architect as the deck-facing stakeholder. Settled design principle:open-or-submitresolves canvas-side so the deck never guesses composer state (and can't discard a draft) — deck stays stateless, canvas owns its state.Deck-stakeholder spec interests to resolve when the command is specced (streamdeck architect):
open-or-submitbehavior in each composer state (closed → open; open with content → submit; open empty → ?).CanvasCommandClientErrorCode) so the dial can render them.No bridge changes were made in #1400 (PR #1419); this reverses #1400's req-6 'default no' on deck submit/cancel. Unassigned/queued pending owner prioritization.
amrmelsayed commentedon Aug 12, 2026
Bridge-extension lane scoping (main; PIR spawn imminent). This lane covers the bridge half of the agreed split only:
In scope: requirement 1 (new
composer-open-or-submitcommand, canvas-side resolution fromcomposingLine, never discards a draft) and requirement 2 (closedCanvasCommandunion inpackages/types, host allowlist incanvas-view-registry.ts, action map inArtifactCanvas.tsx).Out of scope: requirement 3 (deck dial remapping) and requirement 4 (touchstrip legibility) — those are streamdeck's follow-on lane, sequenced after this command merges. Requirement 5 stands (submit/cancel only, no text entry).
Deck-stakeholder rulings and interests to honor in the plan (streamdeck architect, pre-gate):
CanvasCommandClientErrorCodeunion — no new error channel — so the dial can render them.composer-cancelis reused unchanged.Process: the plan's command-semantics section routes to the streamdeck architect for review BEFORE the plan-approval gate.
amrmelsayed commentedon Aug 12, 2026
On it! Working on this with the PIR protocol (plan + dev-approval gates before PR).
[PIR #1420] Plan draft
[PIR #1420] feat: add composer-open-or-submit canvas command
[PIR #1420] test: assert no-re-anchor; refresh CommandAdapter prose
[PIR #1420] Review + retrospective
[PIR #1420] Refs not Fixes — partial PR keeps issue open for streamde…
[PIR #1420] Rebuttal (iter1): Refs-not-Fixes accepted; non-blocking n…
[PIR #1420] thread: pr gate + consult verdicts
Merge pull request #1424 from cluesmith/builder/pir-1420
docs(release-notes): composer-open-or-submit canvas command (#1420, PR …
amrmelsayed commentedon Aug 12, 2026
Deck-mapping lane scoping (streamdeck architect; spawn pending bridge-lane cleanup). Build-time call per the agreed split: this half rides #1420 — folding into #1410 would sequence it behind #1049 panel stability and strand the prioritized hands-free flow. #1410 keeps the broader two-zone layout work.
In scope: requirement 3 — remap the canvas/review-mode review-dial presses in
apps/streamdeck(fine dial press →composer-open-or-submit, coarse dial press →composer-cancel), superseding #1400's both-presses-fire-composer-opendecision (actions.ts:605); requirement 4 — touchstrip legibility for the new press meanings. Requirement 5 stands: submit/cancel only, no text entry.Not in scope: any bridge/canvas/types change (all landed in PR #1424); reading-mode toggle and palette layout (#1410).
Protocol: PIR — dial semantics must be verified on hardware at dev-approval before a PR exists (deck is currently sideloaded from the pir-1400 worktree build; the dev-approval session will need the lane's own build linked).
amrmelsayed commentedon Aug 12, 2026
On it! Working on this with the PIR protocol (plan + dev-approval gates before PR).
amrmelsayed commentedon Aug 12, 2026
Closing: the bridge half (requirements 1, 2, 5) merged in PR #1424 —
composer-open-or-submitis live in the canvas command vocabulary, resolved canvas-side, across all four allowlists. The deck half (requirements 3–4: dial remapping + touchstrip legibility) continues in #1425 — it moved to a fresh issue because a completed porch lifecycle (project 1420, plan/review artifacts on main) can't share its issue number with a second lane.