Repository navigation
Conversation
|
Ready to review this PR? Stage has broken it down into 3 individual chapters for you:
Chapters generated by Stage for commit 284532f on Jun 16, 2026 7:58am UTC. |
📝 WalkthroughWalkthroughThe macOS compositor repaint workaround in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
|
Thanks for the contribution — the underlying change is already implemented in |
Summary
Removes the permanent macOS main-window
setBackgroundThrottling(false)workaround fromcreateMainWindow.setBackgroundThrottling(true)on macOS.show,restore, andfocus.setBackgroundThrottling(false).Verification
pnpm exec vitest run --config config/vitest.config.ts src/main/window/createMainWindow.test.tspnpm lint -- src/main/window/createMainWindow.ts src/main/window/createMainWindow.test.tspnpm typecheckgit diff --checknode config/scripts/run-electron-vite-dev.mjs --remote-debugging-port=9334playwright-cliover CDP/Users/nwparker/orca/workspaces/orca/idle-spinnerwindow.__store, visible document, and 0 console errors/tmp/orca-idle-spinner-validation/main-window.pngpnpm bench:idle-cpu -- --warmup-ms 3000 --sample-ms 4000 --interval-ms 1000 --worktrees 1 --output /tmp/orca-idle-spinner-validation/idle-cpu.jsonrunningAnimationCount: 0; GPU mean CPU was ~0.30% in the 3-sample smokeBuilt-in browser restore proof
Orca: nwparker/idle-spinner, repo root/Users/nwparker/orca/workspaces/orca/idle-spinner.http://127.0.0.1:8877/proof.htmlwith markersORCA_BROWSER_PROOF_5486andWEBVIEW_RENDERED_OK.WEBVIEW_RENDERED_OK:/tmp/orca-browser-proof/orca-window-browser-before-restore.png(sha2560b395327e058d63d778227c5710bc7999e7ccb1898cea516343b056debfdba84, 1920x1170).window.api.ui.minimize(). Full-screen capture immediately after showed Edge in front and Orca absent, confirming the window really left the visible screen:/tmp/orca-browser-proof/screen-after-ui-minimize.png(sha25676c5be7ee1980eec7e190acc3f297569072ed1074fdc90a576dcf383463715f3, 1920x1200).open -b com.stablyai.orca.dev.25fba5324525. After restore, the renderer reported{"visibilityState":"visible","hidden":false,"hasFocus":true,"activeTabType":"browser"}./tmp/orca-browser-proof/orca-window-browser-after-restore.png(sha2568a90a36c0b2051618769b213f467a0672d91a7fbe6a7628ba0bccbcec6f24482, 1920x1170)/tmp/orca-browser-proof/screen-after-bundle-activate.png(sha25636289f5b824d54b4ca7c025f111aa76f972654ac3f7443cc729174545e24dfdd, 1920x1200)webviewtarget:type: "webview", titleOrca Browser Proof, URLhttp://127.0.0.1:8877/proof.html;Runtime.evaluatereturnedmarker: "WEBVIEW_RENDERED_OK"andhasText: true(saved at/tmp/orca-browser-proof/webview-after-restore.json, sha256561b2ec1a5bcf306772e332c631cceeb7e6f10f8b86671152e21a117156c2455).orca console --limit 50 --jsonreturnedmessages: []. The only Playwright console error was the local proof server's expected/favicon.ico404, plus dev-only React Grab logs.Note: I also attempted a short-lived Playwright Electron main-process probe for
webContents.getBackgroundThrottling(), but the extra launch hit the single-instance/headless path and did not expose a BrowserWindow. The API-call contract is covered by the unit test instead.Terminal / agent / notification follow-up proof
src/main/window/createMainWindow.tsandsrc/main/window/createMainWindow.test.ts; no PTY, runtime, agent-hook, browser-bridge, or notification implementation files are changed.term_37dae822-1894-4849-ae7f-9f2186db14a3printedORCA_TERMINAL_BG_TICK_1throughORCA_TERMINAL_BG_TICK_10at ~1s intervals while the app was background/minimized during the earlier restore pass, andorca terminal readreturned all ticks with cursor metadata after restore.orca terminal list --worktree path:/Users/nwparker/orca/workspaces/orca/idle-spinner --jsonshowed the validation terminals connected/writable, andorca terminal switchcould activate the proof terminal.orca terminal createthat emitted the same OSC 9999 payload shape Orca parses from model-owned terminals: working -> done,agentType: codex, promptPR5486 synthetic agent status/PR5486 synthetic notification proof.orca worktree ps --limit 1 --jsonshowed both proof rows inagents[]asstate: done,agentType: codex, with the expected prompts/messages and terminal handlesterm_9800582c-3c77-4d45-9512-e278d675c8f2andterm_909dfaf5-6e4a-4128-9323-6af053fea05a.window.api.agentStatus.getSnapshot()andwindow.__store.getState().agentStatusByPaneKeyboth contained the same two syntheticdonerows.window.api.notifications.getPermissionStatus()returned{ supported: true, platform: "darwin", requested: true }; local settings had notifications, agent task completion, and terminal bell enabled.requireDisplayConfirmation: truereached the main-process handler and returned{ delivered: false, reason: "not-displayed" }on this dev macOS profile, so I am not claiming a visible native banner from that check.window.api.notifications.dispatch({ source: "test", notificationId })returned{ delivered: true }, andwindow.api.notifications.dismiss([notificationId])returned{ dismissed: 1 }.agent-browser --session pr5486-deep --profile /tmp/orca-agent-browser-pr5486-profileloadedhttp://127.0.0.1:8879/deep.html; eval returnedmarker: "ORCA_DEEP_HTTP_PROOF_5486",clicked: "yes",result: "AGENT_BROWSER_CLICK_OK".orca goto --url http://127.0.0.1:8879/deep.htmlreturned titleOrca Deep HTTP Proof;orca snapshotexposed heading/input/button refs;orca click --element @e3succeeded;orca evalreturnedclicked: "yes"andAGENT_BROWSER_CLICK_OK.graph_not_ready, then recovered toreadyafter bringing the app forward; stale browser page ids briefly reportedbrowser_tab_not_found. A pre-existing standalone Chrome for Testing process (PID 41487) was holding/Users/nwparker/.myapp-profile; I did not kill it.pnpm exec vitest run --config config/vitest.config.ts src/main/ipc/notifications.test.ts src/renderer/src/hooks/agent-hook-completion-notifications.test.ts src/shared/agent-status-osc.test.ts-> 3 files / 54 tests passed.pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/orca-runtime.test.ts -t "OSC 9999|stamps SSH connection identity|preserves OSC 9999 parser state"-> 4 matching runtime tests passed, including the SSH connection-identity case.Orca CLI background browser screenshot proof
777da723-721e-4fec-9678-cf137416cb0e, app PID84165, CDP identityOrca: nwparker/idle-spinnerfor/Users/nwparker/orca/workspaces/orca/idle-spinner.http://127.0.0.1:8891/proof.htmlwith markerORCA_BACKGROUND_SCREENSHOT_5486and large green/red/blue/yellow/cyan blocks.activeTabType: "terminal",activeTabId: "4f5448b8-6494-4b6e-9ea5-5f56b24dede9"; the screenshot target was inactive browser page4eea8dfe-e894-4bbe-b2c2-c3670eb0f0c5.orca snapshot --page 4eea8dfe-e894-4bbe-b2c2-c3670eb0f0c5 --worktree path:/Users/nwparker/orca/workspaces/orca/idle-spinner --jsonreturned originhttp://127.0.0.1:8891/proof.htmland static text forBackground Screenshot Proof 5486,ORCA_BACKGROUND_SCREENSHOT_5486,RED,BLUE,YELLOW,CYAN, andcontent must not be black.orca screenshot --page 4eea8dfe-e894-4bbe-b2c2-c3670eb0f0c5 --worktree path:/Users/nwparker/orca/workspaces/orca/idle-spinner --jsonproduced a real PNG at/tmp/orca-bg-final-screenshot-5486.png: 1041x1059, 40,677 bytes, not black. Pixel validation counted green 176,210; red 108,067; blue 108,281; yellow 107,243; cyan 107,918; non-dark pixels 791,009.