Repository navigation
fix(desktop): restore fresh human background screenshots - #22335
Open
Quicksaver wants to merge 1 commit into
Open
Quicksaver wants to merge 1 commit into
Quicksaver wants to merge 1 commit into
Conversation
Contributor
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This restores fresh background screenshots by adding compositor paint probing, a discarded warmup capture, and independent rendering leases around the existing production screenshot path. Because it changes throttling, debugger coordination, timing, and overlap behavior across screenshot, recording, and picture-in-picture flows, the runtime impact merits human review. You can add or adjust custom eligibility rules. Learn more. |
Contributor
Keep each human capture rendering through a bounded paint probe and warmup, then save the final native pixels. Let overlapping probes progress independently while retaining recording and PiP ownership. Co-authored-by: Julius Marminge <julius0216@outlook.com> > 🤖 Generated by GPT 6.1 Sol in Codex via T3 Code.
Quicksaver
force-pushed
the
fix/restore-preview-background-screenshots
branch
from
October 21, 2026 09:05
2e619fa to
96715e4
Compare
This branch has not been deployed
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
The human Screenshot action can fail to save an image when Electron stops presenting a background preview. Restore the discarded warmup capture, bounded paint-readiness check and independent rendering ownership before the final native readback.
This fresh PR reopens the human fix reverted from #19931, following Julius's re-landing instruction. It restores the original contribution and accepted maintainer adaptations, including independent overlapping captures. Historical Windows, macOS and Linux before/after proof is retained below. #21534 handles agent captures separately.
What changed
Validation
69 focused tests and scoped checks; historical native comparison
At current HEAD
96715e46db4ed3dbdfd59d1c05002cb5beed2b3f:apps/desktop:vp test run src/preview/Manager.test.ts src/ipc/methods/preview.test.ts, 69 passing cases.vp run --filter @t3tools/desktop typecheck, touched-file lint and formatting, andgit diff --checkpassed.Historical native comparison: BEFORE
8eafe058ca7720219e9466e9c6ed8e59a2276dee, AFTER2e619fae61e66ecd85dd8494a431668920d06af2. All builds, platform observations and images below belong to those revisions. They have not been rerun at current HEAD. Independent source review and the review attribution below also cover that historical AFTER revision.vp run build:desktoppassed for both revisions on all three platforms. These are complete unpackaged main/preload/server/web Electron applications, not isolated Manager fixtures or release installers.--no-sandboxand ephemeral debugging ports. Each app opened genuine existing conversation history imported through the unmodified production scanner/importer before testing, with identical initial state copies and no provider work running.Windows hidden failures took about 3.28 seconds in Manager; one AFTER hidden success took about 53 ms. Linux AFTER saved 8/8 distinct fresh PNGs against BEFORE's 5/8; its 12-second limit was the observer's deadline, not an asserted application timeout. These are observations, not latency guarantees. Windows target-close interruption rejected without an artifact and recovered on a new guest on both revisions. Native PiP/recording ownership released independently; BrowserWindow focus/visibility remained unchanged in the measured background cases. Openbox verified actual Linux minimization.
Limits: Linux establishes the complete app path under a virtual X desktop, not physical monitor sleep/lock, hardware GPU drivers, Wayland or installed AppImage behavior. No natural Mac failure was observed. Mac originals retain their ICC profiles; separate ColorSync sRGB analysis matched the requested colors within one channel value. Mac used an isolated process test-keychain flag, so OS-backed credential sealing is outside this proof. Pending Mac cancellation, a deliberately frozen paint-probe fallback, replacement retaining the exact runtime tab identity, and OS-wide foreground-process preservation were not demonstrated. The human UI stops recording instead of acquiring a concurrent still. An initial AFTER navigation failure and recovery are preserved in the evidence.
Proof
Historical native PNGs, BEFORE failure receipts and reproduction drivers
Windows/macOS proof package and Linux Docker proof package contain the measured cases, saved PNGs, independent pixel results, hashes, limits and reproduction drivers. Both exclude private transcripts, databases and profiles.
Windows hidden app, requested epoch 4:
Linux hidden app, requested epoch 4:
macOS hidden app, requested epoch 4, no regression observed. These independently acquired originals are byte-identical, so the upload service deduplicated them:
Every uploaded asset was downloaded again and checked against its original SHA-256; image delivery uses
image/pngand inline disposition. No baseline failure image was invented when capture returned no PNG.