Repository navigation
fix(computer): a screenshot while a dialog is open is its tab's last frame at once - #477
Merged
Merged
Conversation
…frame at once The page can't paint while a JavaScript dialog is open, so each capture waited out its 3 s timeout before falling back to the last frame. The control knows the dialog is open, so it doesn't ask. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
While a JavaScript dialog is open on a tab, the page can't paint, so the browser never answers a capture. The control waited out its 3 s capture timeout and then returned the last frame it took, so every screenshot an agent took while a dialog was open cost 3 s. The control already knows a dialog is open on the tab, so it now returns that last frame right away.
This was found while timing gate 3's probe on a browser computer in #475: its dialog check took 6.5 s, two screenshots' worth of timeouts.
A dialog that opens during a capture still falls back to the last frame after the timeout, as before.
How it was tested
ruff check: clean.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Screenshots return the tab’s cached frame immediately when its JavaScript dialog is already open.
Reviews (1) · Last reviewed commit: "fix(computer): a screenshot while a dial..." · Reviewed by Greptile