Refs https://github.com/pingdotgg/t3code/issues/39069
When a tab an agent opened hidden is captured for a remote viewer, the main window stays background-throttled. If Windows is locked, Chromium draws no frames, so the viewer waits on "Connecting to browser..." until unlock. This change takes the same frame-capture lease that recording and still screenshots already take, for the length of each server-driven capture, so the window and the guest stay unthrottled until the capture ends.
Evidence on the Windows 11 VM (development build) and an Android phone, same steps for base and fix:


Tested:
check:changed (format, lint, knip, typecheck, and the changed test file) on the change.
- The new case in
apps/desktop/src/preview/Manager.test.ts asserts that the window is unthrottled during a server capture and restored after it. It fails on base.
- Windows VM, UTM, development Electron build: base stalls on a hidden agent tab while locked; this change shows live frames at 30 seconds and 2 minutes while locked.
- Android phone, paired to that VM build: same two results as above.
- Linux desktop app on Xvfb: the lease starts and stops around each capture and throttling is restored afterwards (log excerpts in the trace).
Not shown:
- Physical Windows laptop, or the packaged release. The reporter's laptop was not available.
- Unlocking the session: the preview continuing after unlock was not shown in a clean run.
- Agent screenshots of a freshly opened hidden tab on Linux. Base and this change both fail the first capture of such a tab under Xvfb, so there is no clean baseline for that path.
- CPU and GPU cost of an unthrottled window while a capture is running. No measurement was taken.
- Android app build used for the phone captures was not recorded.
🤖 Generated with Claude Code
No actionable comments were generated in the recent review.
Walkthrough
The manager now tracks frame-capture leases for server tabs as painting starts and stops. The test supplies a main window and shared host
WebContents, then checks that window and guest throttling is disabled during capture and restored afterward.Changes: Server-tab capture
apps/desktop/src/preview/Manager.ts,apps/desktop/src/preview/Manager.test.tscapturingstate. The test checks that window and guest throttling is disabled during capture and restored after the screenshot resolves.Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
Possibly related PRs
Suggested reviewers:
t3dotgg,juliusmarminge,maria-rcksMerge Risk:
Minimal · up to
9930cThe change keeps the window unthrottled during server-driven captures so a locked Windows machine can still stream hidden tabs, and it restores throttling afterward. No concrete defect was found, and the new test covers the main behavior.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the bug and the affected surface (a phone watching an agent's hidden browser tab while Windows is locked), and it uses the conventional fix(desktop) prefix. The changeset adds a frame-capture lease for server-driven captures so the main window stays unthrottled. The title describes the user-visible symptom rather than the code change, but it is related to the main change and is specific enough for a teammate scanning history.
Full details: Description check
Explanation
The description follows the template's main sections. The Problem and Change sections explain the stall on Connecting to browser while locked and how the frame-capture lease fixes it. The Scope section links issue 39069. The Verification section gives specific tests and observed results, and it lists what was not checked. The description does not state whether a maintainer requested the PR or explain why an issue is not needed, but the issue link covers the scope requirement. It also omits the model and harness line that the template asks for when an agent was used. The description mentions Claude Code in its footer, so that line is effectively present. The before/after screenshots are included for the UI-visible result.
Resolution
Optionally confirm the Scope section's issue link is the bug report, and add the model and harness name in the closing line if the template requires it strictly.
Finishing Touches
Generate unit tests (beta)
dd2e8e8d-266c-455e-8815-74733f9e3b38Reviewing files that changed from the base of the PR and between 1cb3a8c753047efc4fa00600105f5388de8fd7eb and 9930c7af4d293beff2a74ea8698b05c0a6c3aa0f.
apps/desktop/src/preview/Manager.test.tsapps/desktop/src/preview/Manager.tsIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.