Skip to content

Match the remote viewport to the visible desktop content - #20

Draft
shrey150 wants to merge 2 commits into
codex/desktop-renderer-isolationfrom
codex/desktop-content-viewport
Draft

shrey150 wants to merge 2 commits into
codex/desktop-renderer-isolationfrom
codex/desktop-content-viewport

Conversation

@shrey150

@shrey150 shrey150 commented Nov 13, 2026 •

Copy link
Copy Markdown

A resized 800×600 window requested an 800×524 remote viewport even though the live-view area was 800×520. Opening toolbars or changing shell zoom did not resize the remote viewport, and small windows retained a 400-pixel minimum remote height.

Measure the live-view element before creating the session, then observe its actual size as the window, bookmarks, downloads bar, or zoom changes. The trusted renderer IPC accepts bounded integer dimensions, coalesces resize bursts, and serializes remote updates so the newest size wins. Native resize events retain debounced window-state persistence.

Stacked on #18 (codex/desktop-renderer-isolation) for its trusted IPC boundary. This change keeps the existing platform device scale defaults.

Validation:

  • The actual Electron startup regression covers closing the last window during measurement or viewport update, and reopening a new window. Stale callbacks cannot create a cloud session.
  • Full build and all 4 tests on this branch passed; viewport tests cover invalid dimensions, queued updates, concurrent remote updates, and disposal.
  • The actual Electron shell test passed initial measurement, window resize, both toolbar changes, 125% shell zoom, a small window, and rejection of malformed IPC dimensions. The test uses a local viewer fixture.
  • An integration of this change with the companion lifecycle, tab, automation, diagnostics, and Electron runtime fixes passed the full build and all 34 tests.
  • Real Electron 45.3.2 on Linux connected to a real cloud browser at https://example.com. Remote innerWidth/innerHeight matched the measured live-view area in all seven checks below. The cloud session was explicitly released and reached COMPLETED afterward. macOS scaling was not tested.
Layout Measured and remote viewport
Initial provision 1280×820
800×600 window 800×520
Bookmarks visible 800×492
Downloads bar visible 800×444
Shell zoom 125% 640×324
400×300 window 400×220
1200×800 window with bookmarks 1200×692

Actual Electron application connected to the real cloud browser, captured with the companion fixes described above:

Desktop live view after sizing the remote browser to the visible content area

Combined validation: the mainline candidate containing #13–#18 and #20 passed builds, all 34 automated tests, and the high/critical advisory gate on Linux, macOS, and Windows. Cross-platform CI results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant