Repository navigation
fix(test): hold frame messages back in the capture phase, as the runtime now listens - #573
Conversation
…ime now listens #570 moved the frame runtime's message listener to the capture phase and made it ignore untrusted events, so the context-menu test's delay hook neither held doop:html back nor could re-dispatch it. Intercept in the capture phase and release by posting the held message again from the editor page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
[Low impact] The change is confined to one browser-test workflow. The PR appears safe to merge, with a non-blocking gap in the dismissed-menu test. Findings
SummaryRepairs the delayed HTML test by catching messages in the capture phase and posting held messages again from the editor page.
Reviews (1) · Last reviewed commit: "fix(test): hold frame messages back in t..." · Reviewed by Greptile |
| if (window !== window.parent) { | ||
| window.heldFrameMessage = event.data | ||
| return |
There was a problem hiding this comment.
The iframe branch now stores doop:context-hit in heldFrameMessage without setting releaseContextMessage. The dismissed-menu test still calls doc.evaluate(() => window.releaseContextMessage?.()), so its release does nothing. The test can pass without checking whether the old hit changes the second menu. Update that test to wait for the held message and call releaseFrameMessage().
…omponents (doop-design#573) * feat(agents): set up a component system before screens, with create_components Agents built screens without components: the guide only asked for one after a third copy, and the reuse notes spoke at the end of a write. - The guide opens with a must-do list: tokens, then a component system set up the way a designer sets up a Figma file, then screens composed from it; themes are tokens. - The brief creates the kit; COMPONENTS asks for components by judgment, from the first copy. - create_frame, append_frame_html and set_frame_html (and the resident's tools) ask for the check in their descriptions. - create_components makes up to 12 components in one call, in order, each its own unit. - COMPONENT SYSTEM notes: an empty create_frame hears to set up or use the system; a screen written without components hears what it skipped, once per stream. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(agents): refuse a create_components entry that nests a missing component A <doop-use> naming nothing renders as nothing, so a Card nesting a Button the same call refused was saved without its button for good. Each entry now runs in its own savepoint and is refused when its main reports an unknown component; the others go on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit deb965e49246c34a5b4dfc8970f43fbdc6309b26)
The rebase onto main brought doop-design#573's system-first section and doop-design#566's inspect_frame paragraph into the main guide. Drop the old "third time" component rule that doop-design#573 replaced, and raise the main guide's budget to 30,000 characters for what main added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main has been red since #570:
elementContextMenuBrowser.test.ts> waits for the matching iframe document before using a position-based selector fails on every run.#570 moved the frame runtime's
messagelistener to the capture phase and made it ignore untrusted events. The test's delay hook was a bubble-phase listener that re-dispatched a syntheticMessageEvent, so it no longer helddoop:htmlback and its release was ignored.The hook now intercepts in the capture phase (registered before the runtime, so it runs first), and a message held inside the frame is released by the editor page posting it again (
releaseFrameMessage), a trusted message from the parent as the runtime requires. The parent-side hold used by thedoop:context-hittest is unchanged.Verified locally: the old test fails on main, all 16 pass with this change.
🤖 Generated with Claude Code