Skip to content

[Bug]: Picture-in-picture fails after the browser preview's WebContents is destroyed #40146

Closed

Description

@pul1ng

Area

apps/desktop

Steps observed

  1. Open a page in the T3 Code desktop browser preview.
  2. Later, try to open picture-in-picture for that same preview tab.

The failure was observed after the preview's webview had been destroyed. The action that triggered the destruction and a reliable way to reproduce it are still unknown.

Expected behavior

Picture-in-picture opens. If the underlying webview is gone, T3 Code recovers the preview or offers a way to reopen it.

Actual behavior

Opening picture-in-picture fails with PreviewWebContentsNotFoundError. The desktop preview manager still associates the tab with WebContents 2, which Electron already destroyed. PreviewManager.requireWebContents fails before the floating window is created.

Version and environment

T3 Code Beta 0.1.11 on macOS 15.3.2 (Apple silicon, arm64).

Log evidence

Selected trace fields from November 21, 2026 (UTC+08:00). The preview tab key is omitted.

11:49:39.800  renderer-history  surface=preview event=destroyed webContentsId=2
12:50:46.318  desktop trace    PreviewManager.requireWebContents
                                PreviewWebContentsNotFoundError: WebContents 2 not found for preview tab [redacted]
                                via PreviewManager.openPictureInPicture (desktop:preview-pip-open)

Impact

Picture-in-picture failed for the affected preview. The frequency is unknown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions