Repository navigation
fix(web): address desktop preview tabs by runtime id in automation - #483
Merged
Merged
Conversation
A conflict resolution in an upstream merge kept a stale fork copy of PreviewAutomationHosts. Status and the overlay wait used upstream's previewRuntimeTabId, but navigate, snapshot, click, type, press, scroll, evaluate, waitFor, setColorScheme and recordings still passed the bare server tab id. The desktop registers webviews under the runtime id, so every one of those failed with "Preview tab not found: tab_N" while preview_status kept reporting a healthy tab. Restore upstream's file (runtime ids, viewport rollback, presentation settle, shared navigation readiness) and keep only the fork's resolveNavigableUrl for open/navigate. Add a regression test that the snapshot bridge call receives the runtime tab id. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
patroza
marked this pull request as ready for review
September 23, 2026 10:09
patroza
added a commit
that referenced
this pull request
Sep 23, 2026
#484) Fork CI on `ce3ef6b4` (#483) failed all four `citation comment source disappearance` tests in `AssistantCitationChip.test.tsx` with `TypeError: Cannot read properties of null (reading 'isServer')` from the real TanStack `Link`. The file mocks `@tanstack/react-router`, but in the `unit` project (`isolate: false`) a sibling file can bind the real module first. The file passes on its own, and the failure depends on test order, the same hazard already documented for the other entries in `isolatedUnitTestFiles`. This PR moves the file into the isolated project. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Problem
Browser automation broke in the desktop app.
preview_statusandpreview_opensucceeded, butpreview_snapshot,preview_navigate,preview_evaluate,preview_wait_for(and click/type/press/scroll/color scheme/recording) failed withPreviewAutomationExecutionError. Desktop traces show the actual cause:Root cause
Upstream moved desktop preview tabs to a runtime identity:
previewRuntimeTabId(threadRef, serverEpoch, tabId). An upstream merge into the fork kept a stale fork copy ofPreviewAutomationHosts.tsx. In that copy,statusand the overlay-ready wait use the runtime id, but every other bridge call still passes the bare server id (tab_1). So status reports a healthy tab while everything else misses it in the desktopPreviewManager.This is unrelated to the Discord browser host. The failing client was the desktop renderer host (
preview-…), notdiscord-browser-*.Fix
PreviewAutomationHosts.tsxfrom the last merged upstream commit (829af7b73a). That brings back runtime ids everywhere, the viewport rollback, the presentation settle, and the sharedwaitForNavigationReadiness.resolveNavigableUrlforopen/navigate.runtimeTabId; none diverge from upstream.Tests
The new test
PreviewAutomationHosts desktop operationschecks that asnapshotrequest reaches the desktop bridge with the runtime tab id. It fails on the currentfork/devfile and passes with this change.🤖 Generated with Claude Code