Skip to content

fix(preview): failed tabs no longer sit as a blank floating panel - #7236

Open
gbarros-dev wants to merge 11 commits into
pingdotgg:mainfrom
gbarros-dev:fix/preview-failed-mini-player
Open

fix(preview): failed tabs no longer sit as a blank floating panel#7236
gbarros-dev wants to merge 11 commits into
pingdotgg:mainfrom
gbarros-dev:fix/preview-failed-mini-player

Conversation

@gbarros-dev

@gbarros-dev gbarros-dev commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

A dead preview URL still counted as a live tab. The floating mini-player stayed a white rectangle, and preview_status told the agent the page was healthy.

The mini-player now shows Retry and Close on a failed load. Status reports available: false with the URL the agent actually tried, not chrome-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 / automationStatus report available: false with the requested URL and error description instead of chrome-error:// or a live title. Overlay wait only requires a live webContents so navigate/retry can still run; navigation readiness treats a finished LoadFailed as 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

  • Adds PreviewMiniPlayerUnreachable overlay to the floating mini-player with Retry and Close actions when a navigation fails
  • Adds applyPreviewLoadFailureToAutomationStatus to mark LoadFailed tabs as available:false, preserve the requested URL, and use the failure description as the title
  • Updates PreviewManager.automationStatus to return available:false and failure-derived title for LoadFailed states, including when webContents is missing or destroyed
  • Updates waitForNavigationReadiness to settle when a failed load has an attached guest, and to reject promptly if the guest is detached while unavailable
  • Updates waitForDesktopOverlay to resolve on hasWebContents rather than waiting for available:true
  • Risk: waitForNavigationReadiness now treats hasWebContents as a success condition when status.available is false; callers expecting a rejection on failed loads will instead get a resolved readiness.

Macroscope summarized a3ff688.

@coderabbitai

coderabbitai Bot commented Aug 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0efd799d-e76c-41fe-83c3-58368c01bdc9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 16, 2026

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

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

Comment thread apps/web/src/components/preview/PreviewMiniPlayerUnreachable.tsx Outdated
Comment thread apps/web/src/components/preview/PreviewAutomationHosts.tsx
Comment thread apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx
@macroscopeapp

macroscopeapp Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Comment thread apps/web/src/components/preview/ThreadPreviewMiniPlayer.tsx Outdated
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 16, 2026
@gbarros-dev
gbarros-dev force-pushed the fix/preview-failed-mini-player branch from 042078f to 20612c1 Compare August 17, 2026 07:39
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 17, 2026 07:39

Dismissing prior approval to re-evaluate 20612c1

@gbarros-dev

Copy link
Copy Markdown
Contributor Author

Rebased onto current main after #7082 / tooltip lint. Conflict was only in ThreadPreviewMiniPlayer.tsx; kept the styled tooltips and the failed-tab PiP disable (close stays available if already popped out).

Comment thread apps/web/src/components/preview/PreviewMiniPlayerUnreachable.tsx Outdated

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

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

Comment thread apps/web/src/components/preview/PreviewMiniPlayerUnreachable.tsx Outdated
Comment thread apps/desktop/src/preview/Manager.ts
@gbarros-dev
gbarros-dev force-pushed the fix/preview-failed-mini-player branch from 20612c1 to c63e973 Compare August 17, 2026 08:33
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Aug 17, 2026
@gbarros-dev
gbarros-dev force-pushed the fix/preview-failed-mini-player branch from 481bd05 to ebf9fe9 Compare August 18, 2026 08:42
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.
@gbarros-dev
gbarros-dev force-pushed the fix/preview-failed-mini-player branch from ebf9fe9 to 6c07798 Compare August 23, 2026 07:25
registerWebview now restores audio mute on attach; the LoadFailed
automation-status test was still missing those stubs after rebasing
onto mute-tab.
@macroscopeapp
macroscopeapp Bot dismissed their stale review August 23, 2026 07:26

Dismissing prior approval to re-evaluate 83b931f

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

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

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

Comment thread apps/desktop/src/preview/Manager.ts
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.
Comment thread apps/web/src/components/preview/previewNavigationReadiness.ts
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Failed browser preview remains as a blank floating panel

1 participant