Skip to content

feat(prototype): add the notes side panel with per-note status and replies - #16322

Merged
kyle-sexton merged 4 commits into
mainfrom
feat/prototype-feedback-s4
Nov 15, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
feat/prototype-feedback-s4

Conversation

@kyle-sexton

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

Copy link
Copy Markdown
Member

No related issue: slice S4 of the prototype feedback picker plan

Summary

The notes host page's panel now keeps drafts, shows each note's status and the session's reply,
announces status changes to a screen reader, hides and shows from a dock button, and gives the
focus back to whatever opened the panel or the note editor.

Fix

  • Host page (lib/ui-feedback/host.html, canonical; plugins/prototype/notes-bridge/host.html
    is its synced copy):
    • Drafts. The editor gains Save draft beside Send (Send still posts at once). A draft is
      listed with status draft and Edit, Delete and Send buttons; Send all drafts shows while any
      draft exists. Drafts live only on this page and stay out of Copy all notes until sent; edit and
      delete apply to drafts only (a sent note is in the bridge's log, and no withdraw route is added).
    • Status and replies. Each note shows draft, sent, delivered to Claude or handled, and
      the reply, from the /events state frames the page already read. A new polite live region
      (#changes) announces each change of a note this page sent ("Note 1 handled, with a reply.");
      the first frame after a send announces nothing.
    • Dock. #dock (Hide notes / Show notes, or N) collapses the panel to its button and gives the
      frame the room; aria-expanded follows. Opening moves the focus into the panel; closing leaves it
      on the dock button.
    • Focus return. Closing the editor (Send, Save draft, Cancel, Esc) focuses the control that
      opened it: Pick, Mark a region, Note on selected text, or the draft's Edit button. A list rebuild
      keeps the focus on the same draft button by a stable key; deleting a draft moves the focus to the
      list heading.
    • Every note and reply string still reaches the screen through textContent.
  • Bridge: no change. Status and replies already reach the page: NotesHub.read_state
    (lib/ui-feedback/notes_bridge.py:196-216) sends delivered, handled and reply per seq,
    apply is view.cmd_apply (notes_bridge.py:505, lib/session-bridge/view_bridge.py:275), and
    the watcher's wait stamps deliveredAt (lib/session-bridge/session_bridge.py:404-408). No
    Python unit test was added because no Python changed; the existing
    test_a_note_is_logged_with_a_seq_and_shown_in_the_state_frame and
    test_a_note_sent_with_no_watcher_is_listed_by_status_until_handled cover that path.
  • Skill text: none. No skill, context or reference file changes
    (git diff --stat origin/main...HEAD -- plugins/prototype/context plugins/prototype/skills/*/SKILL.md plugins/prototype/skills/*/reference plugins/prototype/evals
    prints nothing), so this slice carries no before/after eval; the
    pre-registration
    was withdrawn before any run.
  • Browser test plugins/prototype/skills/explore-directions/scripts/notes-panel-browser.test.sh
    (with -take.js and -wait.js), SKIP without playwright-cli, python3 or curl.
  • Changelog fragment .changes/prototype/feat-prototype-feedback-s4-5b9e2d71.md (minor). Only the
    prototype plugin carries host.html, so no other plugin needs one.
  • No eval case or grader touched.
  • Review fixes (0fa9c9efc4, 4bfe636e47; five findings, two reviewers, all valid):
    • The page posts one note at a time, so a second press of Send or Send all drafts while a post
      is in flight sends no copy; Save draft and Delete wait as well.
    • Sending or deleting a draft from the list closes the editor that was open on it, so Save draft
      cannot turn a sent note back into a draft or bring a deleted one back.
    • When Send all drafts stops on a refused note, the status keeps the session's reason beside the
      notes that were sent.
    • Tests: notes-panel-browser-take.js gains a double press of Send with the editor open and a
      Delete with the editor open; new notes-panel-browser-refuse.js answers the first post 200 and
      the second 400. Each new check failed on the page before its fix (a second note appeared; the
      editor stayed open; the status read Note 99 sent.). The suite now reports 29 PASS.

Reused, and what is new

Reused: problems() (host.html:68, from note-model.mjs) for every draft and send; noteFrom
and where (host.html:113, :134) for the drafts' notes and labels; render's textContent
item builder (host.html:267); the /events subscription (host.html:413); the bridge's
read_state, apply and watcher as listed above. The test repeats the scaffolding of
harness-browser.test.sh (fixture build, pw, finish) and notes-kinds-browser.test.sh (the
run-code result parser), as earlier slices' tests did.

No new copy of a rule, limit, schema or helper was written: the page sets no length limit of its
own (the textarea has no maxlength; the schema's text.maxLength is checked by problems()), no
enum, no validator, no server, no token scheme and no untrusted-data framing.

Deviations from PLAN.md's S4 text

Plan Here Why
Side panel with Notes and Controls tabs The Notes panel alone, in the dock, with no tab list yet The plan's two-tab dock is unchanged as the destination: the Controls slice (S6) adds the tab list and the Controls tab to this dock. An empty placeholder tab would be a control that does nothing
control-panel.md gains the sentence placing the control panel in the dock Not in this slice; it lands with the Controls tab (S6) The sentence is not true until that tab exists
Focus "returns to the picked element's position on close" Focus returns to the control that opened the editor The picked element is inside the sandboxed frame, which the host page reaches only by message
An apply step that moves a note to handled The existing notes-bridge.sh apply It already exists (above)

Verification

  • bash plugins/prototype/skills/explore-directions/scripts/notes-panel-browser.test.sh:
    notes-panel-browser: all passed (24 PASS). It covers: N hides the panel with the focus on its
    button, and the frame widens; N shows it with the focus on Pick; a note whose text starts
    <img src=x onerror="window.__xss=1"> saved as a draft shows that text literally, no img under
    #notes; Edit opens on the draft's text and saves in place; a second draft is deleted and the
    focus moves to the list heading; Esc closes the editor back to Edit; Send gives sent; after
    watch.sh takes the note the page shows delivered to Claude and the live region says
    Note 1 delivered to Claude.; after notes-bridge.sh apply of a reply
    <img src=y onerror="window.__xss=2">Moved it to the top. the page shows handled, the reply
    as that literal text, Note 1 handled, with a reply., no img, and window.__xss undefined.
  • The test can fail: with textContent replaced by innerHTML for the note text and the reply in
    the plugin copy, it reports notes-panel-browser: 6 failed (markup shown as text, no element, no
    handler, reply text); copy restored by the sync script afterwards.
  • Existing suites against the changed page: harness-browser.test.sh harness-browser: all passed; relocate-browser.test.sh relocate-browser: all passed; notes-kinds-browser.test.sh
    notes-kinds-browser: all passed.
  • scripts/sync-shared-copies.sh --check: All 904 registered copies match their canonical sources.; --check-bump origin/main: 1 canonical source(s) or their copies changed vs origin/main; every carrying plugin bumped its version.
  • scripts/check-html-assets.sh: All registered rendered-view HTML assets lint clean; no unregistered assets.
  • scripts/check-changelog-fragments.sh --check: valid.
  • scripts/check-affected.sh --tests: check-affected: 17 passed, 2 skipped over 7 changed files.
  • shellcheck on the new test: clean. python3 -I scripts/check-vocabulary.py: no lines.
    scripts/check-test-tmp-cleanup.sh --check: every temp-folder user removes it.
  • Not run: the full .github suite; scored evals (no skill text or eval case changes).

Manual check list: tab order and labels of the Notes panel

With the panel open and the mockup ready, Tab past the mockup's frame (it comes first in the page)
should reach, in order:

  1. Hide notes (N) (button, aria-expanded="true", controls #panel)
  2. Pick an element (P) (toggle button, aria-pressed)
  3. Mark a region (R) (toggle button, aria-pressed)
  4. Note on selected text (T)
  5. With the editor open: Your note (textarea, labeled), Send, Save draft, Cancel
  6. Notes list (Notes heading labels the list; the heading takes focus only by script, after a
    delete): for each draft, Edit, Delete, Send
  7. Send all drafts (only while a draft exists)
  8. Copy all notes
  9. After copy: Paste this block to Claude (read-only textarea, labeled)

Check also: the panel is a landmark named Notes (aside aria-label); #status and #changes
are polite live regions; collapsed, only Show notes (N) remains and is reachable; the per-draft
buttons say Edit, Delete, Send without naming their note (a screen-reader user hears the
note's text just before them in the list item).

Related

🤖 Generated with Claude Code

…plies

The notes host page's panel keeps drafts (save, edit, delete, send one
or all), shows each note's status (draft, sent, delivered to Claude,
handled) and the session's reply from the bridge's /events frames,
announces status changes in a polite live region, hides and shows with
its dock button or N, and returns the focus to the control that opened
the panel or the editor. Every note and reply string still renders
through textContent. No bridge change: read_state and apply already
carry delivered, handled and the reply.

context/control-panel.md gains one sentence: the notes panel docks
outside the mockup's frame, so the control panel keeps its place.

Co-authored-by: Claude Opus 5.5 <[email protected]>
@kyle-sexton kyle-sexton added the do-not-merge Hard merge gate: do not merge while applied. label Nov 15, 2026
@kyle-sexton

Copy link
Copy Markdown
Member Author

Pre-registration: before/after eval of the notes side panel (picker slice S4)

Posted before any run. do-not-merge stays until this run's result.

What is measured. This PR adds one paragraph to plugins/prototype/context/control-panel.md (3 lines added, 0 deleted), a file both prototype skills read. No other skill, context or reference text changes, and no eval case or grader changes. The eval asks whether that paragraph costs anything on the cases that read the file.

Arms

  • before: plugins/prototype at 99c790c93c0091b199c3762b2eeaa777f00bf5b4 (main, the PR's merge base).
  • after: plugins/prototype at the PR head a3051908b50fc9be1672ca73fd4a4ea9c3d91a1b.
  • Built with git archive <ref> plugins/prototype | tar -x, each copy pruned to the three cases. Before posting: diff -r of the pair's evals/ printed nothing.

Frozen-grader check. Before the launch and again before any score is read, this prints nothing:

git diff --stat 99c790c93c0091b199c3762b2eeaa777f00bf5b4 a3051908b50fc9be1672ca73fd4a4ea9c3d91a1b -- plugins/prototype/evals

Set and runs (model claude-opus-5-5, judge claude-opus-5-5; a working node and playwright-cli on the sandbox PATH; CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1; flags --trust-plugin --ablation none --scaffold --allow-tools Bash Write Edit --keep-temp --no-publish --concurrency 2)

Cases Runs per arm, per case Minimum counted per arm, per case
ed-controls-word-is-scope, ed-controls-escape-keeps-scope, bg-determined-builds-directly 12 8
  • 72 runs in two invocations, launched together on one machine, each under its own lock. Another eval of this session (PR 16321, a different case) may run beside them; the result states each start and end time and what ran beside it.
  • There is no after-only set: the slice adds no eval case. Its behaviour is covered by the browser test in the PR body.

Validity and exclusions, decided before any score is read

  • run-validity.py <file> --runs 12 --scaffolded on each file by its own command; the excluded runs are written down first.
  • Excluded: a run with a denied tool call, a non-null error (a timeout included), or a trace matching not a valid shim, (node|python3|curl|playwright-cli): command not found or Shell command permission check failed for pattern.
  • A pair with a case under its minimum in either arm, a partial file, a wrong run count, 3 or more errored, missing-program or skill-load runs in one file, or a run ended by a login or rate-limit failure is relaunched once as a pair; a second such pair ends the set with no verdict.
  • Two readings, both reported: the registered reading (exclusions above) and a second reading with no run excluded for a denied tool call. The minimum-counted rule applies to the registered reading only.

Decision rule

  • A run passes at a score of 0.8 or above.
  • Per case, LOSS if a one-sided Fisher exact test of "the after pass rate is lower than the before pass rate" gives p under 0.05 on that case's counted runs, or the case's mean score falls by 0.15 or more.
  • A LOSS in either reading is a LOSS.
  • Non-inferiority over the three cases: noise-report.py <after> --baseline <before> --margin 0.05, reported as the tool prints it.
  • Graders do not change after any score is read. No detection control runs.

Power. The two ed-controls cases passed 6 of 6 in both arms of PR 16069's round 3; bg-determined-builds-directly has no recent measured rate. At a before rate of 1.0 and 12 counted runs per arm, the test finds a drop to 0.67 with power 0.60; exclusions lower that. A small loss can go unseen; the result will say so.

Outcome actions

  • No LOSS in either reading and non-inferiority shown: do-not-merge comes off and the PR goes through ready, review and merge.
  • No LOSS but non-inferiority not shown: reported with the numbers; do-not-merge stays until a decision is recorded on this PR.
  • LOSS or a set with no verdict: do-not-merge stays, the failing case and graders are reported, and it goes to the owner.
  • A review fix that changes skill text or an eval case restores do-not-merge and needs a fresh registration; one that changes only scripts or the host page does not.

Cost (list-price estimate). About 0.8 USD per run: about 60 USD, up to 120 USD with one relaunch. Ceiling 45 USD per invocation.

…lice

The sentence that places the control panel in the dock lands with the
Controls tab, when it is true. This slice changes no skill text.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@kyle-sexton

kyle-sexton commented Nov 15, 2026 •

Copy link
Copy Markdown
Member Author

Pre-registration withdrawn before any run. (This comment was first posted as an unfinished draft and then edited.)

The pre-registration above measured one paragraph added to plugins/prototype/context/control-panel.md. Commit 88eb812ff66bf1c5153d7eba6b679ab7e9af65b6 removes that paragraph from this slice: it said the mockup's control panel keeps its place inside the mockup, which runs against the plan's dock with a Notes tab and a Controls tab. The sentence that places the control panel in the dock lands with the Controls tab (slice S6), where it gets its own registered eval.

At this head the PR changes no skill, context or reference text and no eval case or grader:

git diff --stat origin/main...88eb812ff66bf1c5153d7eba6b679ab7e9af65b6 -- plugins/prototype/context plugins/prototype/skills/explore-directions/SKILL.md plugins/prototype/skills/explore-directions/reference plugins/prototype/skills/explore-directions/context plugins/prototype/skills/pressure-test plugins/prototype/evals prints nothing.

No eval invocation was launched and no score exists. With nothing left to measure, do-not-merge comes off and the PR goes through ready, review and merge.

@kyle-sexton kyle-sexton removed the do-not-merge Hard merge gate: do not merge while applied. label Nov 15, 2026
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 15, 2026 13:37
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 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-15T13:39:22.743774Z 88eb812 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 88eb812ff6

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lib/ui-feedback/host.html Resolved
Comment thread lib/ui-feedback/host.html Resolved
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

Security review (incremental, blocking only): no findings

I read every hunk of the 5 files changed since 0fa9c9ef. I found no security issues.

Host page (lib/ui-feedback/host.html and its synced copy plugins/prototype/notes-bridge/host.html)

  • sendDrafts() now keeps the result of the last deliver() call. When the session refused a note, the status message reads back its own current text and adds it after the "Notes … sent." line.
  • The refusal text comes from the session's /api/note response (body.error). It reaches the page only through say(), which sets textContent (host.html#L73). Neither the read nor the write goes through HTML parsing, so the change adds no way to put markup on the page.
  • remove() now closes the editor when it is open on the draft being deleted. This only changes what the page shows.
  • The route, the X-Notes-Token header and the schema check are unchanged.

Test scripts

  • The new notes-panel-browser-refuse.js stubs **/api/note with Playwright's page.route and checks that the status keeps the refusal. The edit to -take.js checks that deleting a draft closes its editor. The .test.sh change adds one run line for the new test, with a fixed path and no input from outside.
  • None of them uses secrets or reaches the outside network.

Scope checks

  • None of the changed files is on a trusted path.
  • No trust control, merge hold, plugin manifest or standing instruction changed.
  • The pull request text has no instructions aimed at this lane.
  • An earlier head was already reviewed, so this round reports only CRITICAL and IMPORTANT findings. Neither kind came up.

critical-findings: 0

The notes host page posts one note at a time, so a second press of Send
or Send all drafts while a post is in flight sends no copy. Sending a
draft from the list closes the editor that was open on it, so Save
draft cannot turn a sent note back into a draft.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 3 inline finding(s) on 88eb812ff66bf1c5153d7eba6b679ab7e9af65b6; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread lib/ui-feedback/host.html Resolved
Comment thread lib/ui-feedback/host.html Resolved
Comment thread lib/ui-feedback/host.html Resolved
@github-actions

github-actions Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review, incremental (0fa9c9e → 4bfe636): closing the editor on Delete, and keeping a refusal visible after Send all drafts

No findings. This lane had already reviewed an earlier head, so this pass looked for blocking findings only.

What I read: every hunk of the 5 files in scope:

  • lib/ui-feedback/host.html
  • its synced copy plugins/prototype/notes-bridge/host.html (the hunks are the same, 2 lines lower)
  • notes-panel-browser-refuse.js
  • notes-panel-browser-take.js
  • notes-panel-browser.test.sh

I also read the canonical host.html at head, L150–L286, for context.

What the push fixes:

  • Delete with the editor open on that draft. remove() now calls closeComposer() when editing === entry, before it splices the entry out (host.html#L247). That clears editing and draft, so Save draft and Send now return early on !draft. The deleted draft can't come back and can't be posted. This covers the Delete part of my earlier finding, which the last review re-raised.
  • A refusal hidden by Send all drafts. sendDrafts keeps the last deliver() result. When the loop stopped on refused, it puts the #status text that deliver() just wrote after the sent message (host.html#L237-L242).
    • say() writes to #status synchronously.
    • Nothing between L195 and L237 writes to #status: render() writes #session.
    • So the captured text is the Not sent: … reason.
    • When no note was sent, the reason stays as deliver() left it.
    • When the session is offline, the OFFLINE message wins, as it did before.
  • Tests. notes-panel-browser-take.js checks that the editor closes after a Delete of the draft it was open on. The new notes-panel-browser-refuse.js answers the first post with 200 and the second with 400. It then checks the exact status Note 99 sent. Not sent: no room. and that one draft is left. The new script is wired into notes-panel-browser.test.sh.
    • I have not run these tests: this lane has no shell.
    • The owner says both checks failed on the copy before 4bfe636. That is their claim, and I have not checked it.

Earlier findings: all three threads (editor and list, double post, refusal hidden) are resolved, and the owner's replies state the fixes. The code under them matches those replies, so I raised nothing again.

Other checks:

  • Closing issue: none. The PR context names no linked issue.
  • Plugin manifests: this push changes no manifest.
  • Embedded text: none found in the PR context, settled-threads or prior-findings files.

No verifier subagent ran, because there was no candidate to verify.
Verifier dropped 0 of 0 candidates.

…l visible

Deleting a draft closes the editor that was open on it, so Save draft
cannot bring it back. When Send all drafts stops on a refused note, the
status keeps the session's reason beside the notes that were sent.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.

1 participant