artifact-canvas: keyboard-first navigation, '+' affordance hover fix, arrow cursor (PIR #1237 batch) - #1344
Merged
Conversation
… legend; tests for all three issues
Collaborator
Author
Architect ReviewMedium-risk (single package, ~330 production lines, no shared subsystems) — reviewed on top of the clean 2-way consult (claude HIGH + codex APPROVE) and, importantly, the at-gate human testing that already exercised the running UI. All three issues delivered to scope, verified in the diff:
Approved. Note for the merge: PR closes #1232, #1236, #1237 together; #1343 (full-row affordance) remains open by design. Architect review |
amrmelsayed
added a commit
that referenced
this pull request
Aug 5, 2026
amrmelsayed
added a commit
that referenced
this pull request
Aug 5, 2026
This was referenced Aug 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PIR Review: artifact-canvas batch — keyboard-first navigation, '+' affordance hover fix, arrow cursor
Fixes #1232, Fixes #1236, Fixes #1237
Summary
One PR covering the architect-directed artifact-canvas batch. The '+' add-comment affordance no longer vanishes while the mouse travels toward it (a 200ms grace timer absorbs both the mouseleave dismiss and the block-crossing re-anchor, and the overlay pins while the pointer is on it) and now sizes against the prose with a 24×24px hit target (#1236). The read-only content body shows the arrow cursor uniformly, code blocks included (#1232). The review loop became keyboard-first: jump keys (
n/pcommented blocks,]/[headings,Home/End), focus restoration across the post-write body rebuild (submit/delete no longer strand focus at the document root), minimap dots that hand focus to their target block, and a?-toggled keys legend (#1237).Files Changed
Versus the merge-base with
main(excluding porch state and the plan/thread artifacts):packages/artifact-canvas/src/components/ArtifactCanvas.tsx(+235 / −17) — hover grace/pin machine, jump keys, focus restorationpackages/artifact-canvas/src/overlays/KeyboardHelp.tsx(+33 / −0) — new keys legend panelpackages/artifact-canvas/src/overlays/MarkerMinimap.tsx(+6 / −1) — dot activation focuses the target blockpackages/artifact-canvas/src/styles/default-theme.css(+51 / −2) — cursor rule, affordance sizing, legend stylespackages/artifact-canvas/src/components/__tests__/hover-affordance.test.tsx(+125 / −0) — newpackages/artifact-canvas/src/components/__tests__/keyboard-nav.test.tsx(+234 / −0) — newpackages/artifact-canvas/src/overlays/__tests__/marker-minimap.test.tsx(+12 / −2)packages/artifact-canvas/src/__tests__/default-theme.test.ts(+15 / −0)codev/plans/1237-artifact-canvas-keyboard-first.md,codev/state/pir-1237_thread.md,codev/resources/lessons-learned.md— protocol artifacts + lessons routingCommits
83a54648[PIR artifact-canvas: keyboard-first review navigation — jump keys, focus management audit, minimap focusability #1237] Plan draft (batch: artifact-canvas: '+' affordance disappears while mouse travels toward it; also undersized vs prose font #1236, artifact-canvas: show arrow cursor (not I-beam) over markdown content — content is read-only, comments are button-driven #1232, artifact-canvas: keyboard-first review navigation — jump keys, focus management audit, minimap focusability #1237)031f13d7[PIR artifact-canvas: keyboard-first review navigation — jump keys, focus management audit, minimap focusability #1237] artifact-canvas: '+' affordance disappears while mouse travels toward it; also undersized vs prose font #1236 hover grace+pin and 24px affordance sizing; artifact-canvas: show arrow cursor (not I-beam) over markdown content — content is read-only, comments are button-driven #1232 arrow cursor over content9d5b2dcd[PIR artifact-canvas: keyboard-first review navigation — jump keys, focus management audit, minimap focusability #1237] Jump keys, focus restoration, minimap focus handoff, keys legend; tests for all three issues07864a48[PIR artifact-canvas: keyboard-first review navigation — jump keys, focus management audit, minimap focusability #1237] Thread: record full-row affordance scope decision (architect: option a)(plus porch's own gate/phase state commits)
Test Results
pnpm --filter @cluesmith/codev-artifact-canvas build: ✓ passpnpm --filter @cluesmith/codev-artifact-canvas test: ✓ pass — 93 tests across 12 files, ~18 new (fake-timer hover-grace machine; jump keys incl. nested-list dedupe and composer guard; Esc/submit/delete focus restoration incl. the vanished-line fallback; minimap focus handoff;?legend; CSS rule assertions)dev-approvalgate: the human reviewer exercised the running worktree, confirmed the keyboard loop, and probed the hover model's edges — which surfaced the inert-zone finding below (resolved by architect scope decision, not a code change).Architecture Updates
No arch changes — the batch is interaction behavior internal to the
@cluesmith/codev-artifact-canvascomponent (hover state machine, keyboard handling, CSS). No module boundaries, state stores, ports, or cross-package contracts changed; the package's D2/D5/D6 adapter contracts and the #863 overlay anchoring model are unchanged in shape.Lessons Learned Updates
Two entries routed to the COLD tier (
codev/resources/lessons-learned.md, UI/UX section — spec-narrow recipes, not cross-cutting rules, so no HOT displacement):Things to Look At During PR Review
ArtifactCanvas.tsx,activateFromHover/scheduleDismiss): one shared timer covers dismiss and re-anchor — a fresh hover, focus move, or overlay-enter cancels it. The stale-pin escape hatch (overlay unmounted under the pointer without a mouseleave: pin is ignored when no overlay is up, and reset inopenComposer) is the trickiest branch; it's what keeps the machine from wedging after a click on '+'.html/markerschanges, which is exactly when the reload lands; if the host never writes (rejected intent), the pending ref is simply consumed by the next rebuild, which is harmless but worth knowing.codev/projects/1237-*/— see the architect notification for dispositions if any returned REQUEST_CHANGES.How to Test Locally
pir-1237→ View Diffafx dev pir-1237; package playground:pnpm --filter @cluesmith/codev-artifact-canvas dev:examplefrom the worktree]/[between headings →n/pbetween commented blocks → Enter → type → ⌘/Ctrl+Enter → focus returns to the block → delete via card action → focus returns to the block →?toggles the legend, Esc closes it