fix(preview): failed tabs no longer sit as a blank floating panel - #7236
fix(preview): failed tabs no longer sit as a blank floating panel#7236gbarros-dev wants to merge 11 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
One finding: the new mini-player overlay's buttons inherit pointer-events: none from the mini-player root, so Retry/Close can't be clicked.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
042078f to
20612c1
Compare
Dismissing prior approval to re-evaluate 20612c1
|
Rebased onto current main after #7082 / tooltip lint. Conflict was only in |
There was a problem hiding this comment.
One finding on the new mini-player unreachable overlay: the host line can overflow the floating player because nothing constrains or truncates it.
Posted via Macroscope — UI Consistency
20612c1 to
c63e973
Compare
481bd05 to
ebf9fe9
Compare
A dead preview URL still has WebContents, so the mini-player rendered a white rectangle and preview_status reported the tab as available. Surface Retry/Close on LoadFailed and mark automation status unavailable.
chrome-error:// is not navigable. available:false plus the Chromium error title already mark the tab dead; status.url stays the page the agent tried.
The listener map was typed as never[], so calling did-fail-load with a real event payload failed tsgo.
…layer The floating preview root is pointer-events-none. The overlay now opts back in so the buttons work, matching the drag chrome and resize handle.
A successful retry can make desktop status available before the server snapshot catches up. Trust live availability on the desktop path. Also disable native PiP on the failed mini-player, matching the full panel.
Disabling the toggle on LoadFailed also blocked closing an already-open separate window. Only prevent opening while the page is unreachable.
LoadFailed still has a live guest. Waiting on available:false blocked navigate and retry. The wait now keys off hasWebContents. The overlay also truncated neither the host nor hostless file/data URLs.
ebf9fe9 to
6c07798
Compare
registerWebview now restores audio mute on attach; the LoadFailed automation-status test was still missing those stubs after rebasing onto mute-tab.
Dismissing prior approval to re-evaluate 83b931f
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 83b931f. Configure here.
LoadFailed reports available:false with a live guest. waitForNavigationReadiness was still polling for available:true, so navigate to a dead URL hung until timeout instead of returning the error status.
available:false + loading:false is LoadFailed only while the webview is still attached. A destroyed webContents now fails as an unavailable target instead of completing waitForNavigationReadiness.

A dead preview URL still counted as a live tab. The floating mini-player stayed a white rectangle, and
preview_statustold the agent the page was healthy.The mini-player now shows Retry and Close on a failed load. Status reports
available: falsewith the URL the agent actually tried, notchrome-error://.Closes #7212.
Implemented with Grok 4.6 through Grok CLI.
Note
Medium Risk
Touches preview automation availability and navigation-wait semantics used by agents. Logic is localized with tests, but a wrong available/wait distinction could stall or mis-target automation.
Overview
Failed preview navigations no longer look healthy or sit as a blank mini-player. The floating player now overlays Retry / Close with a friendly error, hides the chrome-error surface, and disables PiP until the guest recovers.
preview_status/automationStatusreportavailable: falsewith the requested URL and error description instead ofchrome-error://or a live title. Overlay wait only requires a live webContents so navigate/retry can still run; navigation readiness treats a finishedLoadFailedas settled but still rejects a detached guest.Reviewed by Cursor Bugbot for commit a3ff688. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Show unreachable overlay for failed preview tabs instead of a blank panel
PreviewMiniPlayerUnreachableoverlay to the floating mini-player with Retry and Close actions when a navigation failsapplyPreviewLoadFailureToAutomationStatusto markLoadFailedtabs asavailable:false, preserve the requested URL, and use the failure description as the titlePreviewManager.automationStatusto returnavailable:falseand failure-derived title forLoadFailedstates, including when webContents is missing or destroyedwaitForNavigationReadinessto settle when a failed load has an attached guest, and to reject promptly if the guest is detached while unavailablewaitForDesktopOverlayto resolve onhasWebContentsrather than waiting foravailable:truewaitForNavigationReadinessnow treatshasWebContentsas a success condition whenstatus.availableis false; callers expecting a rejection on failed loads will instead get a resolved readiness.Macroscope summarized a3ff688.