Skip to content

fix: ignore stale output comment bridge readiness#4511

Open
PerishCode wants to merge 1 commit into
mainfrom
looper/4126-bug-output-commenting-may-be-6a17a3e736982d5a
Open

fix: ignore stale output comment bridge readiness#4511
PerishCode wants to merge 1 commit into
mainfrom
looper/4126-bug-output-commenting-may-be-6a17a3e736982d5a

Conversation

@PerishCode

@PerishCode PerishCode commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

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-ready message 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

  • UI — new page / dialog / panel / menu item / setting / empty state in apps/web or apps/desktop (including Electron menu bar)
  • Keyboard shortcut — new or changed
  • CLI / env var — new od subcommand or flag, new tools-dev / tools-pack / tools-pr flag, or new OD_* env var
  • API / contract — new /api/* endpoint, new SSE event, or changed shape in packages/contracts
  • Extension point — new entry under skills/, design-systems/, design-templates/, or craft/, or change to the skills protocol
  • i18n keys — added new translation keys (see TRANSLATIONS.md for the locale workflow)
  • New top-level dependency — adding any new entry to the root package.json (dependencies or devDependencies); workspace-package package.json files are out of scope. Include a paragraph on what we get vs. what bytes we ship (see CONTRIBUTING.md → Code style)
  • Default behavior change — changes what existing users experience without opting in (default model, default setting, file/SQLite schema, auto-network on startup, auto-install)
  • None — internal refactor, docs, tests, or translation update only

Screenshots

Not applicable; no visual UI change.

Bug fix verification

  • Test path that reproduces the bug: apps/web/tests/components/FileViewer.test.tsx (ignores stale URL selection bridge readiness after the output URL changes)
  • Did the test go red on main and green on this branch? Not run locally; this environment does not have node, pnpm, npm, or mise on 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 --check
  • Attempted pnpm --filter @open-design/web test -- FileViewer.test.tsx file-viewer-render-mode.test.ts (blocked: pnpm: command not found)
  • Attempted pnpm --filter @open-design/daemon test -- project-file-range.test.ts (blocked: pnpm: command not found)
  • Attempted 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.

Generated-By: looper 0.9.10+codex.autoclean (runner=worker, agent=codex)
@lefarcen lefarcen added size/S PR changes 20-100 lines risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps type/bugfix Bug fix needs-validation Runtime change detected; needs human or /explore agent validation. labels Jun 18, 2026
@lefarcen lefarcen requested a review from nettee June 18, 2026 06:37
@lefarcen

Copy link
Copy Markdown
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.

@github-actions

Copy link
Copy Markdown
Contributor

Visual regression review

Head: 5ce880c · Base: 48da58f

6 changed · 32 unchanged · 0 missing baseline · 0 failed

Changed cases

Case Main PR Diff
visual-avatar-local-agent-list main pr diff
visual-integrations-use-everywhere main pr diff
visual-settings-byok main pr diff
visual-settings-byok-model-dropdown main pr diff
visual-settings-byok-openai main pr diff
visual-settings-local-cli main pr diff
Unchanged cases
Case Main PR Diff
visual-avatar-menu main pr diff
visual-critical-settings main pr diff
visual-critical-workspace main pr diff
visual-critical-workspace-preview main pr diff
visual-design-system-detail main pr diff
visual-design-systems main pr diff
visual-home main pr diff
visual-home-catalog main pr diff
visual-home-context-picker main pr diff
visual-home-plugin-filter main pr diff
visual-home-plugin-use-staged main pr diff
visual-home-plugin-use-with-query main pr diff
visual-home-staged-attachment main pr diff
visual-integrations main pr diff
visual-integrations-mcp main pr diff
visual-new-project-modal main pr diff
visual-onboarding-runtime main pr diff
visual-plugin-details main pr diff
visual-plugin-share-menu main pr diff
visual-plugins main pr diff

Visual diff is advisory only and does not block merging.

@nettee nettee 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.

@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.

🔁 Powered by Looper · runner=reviewer · agent=codex · An autonomous AI dev team for your GitHub repos.

@lefarcen lefarcen requested a review from AmyShang-alt June 18, 2026 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-validation Runtime change detected; needs human or /explore agent validation. risk/high High risk: apps/desktop, daemon, auth, migration, workflows, package deps size/S PR changes 20-100 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Output commenting may be broken in 0.9.0

3 participants