Skip to content

fix(preview): record hidden tabs - #174

Merged
incognitojam merged 1 commit into
mainfrom
t3code/fix-hidden-preview-recording
Aug 16, 2026
Merged

fix(preview): record hidden tabs#174
incognitojam merged 1 commit into
mainfrom
t3code/fix-hidden-preview-recording

Conversation

@incognitojam

Copy link
Copy Markdown
Collaborator

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).

@incognitojam
incognitojam force-pushed the t3code/fix-hidden-preview-recording branch from 5257035 to 3fbf684 Compare August 16, 2026 15:22
@incognitojam
incognitojam enabled auto-merge (squash) August 16, 2026 15:24
@incognitojam
incognitojam disabled auto-merge August 16, 2026 15:24
@incognitojam
incognitojam force-pushed the t3code/fix-hidden-preview-recording branch from 3fbf684 to 7cf2672 Compare August 16, 2026 16:28
@incognitojam
incognitojam merged commit b72e6f0 into main Aug 16, 2026
9 checks passed
@incognitojam
incognitojam deleted the t3code/fix-hidden-preview-recording branch August 16, 2026 16:40
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant