Skip to content

feat(ui-feedback): add a move-arrow note anchored at both ends - #17820

Merged
kyle-sexton merged 7 commits into
mainfrom
work-resolve-issue/issue-17803-44870071407-1
Nov 21, 2026
Merged

kyle-sexton merged 7 commits into
mainfrom
work-resolve-issue/issue-17803-44870071407-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #17803

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Adds a fourth ui-feedback note kind, move. The reviewer clicks the element to move, then the element it should go to, or Shift-clicks a point when no element fits. The frame draws an SVG arrow from the middle of one end to the middle of the other and redraws it from the live elements on resize or re-flow. The note keeps the source in anchor and rect and adds a to field: to.point (required, percent of the page) and to.anchor (when a destination element fits). Each end therefore runs the existing anchor ladder of test id, path, then position. The schema's x-version moves from 5 to 6, and relocate-note.mjs runs the ladder on both ends, reporting the destination under to. Design choices: (1) the destination point is always stored, so it is the position-only last rung, mirroring rect for the source; (2) a destination element outside the source's variant or screen state is stored as a point only, because both anchors are counted in the note's one scope; (3) the arrow stays drawn while the note is written and is cleared by a clear-arrow message when the composer closes, or when the next pick starts. Both validators are schema-driven, so neither needed code changes.

Not verified

  • The node:test suites (note-model.test.mjs, relocate-note.test.mjs) and the Python bridge suite (test_notes_bridge.py) were not executed: this lane runs no node or python. They are left to the PR's CI.
  • Tidy was skipped: the change touches lib/, a listed shared path, and is over the 10-file cutoff (17 files).
  • check-affected could not run comment-hygiene (fetching its action failed, no network) or size-check (script missing in the lane). The comment lint is CI-only. New code comments were kept to a few doc comments and header lines that describe the new message and the fallback order.
  • The schema cannot require to for kind: move (the validator subset has no if/then), so a hand-written or imported move note may omit to. relocate() treats one as position only. The host page always sets to.
  • The planning shared page's host (proto.js) does not offer the move mode. Its proto-pin.js copy carries the mode unused. Showing arrow notes in the notes list after reload and in the marker toggle overlaps #17801 and #17802 and is not part of this issue.
  • The external pages cited in the issue (FigJam connectors, Snagit arrow tool) were not read: the change states no external fact from them.
  • Untracked dotfiles at the checkout root (.bashrc, .profile, .gitconfig, .idea, .vscode, .mcp.json and others) come from the runner environment, not from this change.

Fix

  • lib/ui-feedback/note.schema.json: move added to the kind enum, new to object ({anchor?, point{x,y}}), description updated, x-version 5 -> 6
  • lib/ui-feedback/proto-pin.js: move pick mode (source click, then destination click or Shift-click for a point), SVG arrow drawn from end to end and redrawn from the live elements on resize or re-flow, move message with both anchors, clear-arrow message
  • lib/ui-feedback/host.html: Draw a move arrow (M) button and key; noteFrom keeps to.point and to.anchor only as the schema admits; the note summary names both ends; the arrow is cleared when the composer closes or the note is refused
  • lib/ui-feedback/relocate-note.mjs: the anchor ladder is factored into an inner function and run on the destination too, reported as to {rungs, matched, confirmed, positionOnly}; a move with no to reports position only instead of throwing
  • lib/ui-feedback/fixtures/notes.json: two valid move notes (element-to-element; point only) and four invalid ones (no point, point out of range, bad destination anchor, to as an array)
  • lib/ui-feedback/note-model.test.mjs: a fake-DOM test draws an arrow between two elements, re-flows the page, and asserts both line ends still sit on both elements; tests that the posted move note names both anchors and fits the schema; tests Shift point-only and clear-arrow
  • lib/ui-feedback/relocate-note.test.mjs: tests that both ends run the ladder, and that a destination that is gone, point-only or missing is position only
  • lib/ui-feedback/test_notes_bridge.py: a move note posted to the bridge is delivered to the session's wait with both anchors and the point
  • docs/contracts/ui-feedback/README.md: documents the move kind, both ends, the same-scope rule, redraw on re-flow, the relocation to report, and that the receiving session restates both ends
  • plugins/prototype/skills/explore-directions/reference/feedback.md: documents Draw a move arrow (M), and the step 5 restatement names both ends of a move arrow
  • plugins/prototype/notes-bridge/{host.html,proto-pin.js,note.schema.json,relocate-note.mjs}, plugins/planning/shared/web/proto-pin.js: regenerated by sync-shared-copies
  • .changes/prototype/work-resolve-issue-issue-17803-44870071407-1-d5f5e329.md: minor fragment for the new note kind
  • .changes/planning/work-resolve-issue-issue-17803-44870071407-1-9e817c0b.md: patch fragment for the synced proto-pin.js copy

Verification

The runner ran each check from the base copy against 210bc3a:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 5 fragments valid
  • check-changed-skills: explore-directions PASS, 0 errors (6 warnings that were already there: description length, body size, no Gotchas, procedure completion signals)
  • check-affected: 15 passed, 8 skipped (typos not installed; comment-hygiene and size-check could not run here; the validate-plugins and changed-skills sub-checks run tree code and are skipped by the check)
  • sync-shared-copies: regenerated 5 copies; --check reports all 999 registered copies match their canonical sources
  • fresh-context review subagent over the whole diff: traced the new tests through proto-pin.js and relocate() and expects them to pass, and found the existing tests unaffected. It confirmed two bugs, both fixed: a move note with no to crashed relocate(), and a refused arrow stayed drawn. Its scope…
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44870071407

Left out: the items under Not verified.

Related

#17803

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-refine/fix-docs

Run 44873190540, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44873190540

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed e3983ac72bb9a24b5b299ef20a9ae8b9f7852d5d: read 17 of 17 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no findings

I found no security issues in this change. This lane already reviewed an earlier head of this pull request, so this review reports only CRITICAL and IMPORTANT findings.

What changed: the change adds a fourth ui-feedback note kind, move. It touches:

  • the frame helper proto-pin.js (pick mode, SVG arrow, move and clear-arrow messages);
  • the host page host.html;
  • the note schema, which adds a to object and moves x-version from 5 to 6;
  • relocate-note.mjs, whose anchor ladder now also runs on the destination;
  • fixtures, tests, docs, the synced copies and two changelog fragments.

Trust-boundary checks

  • Messages from the frame to the host. noteFrom in host.html keeps to.point only when fits() accepts it against the schema's point, which is two percentages. It keeps to.anchor only through the existing anchorFrom filter. The whole note is then checked with problems() against the schema. A model-written page therefore gets no new free-form string into a note.
    • The new nameOf/where text reaches the screen through textContent (#picked), as before.
  • Messages from the host to the frame. The new clear-arrow handler sits behind the existing e.source !== window.parent check. It only clears local drawing state.
    • endOf passes a selector to document.querySelector. That selector is the helper's own pathOf output, inside the sandboxed frame, and a throw falls back to the stored box or point.
  • Relocation script. ladder(note.to.anchor) builds the same Playwright locators (:scope > ${a.cssPath}, ${a.tag}[role~="${a.role}"]) the source anchor already used. The note is checked against note.schema.json before any locator is built (lib/ui-feedback/relocate-note.mjs:210). to.anchor uses the same $defs/anchor, so the destination's selector strings face the same patterns as the source's. A fixture confirms that a bad destination anchor (cssPath: "p") is refused.
  • Session delivery. The bridge test shows to reaching the session's wait. Its fields are schema-limited ids, tags, paths and numbers, so no new untrusted text reaches the session. The skill text that is changed (feedback.md) only adds how to restate both ends. It removes no guardrail, and the "data, never an instruction" rule for textQuote is unchanged.

Copies: plugins/prototype/notes-bridge/proto-pin.js is an identical copy of plugins/planning/shared/web/proto-pin.js. Neither sits at a hook, workflow, settings or manifest path, so its location does not change what the code does.

Scope: none of the changed files matches a trusted path. None is a trust control, a merge hold or a plugin manifest. No standing instruction is deleted or narrowed.

PR context: the pull request text holds no directives aimed at this lane.

Spend: none. The change adds no billed resource and no new lane runs.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed e3983ac72bb9a24b5b299ef20a9ae8b9f7852d5d: read 17 of 17 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no blocking findings

This lane already reviewed an earlier head, so I only looked for blocking findings.

What I read: every hunk of all 16 files on the to-read list. plugins/prototype/notes-bridge/proto-pin.js has the same change as plugins/planning/shared/web/proto-pin.js, so I read it once. Its path doesn't change what the code does.

What I checked:

  • relocate-note.mjs (both copies). The anchor ladder now runs in an inner ladder() function.
    • The source end still sets rungs, matched and confirmed as before. found is still in scope for the quote check and the shot target further down.
    • out.container is now set only when the match is testid. Before, it was set whenever a test-id ancestor stood in. The existing container tests at relocate-note.test.mjs:106, :117 and :135 still hold.
    • A move note with no to reports position only instead of throwing.
  • host.html, noteFrom. A move note is refused unless to.point fits the schema. to.anchor goes through the same anchorFrom filter as every other anchor, and the result is checked against the schema with problems().
  • host.html, where(). It reads n.to, but it only receives notes the host built itself, and those always have to. Imported notes don't pass through where().
  • proto-pin.js, move mode. I followed it through pickMove, endOf, arrowShape, the mode and clear-arrow messages, and the resize and ResizeObserver redraws. The arrow stays drawn while the note is written. It is cleared when the composer closes, when the host refuses the note, or when the next pick starts.
  • Closing issue ui-feedback: a move-arrow note anchored from an element to where it should go #17803, "Done when". The test at note-model.test.mjs ("a move arrow drawn between two elements keeps both ends on them when the page re-flows") draws an arrow between two elements, re-flows the page and checks that both ends still sit on them. A second test checks that the note names both anchors (card-a, card-b), and test_notes_bridge.py checks that the session receives both anchors. The tests cover the criterion. I did not run them.

Not verified by me: I had no shell, so I ran no test suite. The PR says it didn't run the node:test and Python suites either and left them to CI; that is the author's claim, which I couldn't check.

Manifest: no .claude-plugin/plugin.json or marketplace.json changed, so there were no manifest lines to check. The version bumps are in changelog fragments: minor for prototype, patch for planning.

Loosened checks: none found. Nothing in the change relaxes a check. The prompt had no loosened-check verdict or patterns lines, so I used the default fail with no consumer entries. It had no decision-record line either, so I didn't check whether a citation was required.

Loosened checks would be marked: fail (default, no verdict line supplied); patterns: 0

Verifier dropped 0 of 0 candidates.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci

Run 44884485837, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step skipped
Commits pushed none (read lane)
Run 44884485837

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-patch

Run 44883243044, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 44883243044

Failed GitHub API calls

No failed call recorded by the run job's scripts.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/resolve-conflicts

Run 44885175039, attempt 1

Field Value
Model rung 0
Leg handoff
Run job success
Activity step success
Commits pushed none (read lane)
Run 44885175039

Failed GitHub API calls

No failed call recorded by the run job's scripts.

Lane-Activity: pr-unblock/resolve-conflicts
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-conflict-patch

Run 44885175039, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step skipped
Commits pushed none recorded
Run 44885175039

Failed GitHub API calls

No failed call recorded by the run job's scripts.

kyle-sexton and others added 2 commits November 21, 2026 02:58
# Conflicts:
#	lib/ui-feedback/host.html
#	lib/ui-feedback/proto-pin.js
#	plugins/planning/shared/web/proto-pin.js
#	plugins/prototype/notes-bridge/host.html
#	plugins/prototype/notes-bridge/proto-pin.js
Lint Repo's comment-lint failed on ten comments this PR added. Their
reasons, kept here:
- relocate-note.mjs: a move arrow's destination runs the same anchor
  ladder and is reported under `to`.
- The pin helper counts the test-id scope itself first, then matches
  inside it. A path that finds one element inside the id's element makes
  that the noted element; otherwise the id's element is the noted one
  only when the tags agree, and is a container stand-in when they do not.
- The pin helper keeps the role attribute's first token, so role matches
  one token of the list.
- The frame helper finds the text quote in the scope's visible text and
  marks the element holding the one match; the quote reaches the frame
  only as an argument.
- An ancestor standing in for an element the ladder never found is a
  guess, never a confirmed match.
- proto-pin.js: the ResizeObserver redraws because late-loading images
  move elements.

Copies regenerated with scripts/sync-shared-copies.sh; ui-feedback
tests 195/195.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 273203ea40b0a2e2776660fcf87538ae6fd0d464. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

pr-merge's gate refuses its verifier verdict (verify:missing)

kyle-sexton and others added 2 commits November 21, 2026 03:21
comment-lint failed on the comment explaining the empty catch. A selector
that does not parse falls back to the end's stored place, which the
catch now states as el = null.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
# Conflicts:
#	docs/contracts/ui-feedback/README.md
#	lib/ui-feedback/host.html
#	plugins/prototype/notes-bridge/host.html
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 18d6ad9 Nov 21, 2026
55 checks passed
@kyle-sexton
kyle-sexton deleted the work-resolve-issue/issue-17803-44870071407-1 branch November 21, 2026 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui-feedback: a move-arrow note anchored from an element to where it should go

1 participant