Repository navigation
fix(browser): background tab screenshots, wait_for, visibility reason, DMG manifest - #71
Merged
Merged
Conversation
… yet Playwright's injected querySelector returns undefined when nothing matches, and the match check compared with null, so every selector wait succeeded immediately. Found live: a wait on a missing selector returned in 11ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
visible only reports whether the human can see the tab now, so an open=true preview in a thread the human is not viewing came back visible=false with no explanation. Status and open now include presentation: on-screen, shown-in-thread, or background. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
electron-builder hashes the DMG before codesign and stapling rewrite it, so 0.0.66 shipped a manifest whose DMG sha512 and size did not match the published file. Recompute them after stapling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…w is hidden Packaged builds hand the main window back to background throttling after first paint. When the window is minimized or occluded, an agent's offscreen browser tab then paints about once a second, so every capturePage attempt missed its 1s deadline: snapshots and screenshots failed while evaluate and click kept working. Still captures now lift main-window and guest throttling for their duration. The lease is counted together with recording and picture-in- picture sessions, so neither re-throttles under the other. Reproduced in an isolated dev build with packaged throttling and a minimized window: 0.0.65 failed every snapshot with 3x1s capturePage timeouts, this change captures in 7-40ms and restores throttling after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Restore the main window's previous throttling after a still capture instead of forcing it on, so dev builds stay unthrottled. - Replacing the main window or failing a frame-capture start no longer re-throttles while a still capture holds its lease. - presentation counts a right-panel browser tab as shown in its thread, and only reports on-screen while the app window is visible. - preview_status documents presentation. Verified live: after a snapshot from a minimized window the guest goes back to zero frames and the window is throttled again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
Live runtime evidence (isolated dev desktops, separate homes, real Codex agent driving preview_* through MCP, broker, web host and desktop)Background screenshot defect, reproduced, then fixed under the same fault
wait_for
presentation (raw tool output)
Timeout isolation (0.0.66 broker fix, now live)
Not proven live
|
Collaborator
Author
Local checks vs origin/main
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
After 0.0.66, agents still couldn't screenshot background browser tabs in the installed app,
preview_open(open: true)came backvisible: falsewith no explanation, and 0.0.66's update manifest listed a stale DMG checksum.Root causes (reproduced in isolated dev runtimes)
DesktopWindow.tsreveal handler). With the window minimized or occluded, an offscreen agent tab paints about once a second, so everycapturePageattempt (1s x3) timed out while evaluate and click kept working. Dev builds never throttle, which is why it looked fine in dev. Reproduced on an isolated 0.0.65 build with packaged throttling injected and the window minimized: every snapshot failed withcapturePagetimeouts.preview_wait_forreturned success immediately for any selector: Playwright's injectedquerySelectorreturnsundefined, the check compared!== null. Found live (11ms "success" on a missing selector).visiblemeans on screen right now, but nothing told the agent the tab is open in a thread the human isn't viewing.Changes
wait_foruses!= null.PreviewAutomationStatus.presentation:on-screen|shown-in-thread|background(optional, backward compatible), documented on the tools.build-desktop-artifactrefreshes DMG sha512/size in*-mac.ymlafter stapling.Verification