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 8 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: Approved 481bd05 Straightforward bug fix adding error state handling for failed preview tab navigations. The new UI component is simple, changes are well-scoped to the preview feature, and comprehensive tests are included. You can customize Macroscope's approvability policy. Learn more. |
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
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.
Reviewed by Cursor Bugbot for commit 20612c1. Configure here.
20612c1 to
c63e973
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.
481bd05 to
ebf9fe9
Compare

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 status and overlay readiness paths agents rely on; behavior is narrowed for LoadFailed but incorrect staleness handling could misreport availability.
Overview
Failed preview navigations no longer look like a healthy blank tab.
preview_statusand desktopautomationStatusnow returnavailable: false, keep the requested URL (notchrome-error://), and surface the error description as the title.The floating mini-player hides the live surface on
LoadFailedand shows a newPreviewMiniPlayerUnreachableoverlay with friendly copy plus Retry and Close. Automation overlay wait logic only requires webview attachment so failed tabs stay reachable for retry; page health is applied viaapplyPreviewLoadFailureToAutomationStatuson status responses.Reviewed by Cursor Bugbot for commit ebf9fe9. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix failed preview tabs to show an unreachable overlay instead of a blank panel
chrome-error://panel.PreviewMiniPlayerUnreachableoverlay component that displays the failure message with Retry and Close actions.ThreadPreviewMiniPlayerhides the live browser surface and renders the unreachable overlay whennavStatusisLoadFailed; the PiP toggle is disabled unless already popped out.applyPreviewLoadFailureToAutomationStatusis introduced as a shared helper to consistently enforce unavailable status onLoadFailedstates across desktop and no-desktop paths.PreviewManager.automationStatusinManager.tsis updated to return the requested URL and error description for failed or destroyed webContents.Macroscope summarized ebf9fe9.