fix: verify and restore browser state after recording starts#38
Open
OfriHarlev wants to merge 1 commit intoAmElmo:mainfrom
Open
fix: verify and restore browser state after recording starts#38OfriHarlev wants to merge 1 commit intoAmElmo:mainfrom
OfriHarlev wants to merge 1 commit intoAmElmo:mainfrom
Conversation
2a720f7 to
6407b27
Compare
6407b27 to
705038e
Compare
Contributor
Author
|
@AmElmo I rebased this PR with latest main |
705038e to
9f1dd86
Compare
Contributor
Author
|
@AmElmo any chance this can get a review? |
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.
Summary
record startagent-browser evalreturns a double-encoded JSON stringProblem
ProofShot can successfully open the browser and start recording, but the recording step can still leave the browser at the wrong viewport.
In local verification against patched
agent-browser, a session configured for1920x1080with scale1reported:1280x5771920x1080There is also a parsing edge case here:
agent-browser evalcan return the viewport payload as a JSON string literal containing JSON, not only as a direct JSON object. When ProofShot only parses once, it treats a valid viewport payload as unreadable and aborts startup.Solution
This change treats browser-state verification after
record startas one cohesive step:Testing
npm testnpm run buildLocal verification
Using the sample app with patched
agent-browser:agent-browserrecording without viewport reapply drifted to1280x5771920x1080