fix(preview): record hidden tabs - #174
Merged
Merged
Conversation
yngatech-nightly
Bot
force-pushed
the
main
branch
from
August 16, 2026 15:11
2698323 to
44e3d33
Compare
incognitojam
force-pushed
the
t3code/fix-hidden-preview-recording
branch
from
August 16, 2026 15:22
5257035 to
3fbf684
Compare
incognitojam
enabled auto-merge (squash)
August 16, 2026 15:24
incognitojam
disabled auto-merge
August 16, 2026 15:24
incognitojam
force-pushed
the
t3code/fix-hidden-preview-recording
branch
from
August 16, 2026 16:28
3fbf684 to
7cf2672
Compare
This was referenced Aug 16, 2026
yngatech-nightly Bot
pushed a commit
that referenced
this pull request
Aug 18, 2026
## Summary Hidden preview recordings started native frame capture while the guest was parked outside Chromium’s compositor, causing `capturePage()` to hang and `preview_recording_start` to time out. This keeps a ref-counted capture surface leased for the recording lifetime, waits for the guest to paint before starting capture, and releases the lease across successful and failed cleanup paths. Native page capture is now shared, bounded, and evicted after timeout so later attempts can recover instead of rejoining a poisoned promise. ## Testing - `vp test run apps/web/src/browser/browserCaptureSurface.test.ts apps/web/src/browser/browserRecording.test.ts apps/web/src/browser/browserSurfaceStore.test.ts apps/web/src/browser/hostedBrowserWebviewStyle.test.ts apps/desktop/src/preview/Manager.test.ts` — 88 tests passed - targeted lint for the seven changed files - scoped web and desktop typechecks - dev desktop: recorded the same hidden `example.com` tab twice; both MP4s were non-empty and visually inspected with changing synthetic frames - captured and visually inspected a 1280×800 snapshot during recording and another after recording - the tab remained `visible:false` throughout, with no errors or timeouts Related to #170. --- Written by an agent (T3 Code, gpt-5.6-sol). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.
Summary
Hidden preview recordings started native frame capture while the guest was parked outside Chromium’s compositor, causing
capturePage()to hang andpreview_recording_startto time out.This keeps a ref-counted capture surface leased for the recording lifetime, waits for the guest to paint before starting capture, and releases the lease across successful and failed cleanup paths. Native page capture is now shared, bounded, and evicted after timeout so later attempts can recover instead of rejoining a poisoned promise.
Testing
vp test run apps/web/src/browser/browserCaptureSurface.test.ts apps/web/src/browser/browserRecording.test.ts apps/web/src/browser/browserSurfaceStore.test.ts apps/web/src/browser/hostedBrowserWebviewStyle.test.ts apps/desktop/src/preview/Manager.test.ts— 88 tests passedexample.comtab twice; both MP4s were non-empty and visually inspected with changing synthetic framesvisible:falsethroughout, with no errors or timeoutsRelated to #170.
Written by an agent (T3 Code, gpt-5.6-sol).