Repository navigation
fix(desktop): preserve hosted macOS window size - #4728
Conversation
janicduplessis
left a comment
There was a problem hiding this comment.
Independent review of a33f433 against 28c96d1: no actionable findings.
Reviewed all seven changed files and the existing host metadata producer. The decoder uses the actual current window's logical frame, the shared window choice publishes and clears that size, and the hosted tile updates when metadata arrives after its first frame. Local macOS capture retains its existing point-size callback. Encoded frame decoding, normalized input, server protocol, iOS and Android paths are unchanged. The existing decoder case covers window selection and legacy metadata absence without adding test cases.
Personally inspected the before/after owned Desktop captures: metadata grows the second preview to the captured 1600-point width while the legacy control remains at 1280. The PR correctly distinguishes the real hosted stream/input check from the temporary DEBUG presentation through production decoder/layout, and records the exact restoration and owned-window capture limitation. Final source matches the preliminarily reviewed diff.
|
Codex review at
|
Description
Hosted macOS previews use encoded frame pixels as the window's point size. An owned 1600-point window actually streams at 1280 pixels, so Desktop shrinks it before the card needs to fit it.
Solution
Use the current window's logical size from the existing
macos-windowsmetadata. Keep the pixel-based fallback when that metadata is absent, and update layout when it arrives after a frame. Frame decoding, normalized input and the server protocol are unchanged.Fixes #2945.
Test plan
Actual owned mini hosted window confirms 1600×328 points versus 1280×263 encoded pixels; normalized input toggles its checkbox. An owned Desktop DEBUG presentation replays that captured frame through the production decoder/layout: delivering current-window metadata afterward grows the second preview to its true point size while the legacy fallback stays unchanged. Temporary fixture wiring is restored byte-exact.
Only the verified owned Desktop window was captured, using the documented fallback for agent-device#3965.