Skip to content

fix(prototype): pin the notes host page's real-stack channel to the dev origin and detect a blocked frame by a - #17840

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-17748-44873536868-1
Nov 21, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-17748-44873536868-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Closes #17748

Summary

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

The notes host page's channel rules now live in a new module, lib/ui-feedback/frame-channel.mjs, which node tests can exercise. It has three parts. fromFrame takes a message only when e.source is the frame's window and, on a real-stack route, e.origin is the dev origin. frameTarget gives every host-to-frame postMessage the dev origin as targetOrigin. awaitReady reports the frame blocked when the helper's first ready message is missing after READY_MS (10 s). host.html arms that timer before it sets the frame's document, the first ready disarms it, the load event plays no part, and a ready that arrives late still enables the page.

Design choice: host.html serves both the sandboxed mockup and the real-stack route. The mockup's srcdoc frame has an opaque origin, and only the wildcard target reaches it. Neither host.html nor frame-channel.mjs holds a "*" literal. The bridge writes the mockup's target onto the frame tag as data-mockup-target, and only on the mockup route. frameTarget returns the dev origin, else that mockup target, else null, and host.html posts nothing without a target. The real-stack page never carries the wildcard (review round answer).

Not verified

  • node --test lib/ui-feedback/frame-channel.test.mjs and python3 -m unittest test_notes_bridge were not run here: this lane allows no interpreter, so the PR's CI runs them. check-affected's output does not show whether it ran them
  • frame-channel.test.sh is created without the executable bit (the lane allows no chmod). If the test selector needs +x, set it with git update-index --chmod=+x
  • The issue's grep criterion: host.html now holds no "" target origin, and the real-stack path never posts with one. But host.html is shared with the sandboxed mockup, whose opaque-origin srcdoc frame only "" reaches, so frame-channel.mjs keeps one "*" in frameTarget(null), the mockup-only branch.…
  • tidy: skipped. The change touches the shared paths lib/ and scripts/, and spans three areas (lib, plugins/prototype, docs/contracts) against the cutoff of one
  • No browser run of the host page against a real dev server: the tests check the module's logic and host.html's wiring by text, not a live frame
  • The working tree also lists untracked dotfiles and directories this run did not create (.bash_profile, .bashrc, .gitconfig, .idea, .mcp.json, .profile, .ripgreprc, .vscode, .zprofile, .zshrc). They look like sandbox mount points and are not part of this change

Fix

  • lib/ui-feedback/frame-channel.mjs: new module: fromFrame (source and dev-origin gate), frameTarget (targetOrigin: the dev origin, else the mockup target from the frame tag, else null), awaitReady (ready timeout) and READY_MS
  • lib/ui-feedback/frame-channel.test.mjs: new node tests: a message from another origin or another window is ignored; a real-stack post names the dev origin and host.html posts only through target; neither host.html nor frame-channel.mjs holds a "*" literal; the mockup target applies only with no dev origin, and with no target nothing is posted; a frame that sends no ready is reported blocked, one that sends it in time is not;…
  • lib/ui-feedback/frame-channel.test.sh: runner for the node tests, with test-scope on frame-channel.mjs and host.html
  • lib/ui-feedback/host.html: imports frame-channel.mjs; the message gate uses fromFrame; toFrame posts to frameTarget(devOrigin, frame.dataset.mockupTarget) and posts nothing without a target; a ready timeout with a real-stack message (the dev server may refuse framing, or the route does not load the helper) and a mockup message; the timeout is skipped after a…
  • lib/ui-feedback/notes_bridge.py: serves /frame-channel.mjs in STATIC; on the mockup route it writes data-mockup-target with the wildcard target on the sandboxed frame tag (MOCKUP_FRAME); the real-stack route still swaps the sandbox for data-dev-origin
  • lib/ui-feedback/test_notes_bridge.py: the host-page assertion names the new gate and target lines; the mockup frame carries data-mockup-target and the real-stack page holds no wildcard; the loop test copies frame-channel.mjs
  • scripts/shared-copies.txt: registers lib/ui-feedback/frame-channel.mjs to plugins/prototype/notes-bridge/frame-channel.mjs
  • plugins/prototype/notes-bridge/frame-channel.mjs, host.html, notes_bridge.py: generated copies; the review round's edits were applied to them by hand to match the canonical sources
  • docs/contracts/ui-feedback/README.md: adds frame-channel.mjs to the canonical files table; the real-stack trust rule now states the source and origin gate, the dev-origin targetOrigin, why only the mockup gets the wildcard, and that the bridge writes it on the mockup route's frame tag alone; a new rule says a blocked frame is found by a missing ready message, not by load
  • .changes/prototype/work-resolve-issue-issue-17748-44873536868-1-41f79f3f.md: patch changelog fragment

Verification

The runner ran each check from the base copy against 77836c2:

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

The run reports:

  • check-changelog-fragments: all 12 fragments valid (run twice, after the review fixes too)
  • check-changed-skills: no changed skill, nothing to gate
  • check-affected: 16 passed, 7 skipped (typos not installed, comment-hygiene fetch failed, size-check script missing, three validate-plugins steps that run checked-tree code, changed-skills); run again after the review fixes, same result
  • sync-shared-copies: regenerated the plugins/prototype/notes-bridge copies, exit 0
  • fresh-context review subagent over the whole diff: found the plugin copy of frame-channel.mjs stale (fixed by re-sync), the Firefox bug citation pointing at a closed test bug (now cites open bug 1552504), the changelog fragment leaving out the mockup (fixed), and the timeout able to overwrite a…
  • read https: //bugzilla.mozilla.org/show_bug.cgi?id=1614674: Firefox sends neither a load nor an error event for CSP-blocked frame loads; that bug depends on bug 1552504
  • read https: //bugzilla.mozilla.org/show_bug.cgi?id=1552504: open bug 'iframes blocked by CSP don't fire an onload event'; Firefox sends neither event, and a commenter suggests copying Chrome, which fires load
  • read https: //developer.mozilla.org/en-US/docs/Web/API/Window/postMessage: targetOrigin must match the recipient's scheme, host and port; "" matches any origin; data: URLs have opaque origins, so they need ""
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44873536868
  • The review round that moved the mockup target into the bridge ran no tests or checks. It only edited files. CI runs the node and Python tests on its push.

Left out: the items under Not verified.

Related

#17748

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 44876750586, attempt 1

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

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 f9f527197835112be982abb8417ee18cc2d74bbc: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #17840, incremental (b8cbc23 → f9f5271)

No security issues found. I read the whole incremental diff for both listed files. This lane had already reviewed an earlier head of this pull request, so this pass reported only CRITICAL and IMPORTANT findings. Neither file matches a trusted-path glob, and neither is a trust control or a plugin manifest.

What changed: the push adds one comment line, the same in lib/ui-feedback/notes_bridge.py and in its generated plugin copy plugins/prototype/notes-bridge/notes_bridge.py. The line is a link to the WHATWG HTML spec section on posting messages, and it sits above the existing MOCKUP_FRAME definition. No code, target origin, sandbox attribute or route logic changed. The mockup-only data-mockup-target="*" wildcard and the real-stack dev-origin pinning are exactly as they were at the head this lane reviewed before.

PR text: the description and closing issue contain no instructions aimed at this review.

Spend: none beyond the normal CI runs.

critical-findings: 0

@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: 1 inline finding(s) on 77836c2d5c2374c3201be250c291b8f2126b1148; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread lib/ui-feedback/frame-channel.mjs Resolved
@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

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

Code review: PR #17840, incremental from b8cbc23 to f9f5271 (closes #17748)

Blocking only. This lane already reviewed an earlier head, so this pass looks for blocking findings only. I read every hunk of both files in the incremental diff. I found nothing that blocks.

What changed. Push f9f5271 ("Fix failing CI checks") adds one comment line to each copy of notes_bridge.py:

# https://html.spec.whatwg.org/multipage/web-messaging.html#posting-messages

It sits above MOCKUP_FRAME. The link gives a source for the existing comment's claim that an opaque-origin srcdoc frame only matches the wildcard targetOrigin. The URL points at the WHATWG HTML "Posting messages" section, which is the right reference for that claim.

Checks

  • Behaviour. No code changed. The line is a comment in both files, so MOCKUP_FRAME and how the route serves the page are the same as at b8cbc23.
  • Plugin copy. The plugins/prototype/notes-bridge/notes_bridge.py hunk is identical to the canonical lib/ui-feedback/notes_bridge.py hunk, at the matching position (line 91 vs line 89).
  • Closing issue prototype: notes on a real-stack prototype (feedback picker slice S7) - part 1 of 4 #17748. Nothing in this push touches the criteria. The settled thread on frame-channel.mjs is still marked lines changed since resolution: no. The previous review found the grep criterion met, and that still holds.

Loosened checks. This push changes no test or check, so nothing is loosened. The prompt had no loosened_check_verdict: or loosened_check_patterns: line, so I used fail with no consumer entries. It had no loosened_check_decision_record: line either, so I did not check the citation requirement.
Loosened checks would be marked: fail (plugin default); patterns: 0

Verification. I ran nothing, because this lane has no shell. The CI fix the commit message describes is the author's claim and I did not verify it.

Spend: none beyond this review run.

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/address-feedback

Run 44879487000, attempt 1

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

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 77836c2.

@github-actions

github-actions Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/publish-feedback

Run 44879487000, attempt 1

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

Failed GitHub API calls

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

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM66TNFU
@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

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

Run 44879487000, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed b8cbc23
Run 44879487000

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on b8cbc23.

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/fix-ci

Run 44882850449, attempt 1

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

Failed GitHub API calls

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

@github-actions

Copy link
Copy Markdown
Contributor

Lane run report

Field Value
Activity pr-unblock/apply-patch

Run 44882850449, attempt 1

Field Value
Model rung 0
Leg base
Run job success
Activity step success
Commits pushed f9f5271
Run 44882850449

Failed GitHub API calls

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path is about to arm native auto-merge at head f9f527197835112be982abb8417ee18cc2d74bbc, the head its arming checks judged. The arm fails if the head moves first.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=HIGH demote=true head=f9f527197835112be982abb8417ee18cc2d74bbc rubric=10.4.4 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 21, 2026
Merged via the queue into main with commit 7767f5b Nov 21, 2026
55 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-17748-44873536868-1 branch November 21, 2026 08:29
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 7767f5bb43474de1a9fb69b341e95c897142e8c1; later checks count it verified from this comment.

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.

prototype: notes on a real-stack prototype (feedback picker slice S7) - part 1 of 4

0 participants