You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a headless server preview tab crashes and reopenCrashedTab replaces its dead Playwright page with a fresh about:blank page while preserving tab.crash, preview_status reports the crashed URL in status.url and status.loadError.url but reports url: null for that same tab in status.tabs. In statusWithTitle (apps/server/src/preview/ServerBrowser.ts), status.tabs checked candidate.page.url() === "about:blank" before consulting loadErrorOf(candidate)?.url, whereas top-level statusUrl checked loadError?.url first.
Deterministic repro on origin/main (b020481e35c72c07183cec265dcde54e618e906a):
Open a headless server preview tab, navigate/commit https://example.com/app?..., emit a renderer crash event (so reopenCrashedTab replaces the page with about:blank and preserves tab.crash), and invoke preview_status (operation: "status").
Or run the extended crash regression case in apps/server/src/preview/ServerBrowser.test.ts:
vp test run apps/server/src/preview/ServerBrowser.test.ts -t "a tab whose renderer crashes stays open instead of vanishing"
Observed on origin/main:status.url and status.loadError.url are the crashed URL (capped at 2048 chars), while status.tabs.find((entry) => entry.tabId === tabId)?.url is null.
Expected:status.tabs.find((entry) => entry.tabId === tabId)?.url matches status.url and status.loadError.url.
Change
Extracted a shared statusUrlOf(tab, loadError) helper in apps/server/src/preview/ServerBrowser.ts and used it for both status.url and each entry in status.tabs inside statusWithTitle, so loadErrorOf(candidate)?.url is always consulted before falling back from "about:blank" to null. ServerBrowser.ts is the only producer of PreviewAutomationStatus, so this covers all preview_status and automation status responses across web, desktop, and mobile agents; added assertions on status.url and status.tabs to the existing crash test in apps/server/src/preview/ServerBrowser.test.ts.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
Base failure (b020481e35c72c07183cec265dcde54e618e906a):vp test run apps/server/src/preview/ServerBrowser.test.ts -t "a tab whose renderer crashes stays open instead of vanishing" failed with AssertionError: expected null to be 'https://example.com/app?aaaaaaaaaaaaa…' at status.tabs?.find((entry) => entry.tabId === tabId)?.url (while status.url passed).
Head pass (b95b97940b1724cd90d1cdc8c1bea026a58b410a): The same targeted test passed (1 passed | 126 skipped).
Changed checks:vp env exec --node 26.13.1 vp run check:changed exited 0 (format, lint, knip, graphql, typecheck across 3 packages, and test across 2 files: 129 passed, including all 127 tests in ServerBrowser.test.ts).
Not shown: Manual live Chromium renderer crash in the full Electron desktop app; verified via ServerBrowser's real statusWithTitle / reopenCrashedTab path over PreviewAutomationBroker.
Authored by Gemini 4 Neon (Antigravity); reviewed by GPT-6.2 Sol (Codex).
Not shown
apps/server/src/preview/ServerBrowser.test.ts:2355 — The transcript exercises the real crash-recovery path with a simulated Playwright event and stops at the broker. Note that a live headless Chromium crash through the MCP endpoint was not run, and that reproducing the red test on base requires applying the two new assertions without the fix.
scripts/check-changed.ts:490 — The linked transcript contains the focused red/green runs, but not the reported check:changed exit on HEAD. Attach the HEAD-stamped check summary if available.
Macroscope's review found this PR approvable — Preview status tab listings now retain the recorded crash URL when the renderer reports about:blank, matching top-level status behavior. The change is limited to status reporting and preserves existing thread scoping.
You can add or adjust custom eligibility rules. Learn more.
No actionable comments were generated in the recent review.
Walkthrough
The browser status response now uses a shared helper to derive URLs for the active tab and listed tabs. Tests check that crashed-tab URLs are truncated to 2,048 characters.
Changes: Browser status URL handling
Layer / File(s)
Summary
Derive and report tab status URLs apps/server/src/preview/ServerBrowser.ts, apps/server/src/preview/ServerBrowser.test.ts
A shared helper derives status URLs from load errors or page URLs. The active-tab and tab-list status paths use it. Tests assert that crashed-tab status and tab-list URLs are truncated to 2,048 characters.
This change makes the preview status tab list keep the crashed page's URL after a renderer crash, matching the top-level status URL. The new test covers the blank replacement-page case. No merge-blocking risk remains.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the fix (preview_status tabs list preserving the crashed URL after a renderer crash) and the affected area (server). The raw summary confirms the change: a shared statusUrlOf helper ma…
Description check
The description follows the template's main sections: Problem, Change, Scope, and Verification. The Problem section gives the bug, the cause in statusWithTitle, and a deterministic repro with expected…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the fix (preview_status tabs list preserving the crashed URL after a renderer crash) and the affected area (server). The raw summary confirms the change: a shared statusUrlOf helper makes listed tabs report the load-error URL even when the page URL is about:blank. The title is specific and matches the main change, though its length (86 characters) is somewhat long.
Full details: Description check
Explanation
The description follows the template's main sections: Problem, Change, Scope, and Verification. The Problem section gives the bug, the cause in statusWithTitle, and a deterministic repro with expected and observed behavior. The Change section explains the statusUrlOf helper and the test additions. Scope explains why no issue is linked. Verification lists the base-fail and head-pass runs, the check:changed result, and what was not tested. The template asks for before/after screenshots only for UI changes, which does not apply here. Two items remain open: the 'Not shown' notes flag a missing live headless Chromium crash run and a missing HEAD-stamped check:changed summary. The description also includes a stray t3-pr-hunter tracking comment and an unrelated 'Not shown' section at the end.
Resolution
Optional improvements: attach the HEAD-stamped check:changed summary, state the live headless Chromium crash that was not run, and remove the tracking comment and trailing 'Not shown' notes from the final description.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 43328e8 and be28a32.
Files selected for processing: 2
apps/server/src/preview/ServerBrowser.test.ts
apps/server/src/preview/ServerBrowser.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
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
size:S10-29 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
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
After a headless server preview tab crashes and
reopenCrashedTabreplaces its dead Playwright page with a freshabout:blankpage while preservingtab.crash,preview_statusreports the crashed URL instatus.urlandstatus.loadError.urlbut reportsurl: nullfor that same tab instatus.tabs. InstatusWithTitle(apps/server/src/preview/ServerBrowser.ts),status.tabscheckedcandidate.page.url() === "about:blank"before consultingloadErrorOf(candidate)?.url, whereas top-levelstatusUrlcheckedloadError?.urlfirst.Deterministic repro on
origin/main(b020481e35c72c07183cec265dcde54e618e906a):https://example.com/app?..., emit a renderercrashevent (soreopenCrashedTabreplaces the page withabout:blankand preservestab.crash), and invokepreview_status(operation: "status").apps/server/src/preview/ServerBrowser.test.ts:origin/main:status.urlandstatus.loadError.urlare the crashed URL (capped at 2048 chars), whilestatus.tabs.find((entry) => entry.tabId === tabId)?.urlisnull.status.tabs.find((entry) => entry.tabId === tabId)?.urlmatchesstatus.urlandstatus.loadError.url.Change
Extracted a shared
statusUrlOf(tab, loadError)helper inapps/server/src/preview/ServerBrowser.tsand used it for bothstatus.urland each entry instatus.tabsinsidestatusWithTitle, soloadErrorOf(candidate)?.urlis always consulted before falling back from"about:blank"tonull.ServerBrowser.tsis the only producer ofPreviewAutomationStatus, so this covers allpreview_statusand automation status responses across web, desktop, and mobile agents; added assertions onstatus.urlandstatus.tabsto the existing crash test inapps/server/src/preview/ServerBrowser.test.ts.Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
b020481e35c72c07183cec265dcde54e618e906a):vp test run apps/server/src/preview/ServerBrowser.test.ts -t "a tab whose renderer crashes stays open instead of vanishing"failed withAssertionError: expected null to be 'https://example.com/app?aaaaaaaaaaaaa…'atstatus.tabs?.find((entry) => entry.tabId === tabId)?.url(whilestatus.urlpassed).b95b97940b1724cd90d1cdc8c1bea026a58b410a): The same targeted test passed (1 passed | 126 skipped).vp env exec --node 26.13.1 vp run check:changedexited0(format,lint,knip,graphql,typecheckacross 3 packages, andtestacross 2 files:129 passed, including all 127 tests inServerBrowser.test.ts).ServerBrowser's realstatusWithTitle/reopenCrashedTabpath overPreviewAutomationBroker.Authored by Gemini 4 Neon (Antigravity); reviewed by GPT-6.2 Sol (Codex).
Not shown
check:changedexit on HEAD. Attach the HEAD-stamped check summary if available.