fix: ignore stale output comment bridge readiness#4511
Open
PerishCode wants to merge 1 commit into
Open
Conversation
Generated-By: looper 0.9.10+codex.autoclean (runner=worker, agent=codex)
Contributor
|
🧪 This PR changes a user-facing commenting flow, so it needs a manual QA pass before merge — please hold off self-merging for now; we'll loop QA in once it's merge-ready. |
Contributor
nettee
approved these changes
Jun 18, 2026
nettee
left a comment
Contributor
There was a problem hiding this comment.
@PerishCode I verified the stale od:url-selection-bridge-ready race fix across the daemon bridge, the FileViewer readiness guard, and the new regression test covering a URL change mid-session. The href handshake matches the existing iframe lifecycle here, the changed ranges look internally consistent, and the PR checks are green; I couldn't rerun the focused Vitest locally in this worktree because node_modules are missing and vitest is not installed in the checkout. Nice, tight fix for a subtle timing bug in the comment transport.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








































































Closes #4126
Why
A Discord report suggested that commenting on generated outputs could be broken in 0.9.0. The output viewer can URL-load HTML artifacts and rely on an injected selection bridge for comments. A late
od:url-selection-bridge-readymessage from an older raw output URL could mark the current output as comment-ready before its own bridge had responded, leaving Comment mode on the URL-loaded iframe without a live selection bridge.What users will see
Commenting on generated HTML outputs should reliably fall back to the srcDoc comment bridge until the current URL-loaded output reports that its own selection bridge is ready.
Surface area
apps/weborapps/desktop(including Electron menu bar)odsubcommand or flag, newtools-dev/tools-pack/tools-prflag, or newOD_*env var/api/*endpoint, new SSE event, or changed shape inpackages/contractsskills/,design-systems/,design-templates/, orcraft/, or change to the skills protocolTRANSLATIONS.mdfor the locale workflow)package.json(dependenciesordevDependencies); workspace-packagepackage.jsonfiles are out of scope. Include a paragraph on what we get vs. what bytes we ship (seeCONTRIBUTING.md→ Code style)Screenshots
Not applicable; no visual UI change.
Bug fix verification
apps/web/tests/components/FileViewer.test.tsx(ignores stale URL selection bridge readiness after the output URL changes)mainand green on this branch? Not run locally; this environment does not havenode,pnpm,npm, ormiseon PATH. The test is written to fail before the href check because a stale ready message would keep comments on URL-load instead of falling back to srcDoc.Validation
git diff --checkpnpm --filter @open-design/web test -- FileViewer.test.tsx file-viewer-render-mode.test.ts(blocked:pnpm: command not found)pnpm --filter @open-design/daemon test -- project-file-range.test.ts(blocked:pnpm: command not found)node --version,corepack --version,mise --version(blocked: commands not found)🔁 Powered by Looper · runner=worker · agent=codex · An autonomous AI dev team for your GitHub repos.