Skip to content

feat(ui-feedback): toggle that shows or hides every note marker - #17847

Merged
kyle-sexton merged 2 commits into
mainfrom
fix/ui-feedback-marker-toggle
Nov 21, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
fix/ui-feedback-marker-toggle

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Closes #17802.

Summary

Sent notes leave numbered markers over the mockup, and with many notes they crowd it. The notes host's dock now has Hide markers (M), which hides every marker, and Show markers (M), which brings them back.

Fix

  • lib/ui-feedback/host.html: the toggle sits beside Hide notes (N), outside the panel, so it still works when N has closed the panel. M toggles it, except while typing in a text field. The host keeps the choice in sessionStorage and sends it to the frame on every ready, so it survives a reload for the tab's run. It never calls setPick or closes the composer.
  • lib/ui-feedback/proto-pin.js: a new markers message sets a flag, and draw() skips only the badges when it is off. Hover, region and held outlines still draw, so hiding markers never ends a pick. The default is shown, so the planning shared page, which never sends the message, keeps every marker.
  • Markers never take page clicks: the marker layer already has pointer-events: none, and that is unchanged.
  • Copies regenerated with scripts/sync-shared-copies.sh. The only planning file touched is the synced plugins/planning/shared/web/proto-pin.js.

Not built here: clicking a marker to open its note. It moved to #17801, which builds the notes list a marker would open (issue #17802 now says so). This PR guarantees that markers never take a click.

Verification

Run locally on Windows:

  • node --test lib/ui-feedback/note-model.test.mjs: 141 pass. That is the 138 already there plus three new ones. Two fail without the frame change: markers hidden and shown again, including pins that arrive while hidden; and a region pick that keeps its outline and still commits with markers hidden. The third passes either way, since the frame ignores an unknown message. It guards that a markers handler leaves the pick alone: an element pick still posts pinned, and its held outline survives markers off.
  • plugins/planning/shared/tests/test_server.py TestPrototypePage: 8 OK. The inlined pin helper matches the synced copy.
  • Syntax checks: node --check on proto-pin.js, bash -n on the new test script, and a parse of the take script and of host.html's module script.
  • lib/ui-feedback/test_notes_bridge.py: it has local-only TestLoop failures and connection errors in TestGuards. TestGuards fails the same way on the main checkout, and this PR does not change notes_bridge.py.

Only CI can verify:

  • New plugins/prototype/skills/explore-directions/scripts/notes-markers-browser.test.sh, which drives the real notes host with playwright-cli. It is the issue's Done-when test. It cannot run on this Windows machine, because browser-test-helpers.sh's mkdir -m 700 fails for every browser test. It runs in CI's Test Bash lane. Its steps:

    1. Send note 1 pinned on the switcher's Next variant button, and confirm that elementFromPoint finds the button under the marker.
    2. Press M during an element pick: the markers go and the pick stays on.
    3. Click where the marker was: the variant switches from A to B.
    4. Reload: the toggle still says the markers are hidden.
    5. Send note 2: no marker is drawn.
    6. Press the toggle: marker 2 appears.

    Markers for notes from before the reload do not come back, because the host keeps only the current load's notes. Restoring them is note history, ui-feedback: list a run's notes after reload, with hover and click to show each note's box #17801.

Related

🤖 Generated with Claude Code

The notes host's dock gets Hide markers (M), beside Hide notes so it
works with the panel closed. The host sends the frame a markers message;
proto-pin.js then skips the badges in draw() and leaves the hover,
region and held outlines alone, so hiding markers never ends a pick.
The choice is kept in sessionStorage and re-sent on ready, so it lasts
across reloads for the tab's run. A host that never sends the message,
such as the planning shared page, keeps every marker drawn.

Closes #17802.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

PR body contract — issue linkage

This PR body conforms to the issue-linkage contract. Nothing to do.

@github-actions github-actions Bot added the needs-issue-linkage Pull request body has no issue linkage line; set by the check-contract step, advisory. label Nov 21, 2026
The host posts pins before release, so once the held outline is gone
the frame has the new pins; checking for no marker before that point
passed whatever the hidden state was.

Name the changelog fragments by the branch slug, as ADR 0048 asks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T07:12:10.293648Z 6644522 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

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

Security review: PR #17847, show/hide toggle for note markers

I found no security issues in this change.

What I checked

  • Frame message (lib/ui-feedback/proto-pin.js and its synced copies): the new markers handler only sets a boolean (markers = m.on !== false) and redraws. It sits in the same message handler as the existing message types and adds no sink. The flag only controls whether the existing badge() calls run. It adds no innerHTML, eval or URL use, and no new data from the frame goes back to the host.
  • Host (lib/ui-feedback/host.html and its plugins/prototype/notes-bridge/host.html copy): the value it writes to sessionStorage is only "0" or "1". It reads that value back only with !== "1". It posts {type:"markers", on} to the frame through the existing toFrame helper. The new button text is a fixed string set with textContent. The iframe keeps sandbox="allow-scripts" unchanged.
  • New browser test (notes-markers-browser.test.sh and notes-markers-browser-take.js): it substitutes the __PORT__ placeholder in the take script with sed, using the port the existing browser-test-helpers.sh serve step chose. The page it drives is a local loopback server. Nothing in the test takes input from the pull request or an outside source.
  • Changelog fragments and unit tests: these are prose and test code only.

Scope: none of the 10 changed files matches a trusted-path glob. The change touches no plugin manifest, workflow, trust control, merge hold or instruction file. The planning and notes-bridge proto-pin.js copies are identical generated copies, and their paths do not change what the code does. The PR context file contains no text aimed at the review lane.

critical-findings: 0

@github-actions

Copy link
Copy Markdown
Contributor

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

Code review: PR #17847, show/hide toggle for note markers

No findings. I read all 9 files in scope. plugins/prototype/notes-bridge/proto-pin.js has the same change as plugins/planning/shared/web/proto-pin.js, so I read that once. Its path changes nothing about what the content does.

What I checked

  • Host wiring (lib/ui-feedback/host.html and its synced copy plugins/prototype/notes-bridge/host.html):
    • setMarkers runs before the frame is ready, which is safe. toFrame is defined earlier (host.html:111) and does nothing until ready.
    • The ready handler sends the saved choice again, so the frame learns it on every load, including after a reload.
    • The m key is handled after the existing checks that skip text fields and Ctrl/Alt/Meta (host.html:524-525), so typing in the composer never toggles markers.
    • setMarkers never calls setPick and never closes the composer, which matches the issue's rule that hiding markers never ends a pick.
  • Frame (proto-pin.js, all three copies): draw() skips only the badges. Hover, region and held outlines still draw. The default is shown, and m.on !== false keeps it shown for any other value, so the planning shared page, which never sends the message, behaves as before.
  • Tests:
    • The three new unit tests in note-model.test.mjs cover hide then show, pins that arrive while hidden, a region pick that still commits, and an element pick whose held outline survives.
    • The new browser test follows notes-hold-browser.test.sh line for line and covers each Done-when step: hide the markers, click the control under where a marker was and see it act, reload, show the markers again.
  • Closing issue ui-feedback: a toggle that shows or hides every note marker on the prototype #17802:
  • Changelog fragments: bump: minor for prototype, which gains a feature, and bump: patch for planning, which only receives a synced copy. Both levels fit the change.
  • Path-scoped rules: cost-claims.md and skill-bodies-state-current-rules.md match the new scripts under plugins/prototype/skills/**. The scripts make no cost claims and are not skill bodies, so neither rule applies.
  • Verification: the author's results (141 unit tests passing, TestPrototypePage passing, the browser test running only in CI) are the author's claims. I had no shell, so I ran none of them.

Loosened checks would be marked: fail (default, no loosened_check_verdict:/loosened_check_patterns: lines in the prompt); patterns: 0. No check was loosened. The prompt had no loosened_check_decision_record: line, so I did not check the citation requirement.

Verifier dropped 0 of 0 candidates.

@github-actions github-actions Bot removed the needs-issue-linkage Pull request body has no issue linkage line; set by the check-contract step, advisory. label Nov 21, 2026
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit ad2a497 Nov 21, 2026
124 of 125 checks passed
@kyle-sexton
kyle-sexton deleted the fix/ui-feedback-marker-toggle branch November 21, 2026 07:34
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 0, survived 1, timeout 0, no coverage 0, invalid 0, not run 6.
Covered-code score 0%; mutation score 0%.

File Killed Survived Timeout No coverage Invalid Not run
lib/ui-feedback/proto-pin.js 0 0 0 0 0 3
plugins/planning/shared/web/proto-pin.js 0 0 0 0 0 1
plugins/prototype/notes-bridge/proto-pin.js 0 0 0 0 0 2
plugins/prototype/skills/explore-directions/scripts/notes-markers-browser-take.js 0 1 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/prototype/skills/explore-directions/scripts/notes-markers-browser-take.js:2 other unclassified none

The run's summary has the full report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui-feedback: a toggle that shows or hides every note marker on the prototype

1 participant