Parent
Part of #25 (Screen Solver v1: implementation spec), itself under the map #1.
What to build
A live, correct capture of whatever window is currently the configured target, held open rather than re-grabbed per solve — and the signals needed to know when a capture isn't good enough to spend a model call on.
In the hidden renderer: turn a desktopCapturer source for the target window into a live MediaStream via getUserMedia (Windows.Graphics.Capture-backed — not PrintWindow, which silently returns black frames on GPU-composited Chrome/Edge with no error signal), draw frames to a canvas, downscale to 1568px on the long edge with no crop, encode, and send the bytes to main over IPC on request. One session is opened the moment a target is selected (consuming ticket 2's change signal) and stays open while idle; a target change tears down the old session and opens a new one immediately under the same rule — never a fresh session per solve, which would make the OS capture-indicator border flicker. The module also exposes the signals a caller needs before spending a call: whether the target is minimized (isMinimized/IsIconic), whether it has vanished from window enumeration (treated as ambiguous between closed and moved-to-another-desktop, not a definitive failure), and whether a freshly captured frame is black or zero-size (a non-black-pixel ratio check).
Acceptance criteria
Blocked by
#28 (Target window config surface) — needs a target window identity and its change signal to react to.
Parent
Part of #25 (Screen Solver v1: implementation spec), itself under the map #1.
What to build
A live, correct capture of whatever window is currently the configured target, held open rather than re-grabbed per solve — and the signals needed to know when a capture isn't good enough to spend a model call on.
In the hidden renderer: turn a
desktopCapturersource for the target window into a liveMediaStreamviagetUserMedia(Windows.Graphics.Capture-backed — notPrintWindow, which silently returns black frames on GPU-composited Chrome/Edge with no error signal), draw frames to a canvas, downscale to 1568px on the long edge with no crop, encode, and send the bytes to main over IPC on request. One session is opened the moment a target is selected (consuming ticket 2's change signal) and stays open while idle; a target change tears down the old session and opens a new one immediately under the same rule — never a fresh session per solve, which would make the OS capture-indicator border flicker. The module also exposes the signals a caller needs before spending a call: whether the target is minimized (isMinimized/IsIconic), whether it has vanished from window enumeration (treated as ambiguous between closed and moved-to-another-desktop, not a definitive failure), and whether a freshly captured frame is black or zero-size (a non-black-pixel ratio check).Acceptance criteria
Blocked by
#28 (Target window config surface) — needs a target window identity and its change signal to react to.