Skip to content

feat(floating-workspace): multi-monitor targeting, display identification, and popout state retention - #20467

Open
poggufanz wants to merge 13 commits into
stablyai:mainfrom
poggufanz:feat/floating-workspace-multi-monitor
Open

poggufanz wants to merge 13 commits into
stablyai:mainfrom
poggufanz:feat/floating-workspace-multi-monitor

Conversation

@poggufanz

@poggufanz poggufanz commented Sep 13, 2026 •

Copy link
Copy Markdown

ELI5

When you use multiple monitors, you can now move the floating workspace window to any connected display from the window controls. Moving the window between displays or docking it back won't reload or reset your browser tabs (like YouTube videos or music playback).

What Changed

  • Added display selection to the floating workspace window controls, letting you send the window to any connected monitor or identify displays with screen overlays.
  • Kept browser tab state alive across display transitions and popouts. We capture media playback position, scroll offset, and the live URL right before moving, then restore them when the webview mounts in the target window. YouTube URLs get their timestamp (&t=...s) preserved directly.
  • Scoped Radix dropdown menus, submenus, and dialogs to the popout window's portal container so they don't render back on the primary screen.
  • Fixed an issue where clicking away or blurring the window left pointer-events: none stuck on the body, making the window unclickable until reload.
  • Cancelled tab drag sessions whenever the window or webview loses focus so ghost drag previews don't stay attached to the cursor.
  • Updated popout window unminimize logic to restore directly to the target monitor bounds instead of jumping back to display 1.
  • Kept address bar shortcuts (Cmd/Ctrl+L) working when focused inside the detached window.
  • Checked background launch flags (ORCA_BACKGROUND_LAUNCH and isWindowlessLaunch) so automated tests and CI runs don't pop up visible windows or steal desktop focus.

Why

  • Moving a <webview> across Electron BrowserWindow instances re-creates the DOM node. Without capturing playback state and scroll offsets before the move, tabs reload from scratch and video/audio resets to 0:00.
  • Popout windows live in their own DOM document (popupWindow.document). Radix UI defaults portals to document.body of the main window, which made dropdown menus appear on the wrong monitor.
  • Blurring a window during active tab drags or menu dismissals frequently left lingering drag state or Radix pointer-lock styles on the body, locking user input.

Linked Issue

Fixes # (N/A - standalone fix and feature for floating workspace multi-monitor support)

Visual Proof

Before

image image image

After

image image image image image

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Tested locally on Windows 11 with a dual-monitor setup:

  1. Opened floating workspace, played a YouTube video, and detached to monitor 2. Verified video resumed at the exact playback second without resetting to 0:00.
  2. Clicked the Displays icon to confirm the menu opens locally on the popout window instead of jumping to the main screen.
  3. Switched focus to an external app and back. Verified clicks, scrolling, and typing worked immediately.
  4. Minimized the detached workspace and restored it. Confirmed it restored on monitor 2, not monitor 1.
  5. Automated test suites added/updated:
    • src/shared/browser-url-equivalence.test.ts
    • src/renderer/src/components/floating-terminal/use-floating-workspace-popout.test.ts
    • src/renderer/src/components/floating-terminal/FloatingTerminalDisplaysMenu.test.tsx
    • src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.test.tsx
    • src/renderer/src/components/browser-pane/host-guest/browser-page-progress-retention.test.ts
    • src/main/window/privileged-window-navigation.test.ts
    • src/main/window/floating-workspace-display-manager.test.ts

AI Disclosure

Used DeepInvestigator subagent for codebase review and edge case checking.

Review

  • Cross-platform: Tested Windows sentinel coordinates (x: -32000) on minimize/restore. Checked mixed-DPI work areas. Keybindings use CmdOrCtrl and platform checks.
  • SSH and Remote: Process exit logic keeps the unverifiedPtyLoss rule for SSH disconnections. WebRTC policy is enforced on popout webviews to avoid IP leaks over SSH proxies.
  • Performance: DOM tree scanning in browser progress capture is scoped and throttled. Style sync clones tags cleanly without leaking nodes on re-renders.
  • Security: Window opening is strictly restricted to about:blank#floating-workspace with context isolation and sandboxing intact. IPC handlers verify isTrustedUIRenderer.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Author Twitter/X: @mfanxz

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

- Add multi-monitor display enumeration IPC and display manager in main process.
- Support moving floating workspace to secondary monitor via window popout portal.
- Fix webview capabilities, security hooks, and scoped focus in popout window.
- Fix tab pointer activation across multi-window DOM boundaries.
- Fix terminal paste focus checks and Radix UI portal container scoping for popouts.
…docking

- Add popout window minimize, restore, and focus IPC methods in main and preload.
- Invoke popout window minimize on floating workspace minimize action in detached mode.
- Preserve detached workspace state on secondary display rather than docking to main monitor.
… fix popout restore

- Set parent: null on popout window so Windows DWM treats it as an independent top-level window.
- Track bounds across move/resize and restore popout window to last known bounds on secondary display.
- Use isSurfaceActive in FloatingTerminalPanelSurface and controller so child panes render properly in detached popouts.
- Add Identify Displays feature rendering temporary numbered overlays on all connected monitors.
- Add FloatingTerminalDisplaysMenu dropdown to pick target display directly.
…ence, dock progress race, and background launch policy
@poggufanz poggufanz changed the title fix(floating-workspace): multi-monitor support, popout state retention, and overlay scoping feat(floating-workspace): multi-monitor targeting, display identification, and popout state retention Sep 13, 2026
Resolves tab-drag-pointer-sensor conflicts: keep upstream 'ended' cancellation latch and the branch lost-capture buttons guard; synthetic drag moves in the upstream test now carry buttons:1.

Extracts BrowserAddressBar initial-click selection into browser-address-bar-initial-click.ts so the merged file stays under max-lines.
@poggufanz
poggufanz marked this pull request as ready for review September 13, 2026 10:47
Copilot AI lite review requested due to automatic review settings September 13, 2026 10:47

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@poggufanz
poggufanz force-pushed the feat/floating-workspace-multi-monitor branch from fbe4adb to 8d7523f Compare September 13, 2026 10:59

@pullfrog pullfrog 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.

Important

Two changes reach outside the floating workspace: an app-wide autoplay switch and a display-overlay path that ignores the headless launch policy. Both have narrower fixes. A third early-return in the restore state machine can leave a stale minimized display.

Reviewed changes

  • Multi-monitor targeting — new main-process floating-workspace-display-manager.ts + floatingWorkspace:getDisplays/moveToDisplay/moveToNextDisplay/identifyDisplays/minimize/restore/isMinimized/focus IPC, shared calculateTargetDisplayBounds/findNextDisplay, and a renderer displays menu.
  • Popout retention — floating-workspace-popout-restore.ts tracks last/minimized bounds and display, repositions on minimize/restore, and reveals through showWindowWithoutStealingFocus; createMainWindow.ts wires did-create-window for orca-floating-workspace.
  • Portal scoping — PopoutPortalContainerContext + useResolvedPortalContainer thread Radix portals into the popout document across dialog, dropdown, select, popover, tooltip, sheet, command, hover-card, and context-menu primitives.
  • Browser progress retention — captures/restores scroll, media, and URL across webview recreation (browser-page-progress-retention.ts) with YouTube timestamp rewriting and browser-url-equivalence.ts.
  • Input/focus hardening — window-scoped listeners, tab-drag cancellation on lost button/blur, pointer-events recovery, and popout-aware address-bar/terminal handling.
  • Security — popout child window is allow-listed only for about:blank#floating-workspace + orca-floating-workspace, with sandbox/contextIsolation and the shared webview attachment guard.

ℹ️ Nitpicks

  • use-floating-workspace-popout.ts:255: the docked branch of moveToNextDisplay computes displays[(currentIndex + 1 + length) % length], so a null currentDisplayId (findIndex → -1) selects displays[0]. That contradicts the shared findNextDisplay, which prefers the first non-primary when the current display is unknown. It is unreachable through the UI today (the displays menu always passes onMoveToDisplay), so either delete the branch or route it through findNextDisplay.
  • The preload floatingWorkspace.restore and floatingWorkspace.focus methods have no renderer callers; if the popout lifecycle never calls them, drop the surface rather than ship dead IPC.
  • floating-workspace-display-manager.test.ts:290-298 pins the maximized-restore case with expect(setBoundsCall.x).toBeGreaterThanOrEqual(1920), and the moveToNextDisplay test never asserts the chosen display. An exact expected x/display would have caught the selection inconsistency above.
  • floating-workspace-popout-restore.ts:305-312: the inner setTimeout in onRestore is not assigned to restoreTimeoutId, so resetPopoutRestoreState cannot cancel it; it can run against a replacement window and clobber its flags.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

Comment thread src/main/startup/configure-process.ts Resolved
@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: cd34e7e5-b16d-4292-86de-34100308c656

📥 Commits

Reviewing files that changed from the base of the PR and between 8d7523f and a724dd3.

📒 Files selected for processing (27)
  • src/main/browser/doc-preview-failure-notice.test.ts
  • src/main/browser/doc-preview-failure-notice.ts
  • src/main/ipc/floating-workspace-monitor.ts
  • src/main/startup/configure-process.ts
  • src/main/window/createMainWindow.ts
  • src/main/window/floating-workspace-display-identify.ts
  • src/main/window/floating-workspace-display-manager.test.ts
  • src/main/window/floating-workspace-popout-restore.ts
  • src/main/window/privileged-window-navigation.ts
  • src/preload/api/floating-workspace-api.ts
  • src/preload/api/floating-workspace-bridge.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-progress-retention.test.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-progress-retention.ts
  • src/renderer/src/components/browser-pane/navigate/use-browser-page-webview-url-sync.test.tsx
  • src/renderer/src/components/browser-pane/navigate/use-browser-page-webview-url-sync.ts
  • src/renderer/src/components/floating-terminal/use-floating-workspace-popout.test.ts
  • src/renderer/src/components/floating-terminal/use-floating-workspace-popout.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-paste-listeners.ts
  • src/renderer/src/components/ui/command-dialog-slots.test.tsx
  • src/renderer/src/components/ui/command.tsx
  • src/renderer/src/components/ui/popover.tsx
  • src/renderer/src/components/ui/tooltip-view-blur.test.tsx
  • src/renderer/src/components/ui/tooltip.tsx
  • src/renderer/src/lib/dom-realm.test.ts
  • src/renderer/src/lib/dom-realm.ts
  • src/renderer/src/lib/editable-target.ts
  • src/renderer/src/lib/floating-workspace-terminal-actions.ts
💤 Files with no reviewable changes (1)
  • src/preload/api/floating-workspace-api.ts
🚧 Files skipped from review as they are similar to previous changes (11)
  • src/renderer/src/components/ui/popover.tsx
  • src/renderer/src/components/floating-terminal/use-floating-workspace-popout.test.ts
  • src/renderer/src/components/browser-pane/navigate/use-browser-page-webview-url-sync.test.tsx
  • src/renderer/src/components/ui/tooltip.tsx
  • src/main/startup/configure-process.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-progress-retention.ts
  • src/renderer/src/components/browser-pane/navigate/use-browser-page-webview-url-sync.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-progress-retention.test.ts
  • src/renderer/src/components/floating-terminal/use-floating-workspace-popout.ts
  • src/main/window/floating-workspace-popout-restore.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-paste-listeners.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The change adds a floating workspace that can detach into a popup, move between displays, identify monitors, and restore window state. Main-process IPC and preload APIs expose these operations. Renderer components provide detached terminal rendering, display controls, portal scoping, and dialog routing. Browser progress is captured and restored across remounts. Focus, paste, drag, and pointer handling now use auxiliary-window document contexts. Tests cover the new display, popout, portal, progress, and multi-window behavior.

Priority: ➖ Normal

Merge Risk: 🟡 Moderate · up to a724d

In a detached floating workspace, tab drags, keyboard shortcuts, focus handling, and address-bar suggestion dismissal can fail because events and elements belong to the popout window. These core popout interactions should be corrected before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the change, rationale, visual proof, testing, security, compatibility, and checklist requirements. However, the required linked issue is missing because it contains only `Fixes … Add the actual issue number or URL after Fixes # and remove the N/A placeholder.
Docstring Coverage ⚠️ Warning Docstring coverage is 13.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 120 functions across 62 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary changes: multi-monitor targeting, display identification, and popout state retention.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the change, rationale, visual proof, testing, security, compatibility, and checklist requirements. However, the required linked issue is missing because it contains only Fixes # (N/A...).

  • Fix all pre-merge checks with AI

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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 13

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (2)
src/renderer/src/components/tab-group/tab-drag-pointer-sensor.ts (1)

61-68: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Remove main-window instanceof checks from auxiliary-document paths.

A node from window.open() is not an instance of the main window's Node, Document, or HTMLElement. getOwnerDocument therefore selects the main document for a real popout target. isXtermHelperTextarea also rejects the popout terminal helper. The sensor then misses popout events, and terminal focus ownership remains false.

  • src/renderer/src/components/tab-group/tab-drag-pointer-sensor.ts#L61-L68: Resolve ownerDocument with realm-independent properties or the target realm's constructors.
  • src/renderer/src/components/tab-group/tab-drag-pointer-sensor.test.ts#L91-L100: Use an iframe or another real browsing context so the test creates foreign-realm nodes.
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-listeners.ts#L230-L231: Make isXtermHelperTextarea realm-independent before using it with targetDoc.activeElement.
Proposed realm-independent checks
 function getOwnerDocument(target: EventTarget | null): Document {
-  if (target instanceof Document) {
-    return target
-  }
-  if (target instanceof Node) {
-    return target.ownerDocument ?? document
+  if (target && typeof target === 'object') {
+    const node = target as Node
+    if (node.nodeType === 9) {
+      return node as Document
+    }
+    if (node.ownerDocument) {
+      return node.ownerDocument
+    }
   }
   return document
 }
 function isXtermHelperTextarea(target: EventTarget | null): target is HTMLElement {
-  return target instanceof HTMLElement && target.classList.contains('xterm-helper-textarea')
+  return (
+    target !== null &&
+    typeof target === 'object' &&
+    (target as Element).nodeType === 1 &&
+    (target as Element).classList?.contains('xterm-helper-textarea') === true
+  )
 }
src/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-dismissal.ts (1)

28-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the target document realm for the element check.

When the address bar is portaled into a popout, the focused <webview> belongs to the popout window. target instanceof HTMLElement uses the main-window constructor and returns false. The focusin handler then does not dismiss the suggestions. Resolve HTMLElement from targetDoc.defaultView before the check.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: b053dcc6-c144-4125-8dd7-cddd49decd0d

📥 Commits

Reviewing files that changed from the base of the PR and between fe4237c and fbe4adb856008f01462f1648a241625f46f2589a.

📒 Files selected for processing (82)
  • src/main/ipc/floating-workspace-monitor.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.test.ts
  • src/main/ipc/register-core-handlers/register-core-handlers.ts
  • src/main/startup/configure-process.ts
  • src/main/window/createMainWindow.ts
  • src/main/window/floating-workspace-display-identify.ts
  • src/main/window/floating-workspace-display-manager.test.ts
  • src/main/window/floating-workspace-display-manager.ts
  • src/main/window/floating-workspace-popout-restore.ts
  • src/main/window/floating-workspace-webview-security.test.ts
  • src/main/window/main-window-webview-security.ts
  • src/main/window/privileged-window-navigation.test.ts
  • src/main/window/privileged-window-navigation.ts
  • src/preload/api-types.ts
  • src/preload/api/floating-workspace-api.ts
  • src/preload/api/floating-workspace-bridge.ts
  • src/preload/index.ts
  • src/renderer/src/components/browser-pane/assemble-chrome/BrowserAddressBar.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/BrowserImportHintButton.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/browser-address-bar-initial-click.test.ts
  • src/renderer/src/components/browser-pane/assemble-chrome/browser-address-bar-initial-click.ts
  • src/renderer/src/components/browser-pane/assemble-chrome/browser-page-guest-focus.ts
  • src/renderer/src/components/browser-pane/assemble-chrome/browser-toolbar-menu-dropdown.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/use-browser-address-bar-dismissal.ts
  • src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.test.tsx
  • src/renderer/src/components/browser-pane/assemble-chrome/use-browser-page-chrome-focus.ts
  • src/renderer/src/components/browser-pane/host-guest/bind-browser-page-webview-listeners.test.ts
  • src/renderer/src/components/browser-pane/host-guest/bind-browser-page-webview-listeners.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-progress-retention.test.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-progress-retention.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-viewport.ts
  • src/renderer/src/components/browser-pane/host-guest/browser-page-webview.ts
  • src/renderer/src/components/browser-pane/host-guest/webview-registry.ts
  • src/renderer/src/components/browser-pane/navigate/use-browser-page-webview-url-sync.test.tsx
  • src/renderer/src/components/browser-pane/navigate/use-browser-page-webview-url-sync.ts
  • src/renderer/src/components/floating-terminal/FloatingTerminalDisplaysMenu.test.tsx
  • src/renderer/src/components/floating-terminal/FloatingTerminalDisplaysMenu.tsx
  • src/renderer/src/components/floating-terminal/FloatingTerminalPanel.tsx
  • src/renderer/src/components/floating-terminal/FloatingTerminalPanelSurface.tsx
  • src/renderer/src/components/floating-terminal/FloatingTerminalWindowControls.test.tsx
  • src/renderer/src/components/floating-terminal/FloatingTerminalWindowControls.tsx
  • src/renderer/src/components/floating-terminal/floating-workspace-popout-shared-state.ts
  • src/renderer/src/components/floating-terminal/floating-workspace-popout-styles.test.ts
  • src/renderer/src/components/floating-terminal/floating-workspace-popout-styles.ts
  • src/renderer/src/components/floating-terminal/popout-portal-container.test.tsx
  • src/renderer/src/components/floating-terminal/use-floating-terminal-panel-controller.ts
  • src/renderer/src/components/floating-terminal/use-floating-terminal-panel-shortcuts.ts
  • src/renderer/src/components/floating-terminal/use-floating-workspace-popout.test.ts
  • src/renderer/src/components/floating-terminal/use-floating-workspace-popout.ts
  • src/renderer/src/components/tab-bar/tab-strip-pointer-activation.test.tsx
  • src/renderer/src/components/tab-bar/tab-strip-pointer-activation.ts
  • src/renderer/src/components/tab-group/tab-drag-gesture-lifecycle.ts
  • src/renderer/src/components/tab-group/tab-drag-missed-end-listeners.test.ts
  • src/renderer/src/components/tab-group/tab-drag-missed-end-listeners.ts
  • src/renderer/src/components/tab-group/tab-drag-pointer-sensor.test.ts
  • src/renderer/src/components/tab-group/tab-drag-pointer-sensor.ts
  • src/renderer/src/components/terminal-pane/RunningTerminalCloseDialog.test.tsx
  • src/renderer/src/components/terminal-pane/RunningTerminalCloseDialog.tsx
  • src/renderer/src/components/terminal-pane/terminal-pane-listener-order-parity.test.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-paste-execution.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-paste-listeners.ts
  • src/renderer/src/components/terminal-pane/terminal-pane-paste-window-scoping.test.ts
  • src/renderer/src/components/terminal-pane/terminal-paste-target-state.test.ts
  • src/renderer/src/components/terminal-pane/terminal-paste-target-state.ts
  • src/renderer/src/components/terminal-pane/use-terminal-pane-global-listeners.ts
  • src/renderer/src/components/ui/command.tsx
  • src/renderer/src/components/ui/context-menu.tsx
  • src/renderer/src/components/ui/dialog.tsx
  • src/renderer/src/components/ui/dropdown-menu.tsx
  • src/renderer/src/components/ui/hover-card.tsx
  • src/renderer/src/components/ui/popover.tsx
  • src/renderer/src/components/ui/portal-container-context.ts
  • src/renderer/src/components/ui/select.tsx
  • src/renderer/src/components/ui/sheet.tsx
  • src/renderer/src/components/ui/tooltip-view-blur.test.tsx
  • src/renderer/src/components/ui/tooltip.tsx
  • src/renderer/src/hooks/useRadixBodyPointerEventsRecovery.ts
  • src/shared/browser-url-equivalence.test.ts
  • src/shared/browser-url-equivalence.ts
  • src/shared/floating-workspace-display.test.ts
  • src/shared/floating-workspace-display.ts
  • src/shared/source-scan/source-tree-walk.test.ts
💤 Files with no reviewable changes (1)
  • src/shared/source-scan/source-tree-walk.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread src/main/startup/configure-process.ts Resolved
// workspace-doc profile is what refuses all three. The attach is also the point a live window
// exists to receive read failures for that guest.
setDocPreviewFailureSink(mainWindow.webContents)
setDocPreviewFailureSink(contents)

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.

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Restore the main-window failure sink when the floating host closes.

did-attach-webview overwrites the global sink with the attaching window’s WebContents. The floating installer adds no cleanup, and the floating closed handler only clears popout state. If that host is destroyed, publishDocPreviewFailure returns when sink.isDestroyed() is true. A later main-window preview failure can therefore be dropped. Fix the main-process sink lifecycle in the floating child cleanup or use host-aware sinks.

@pullfrog pullfrog 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.

ℹ️ No new issues in the incremental delta — the only new commit is a test-only TypeScript fix whose content matches the already-reviewed head.

Reviewed changes (incremental since fbe4adb)

  • 8d7523ff87 replaces the inline input stub in browser-address-bar-initial-click.test.ts with the existing stubInput() helper to clear a TS2322 error after the main merge. No production code changed; the extra input.ownerDocument.activeElement = input still leaves the flag down. The full PR diff at this head is byte-identical to the previously reviewed fbe4adb (same 82 files and per-file diff hashes), so the three findings from the initial review still stand.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

…ngs on restore ordering, autoplay scope, portals, and popout realms

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes (incremental since 8d7523ff)

  • Scoped autoplay — removed the app-wide autoplay-policy command-line switch, moving it to the popout window's webPreferences.autoplayPolicy so ordinary browser tabs keep the default policy.
  • Headless-safe display identification — identifyDisplays now gates on isWindowlessLaunch() instead of only ORCA_BACKGROUND_LAUNCH.
  • Fixed the restore state machine — the empty-displays early return clears minimizedDisplayId/minimizedBounds, and the settle/inner restore timers are tracked through restoreTimeoutId so resetPopoutRestoreState can cancel them.
  • Cross-realm DOM handling — added getDomRealm and routed popout-realm instanceof checks in editable-target, floating-workspace-terminal-actions, terminal-pane-paste-listeners, popover, and tooltip through it (plus React 19 ref-cleanup retention in tooltip).
  • Portal + retention polish — command.tsx carries the data-slot/data-state markers the body-lock recovery observer keys on; restored media that was paused at capture is now paused again; explicit YouTube t targets force navigation; a failed popout setup closes the popup instead of orphaning it; and the doc-preview failure sink is handed back to the main window when the popout closes.
  • Dead-surface removal — dropped the unused floatingWorkspace.restore/:focus IPC and preload methods.
  • Test tightening — the maximized-restore test now pins exact bounds, and the moveToNextDisplay/timestamp/pause paths gained failing-if-broken coverage.

All three prior findings are addressed in a724dd39. The delta's nine test files pass locally (66 tests).

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants