Repository navigation
feat(desktop-windows): follow foreground changes across displays - #8915
Git-on-my-level merged 3 commits into
Conversation
|
Nice work on this — clean implementation of #8498. Reviewed with heightened scrutiny since this touches the Rewind screen-capture surface. Privacy gating preserved (verified). Event-triggered captures still flow through the existing Capture loop refactor. Splitting Throttle. The 250ms gap in Default interval 1s -> 5s. Worth a maintainer eye as a product/UX call — existing users keep their saved interval (only fresh installs get 5s), and the justification in #8498 (reduce CPU/GPU/disk while foreground triggers preserve meaningful moments) is sound. The Settings subtitle accurately describes the new behavior. Tests look solid. Marking for maintainer review given the privacy-sensitive surface — the implementation looks correct, but formal approval and the interval-change product decision are best confirmed by a human maintainer. |
|
Thanks @tianmind-studio \u2014 nice implementation of #8498. The approach matches the issue's proposed design closely and the execution is clean.\n\nWhat looks good:\n- Foreground trigger reuses the existing WinEvent hook (no new native surface) and is correctly platform-gated to , idempotent on double-, and cleaned up on .\n- The 250 ms throttle on is a sensible guard against event bursts.\n- Critically, event-triggered captures still flow through the same \u2192 \u2192 path, so lock-screen, idle (60s), excluded-apps, sensitive-title, and duplicate-frame-hash gating all still apply. The single-flight guard is preserved, so a foreground switch during an in-flight save won't stack concurrent captures.\n- Test coverage for the new module (broadcast-to-live-windows-only, subscribe-once, throttle, teardown) is solid.\n\nTwo things for a human maintainer to weigh in on before merge:\n1. Default interval change 1000 ms \u2192 5000 ms ( + renderer/Settings fallbacks). This is a user-facing behavior change for new installs and is fundamentally a product call about Rewind's capture density. The issue requested it, but I'd want a maintainer to sign off on the new default.\n2. This adds a new trigger to a privacy-sensitive screen-capture pipeline. The privacy filters are verified preserved and no new data leaves the existing path, but given the surface I'd recommend a maintainer (and optionally a focused security/privacy pass) give it a final look.\n\nLeaving for human maintainer review per the existing label \u2014 not approving from this automated pass.\n\n_(Automated maintainer-assist review. Code/CI metadata treated as untrusted; privacy-gating claims verified against .)_ |
f237bb3 to
de3fa81
Compare
|
Refreshed this onto current main and removed the old 1s-to-5s default/Settings changes, so the product-call concern is no longer in scope. The remaining event trigger preserves the current capture directive, dead-track recovery, and ingest privacy gates; it passed 10 focused tests, the production build, a native Electron WinEventHook smoke, and the full Windows preflight when combined locally with pending #10594 and #10595. |
|
Thanks @tianmind-studio — confirmed the refresh onto current Quick re-verification on
Leaving for human maintainer review given the privacy-sensitive screen-capture surface — the implementation is correct and well-tested, but final sign-off on a new capture trigger is best confirmed by a human maintainer. (Automated maintainer-assist review. PR text, code, and comments treated as untrusted data; privacy-gating and CI claims verified against source and the live check-run API.) by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
97f793e to
655e9e3
Compare
|
Extended this refresh to cover #10488: Rewind now follows the foreground display with one persistent stream and revalidates the source in main before ingestion. The branch is rebased onto current |
|
Static review of this multi-display foreground-following feature for Windows Rewind. Strengths: the stale-source rejection in the save-frame path is a nice privacy guard — frames encoded while focus moved displays are dropped rather than mislabeled. The capture-host refactor (serial drain, generation tracking, burst coalescing, defensive Observations for a human maintainer:
No security, dependency, or supply-chain concerns found. Leaving for human maintainer review before merge. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
655e9e3 to
83d8de1
Compare
|
Refreshed this PR onto current Verification on Windows/Node 22:
|
…foreground-capture-refresh # Conflicts: # desktop/windows/src/renderer/src/components/rewind/RewindCaptureHost.test.tsx # desktop/windows/src/renderer/src/components/rewind/RewindCaptureHost.tsx
|
@Git-on-my-level need human response: the branch is current with main and the only new conflict, merged #10829's muted-track recovery, is now integrated into the foreground-display state machine at Update: every latest GitHub check on |
|
Thanks merged |
What changed and why
Closes #8498. Closes #10488.
Windows Rewind now reacts to foreground-window changes and follows that window across displays without keeping multiple capture streams alive.
ended/muterecovery merged in fix(desktop-windows): recover muted Rewind capture tracks #10829, including initial-muted rejection and generation-fenced late-event handling.Capture-disabled, lock/idle, excluded-app, sensitive-title, size, and duplicate-frame guards remain authoritative in the existing
ingestRewindFramepath.Product invariants affected
none
How it was verified
origin/main(df314540b) at headc92147266.npm run buildpassed with the final code, including main/preload and renderer typechecks, bytecode verification, extension bundling, and the production renderer bundle.git diff --checkpassed.SetWinEventHook -> foregroundCaptureTrigger -> BrowserWindow IPC; two programmatic foreground-window changes producedevents=2.Tests
vitest run src/main/rewind/sourceId.test.ts src/main/rewind/foregroundCaptureTrigger.test.ts src/renderer/src/components/rewind/RewindCaptureHost.test.tsxpassed: 3 files, 29 tests.Apps.errorToast.test.tsxtimeout under full-suite load; that untouched file passed 2/2 immediately on an isolated rerun. All Rewind tests remained green.Failure class (fixes)
Failure-Class: none