Skip to content

ui-feedback: keep a picked element or marked region drawn until its note is sent or cancelled #17800

Description

@kyle-sexton

Problem

On the prototype notes host, a dragged region or a picked element disappears the moment the comment box opens, so the reviewer types a note without seeing what it is about.

  • The frame draws the region outline only while region mode is on (lib/ui-feedback/proto-pin.js, draw(): if (region && mode && kind === "region")), and the element outline only while element mode is on (same function, if (hover && mode && kind === "element")).
  • openComposer turns the mode off first (lib/ui-feedback/host.html, setPick(null)), so the outline goes with it.

Change

  • The active selection (region box, picked element outline, selected text highlight) stays drawn from the end of the pick until the note is sent, saved as a draft, or cancelled. On send or save it becomes the note's numbered marker; on cancel it clears.
  • The page under the selection stays inert while the composer is open, as it is in pick mode.

Basis: Figma's comment flow picks a point or drags a region, then writes and sends the message (Add comments to files). No fetched tool page documents the selection's look while typing, so "stays until submit" is the owner's call (interview 2026-11-20).

Done when

  • A test drives a region pick, an element pick and a text pick through the host: the outline is present while the composer is open and gone after cancel; after send it is replaced by the numbered marker.
  • lib/ui-feedback copies stay in sync through scripts/shared-copies.txt.

Part of the owner's feedback-tool fixes, needed before the /architecture:improve report prototype review (#17798).

Activity

  1. added
    needs-triage
    on Nov 21, 2026
  2. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: lib/ui-feedback host.html and proto-pin.js, their shared copies listed in scripts/shared-copies.txt, and a new browser test; read by anyone using the prototype notes host.
    Reversible: yes; revert the change and re-sync the copies.
    Open questions: none
    Understood: the region box, element outline and text highlight should stay drawn while the notes composer is open. They become the numbered marker on send or save and clear on cancel, and the page stays inert meanwhile. The issue already picks the design and gives an exact done-when, so no owner question is needed. It is a bounded change to existing behavior, so I typed it Task. Related open issues #17802 and #17803 touch the same files, so concurrent work may conflict. It is not a duplicate, and I found no merged PR that already fixes it.

    Automated triage. A maintainer reviews it.

  3. removed
    needs-triage
    on Nov 21, 2026
  4. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane yet: no trusted-human acceptance criteria: a listed human must put the confirmed - [ ] criteria in the body or post them as their own comment, or, on an issue a listed human filed, intake's newest refinement comment must hold them unedited; intake's refinement of this body is due and may supply them.

  5. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.

    Intended outcome: A region box, picked element outline and selected text highlight stay drawn in the prototype frame while the notes composer is open, become the numbered marker on send or save, clear on cancel, with the page inert meanwhile.

    Acceptance criteria

    • lib/ui-feedback/proto-pin.js draw() draws the region box and the element outline from the end of the pick until the host clears them, not only while pick mode is on (today lines 235 and 238 require mode)
    • lib/ui-feedback/host.html openComposer (line 248) still ends pick mode but tells the frame to keep the selection drawn, e.g. through a new message type
    • A selected text pick keeps a visible highlight while the composer is open, and it is gone after cancel
    • While the composer is open the page under the selection stays inert: clicks and drags in the frame do not pick, as in pick mode
    • closeComposer on cancel (host.html:256) clears the kept outline or highlight in the frame
    • On send or save as draft the kept selection is replaced by the note's numbered marker and no outline remains
    • Opening the composer via Edit on an existing note or starting a new pick replaces or clears any earlier kept selection, so only one stays drawn
    • A browser test, in the style of notes-panel-browser.test.sh, drives a region pick, an element pick and a text pick: the outline is present with the composer open, gone after cancel, and replaced by the numbered marker after send
    • Edits to lib/ui-feedback/host.html and proto-pin.js are copied to every target listed in scripts/shared-copies.txt (lines 318-319 and 326), and the repository's shared-copies check passes
    • Existing ui-feedback tests (test_notes_bridge.py, note-model.test.mjs, the prototype browser tests) still pass

    External state: none

    Dependencies

    • Part of the owner's feedback-tool fixes; needed before the /architecture:improve report prototype review (#​17798), so it blocks that review rather than waiting on it
    • Neighbouring ui-feedback issues #​17802 (marker toggle) and #​17803 (move-arrow note) touch the same host.html and proto-pin.js, so expect merge conflicts if they run concurrently

    Related work

    Sources read

    • lib/ui-feedback/proto-pin.js:235: element outline drawn only when hover && mode && kind === "element"
    • lib/ui-feedback/proto-pin.js:238: region box drawn only when region && mode && kind === "region"
    • lib/ui-feedback/proto-pin.js:289-291: region pointer handlers act only while mode is on, which is also what keeps the page inert
    • lib/ui-feedback/proto-pin.js:334-339: text pick reads the frame's current selection via getSelection
    • lib/ui-feedback/host.html:179-188: setPick sends a mode message to the frame
    • lib/ui-feedback/host.html:244-255: openComposer calls setPick(null), turning the outline off
    • lib/ui-feedback/host.html:256-260: closeComposer has no frame message to clear a selection
    • scripts/shared-copies.txt:318-319,326: host.html and proto-pin.js are copied to plugins/prototype/notes-bridge and plugins/planning/shared/web
    • plugins/prototype/skills/explore-directions/scripts/notes-panel-browser.test.sh: existing browser test that references the host and proto-pin, a model for the new test

    Automated refinement by the lanes App. Intake triages the issue again with it.

  6. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"c6283e1fad815466222ba4b6f0afe0758e3885f9660b70463e1cba120d102792","body_sha256":"848cdf8f27a4a46cc883ba586197277601e759e6b002887ab54c59940cb76c1f"}

  7. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"c6283e1fad815466222ba4b6f0afe0758e3885f9660b70463e1cba120d102792","body_sha256":"848cdf8f27a4a46cc883ba586197277601e759e6b002887ab54c59940cb76c1f"}

  8. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor
    No description provided.
  9. github-actions commented on Nov 21, 2026

    @github-actions
    Contributor
    No description provided.
  10. melodic-automation-lanes commented on Nov 21, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped on this issue (blocked-by-pr): the work waits on an open pull request the run names, so the lane runs it again once that pull request merges or closes.
    It keeps agent-ready, and work-unblock starts it again once #17812 merges or closes (wait 1 of 2).

    In the run's words:

    A listed human's open pull request #17812 names this issue, so the lane pushed no branch and opened no pull request.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44870065350

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Work status

    needs-triage

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions