Fix #560: refine inline review composer (gutter triggers, row-click, multi-drafts) #562
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!562
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-560"
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?
Refines the conversation-page DiffFile inline review composer (web/src/pages/Pull.jsx), presentation only — review-anchor.js untouched.
Tests: new web/test/unit/inline-composer-560.test.js (19 tests); #560-scoped updates to two stale pins (tap-comment-555, diff-row-544). Full unit suite minus smoke: 1322 pass / 0 fail. vite build + esbuild bundle green; go vet ./internal/... clean. Docs: FIXED (#560) amendment in docs/go/12_web_ui.md + style-guideline §8 bullet update, same commit.
APPROVE — reviewed origin/main..origin/fix/issue-560 (
71b3497, 6 files +388/-72) against issue #560, verified in /tmp/walhub-560.All 9 acceptance criteria hold (presentation-only, review-anchor.js untouched):
(1) Gutter +: per-line button in w-6 gutter cell ahead of line numbers, always rendered, no hidden/group-hover/pointer-coarse indirection; old ml-2 hidden trigger gone, row body holds text only.
(2) Row click: row div onClick -> onRowClick -> stageLine (same buildAnchor path), composer renders inline below its row (draft Show inside row For, above thread cards); no file-end Show remains.
(3) Keyed drafts: createSignal(new Map()) keyed hunkIdx:rowIdx; staging is new Map(prev).set (siblings kept); each CommentComposer stays mounted per row so getBody text survives sibling adds; same-key re-stage updates anchor label without wiping text.
(4) Independent submit/cancel: per-key closeDraft, submit stages {anchor, body} into onStage then closes only its key; both paths pinned (>=2 closeDraft call sites).
(5) Shift+click: same file+side+hunk clamp, Math.min/max range, setLast only on plain path — gutter and row both forward ev.
(6) Isolation: gutter stopPropagation + row closest(button, a, input, textarea, select, [data-no-row-comment]); composers/thread cards are siblings BELOW the row so their clicks never reach the row handler; no touch handlers (tap arrives as click).
(7) #502 gate: Show on gutter + Show on composer + early return in onRowClick (3 gates, canComment plumbing unchanged).
(8) buildAnchor byte-identical: single-line NEW/OLD shapes, hash parity, pinned Go-twin vector all pass; DiffFile never hashes directly, no window.prompt.
(9) Placement/resolve/drift untouched: placement()/byKey/unplaced/freshness/unresolved-first sort + shared CommentComposer all pinned.
Also checked: a11y labels (gutter Comment on line N in + range title + F2 emerald tokens both themes; draft aria-label; focus-visible:outline ring; keyboard path via button so row div needs no role); Tailwind-only (no ui.css changes, no