Skip to content

test(desktop): verify native browser viewport captures in CI - #841

Merged
incognitojam merged 4 commits into
mainfrom
styal/browser-calibration-ci
Oct 15, 2026
Merged

incognitojam merged 4 commits into
mainfrom
styal/browser-calibration-ci

Conversation

@incognitojam

Copy link
Copy Markdown
Owner

Viewport rendering can regress while browser operations still return success. Add a native desktop integration check that exercises the production viewport calculation, a real Electron webview, PreviewManager's CDP emulation and snapshot capture, and locator clicks.

The active fork CI workflow runs thirteen zoom/resize scenarios on Linux and macOS and gates Fork Check on both results. Each scenario verifies 36 reference pixels, CSS dimensions, screenshot geometry, page console errors, and click alignment. Captures and scalar measurements are uploaded as CI artifacts.

Coverage is deliberately bounded: this creates a minimal host page and applies calculated webview dimensions directly. It bypasses the React Browser panel and toolbar, surface ownership/reparenting, IPC, the server/MCP transport, providers, and remote/relay connections. The small-preview and resized-back cases resize the same webview; they do not simulate mini-player or hide/reopen transitions. This is a native rendering/capture/input regression test, not a complete app end-to-end test.

Validation: all thirteen scenarios passed on macOS and in an isolated Linux container; removing window-zoom compensation caused a pixel assertion to fail. Targeted lint/format, scoped unused-code checks, feature-ledger validation, and actionlint passed. No production behavior or telemetry changes are included.

macOS capture at 120% window zoom and 110% page zoom:

macOS calibration

Linux phone capture:

Linux phone calibration


Written by an agent (Codex, gpt-6.1-sol).

@github-actions

github-actions Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Upstream divergence

Both sides are compared with upstream at the in-order tip 06e627448b. Excludes .repos/ and pnpm-lock.yaml.

Measure Base This PR Change
Upstream files the fork changes 1,379 1,379 0
Lines changed in them 64,991 64,995 +4
Upstream files the fork removes 41 41 0
Fork-only files 442 446 +4
Fork-only lines 78,522 79,012 +490
Upstream files whose difference changes (2)
File Change Now differs by
apps/desktop/package.json +3 8 lines
knip.jsonc +1 28 lines

@github-actions

Copy link
Copy Markdown

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Codex Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Codex Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Codex Live turn WebSocket decoded 20.9 KiB 20.9 KiB 0 B (0.0%) 29.3 KiB ✅
Codex Live turn messages 2 2 0 (0.0%) 8 ✅
Claude Total thread wire 5.0 KiB 5.0 KiB 0 B (0.0%) 6.8 KiB ✅
Claude Thread snapshot wire 3.8 KiB 3.8 KiB 0 B (0.0%) 4.9 KiB ✅
Claude Live turn WebSocket wire 1.2 KiB 1.2 KiB 0 B (0.0%) 2.0 KiB ✅
Claude Live turn WebSocket decoded 21.2 KiB 21.2 KiB 0 B (0.0%) 29.3 KiB ✅
Claude Live turn messages 2 2 0 (0.0%) 8 ✅

Baseline: fa05941 · PR result: 9be2ede · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

@incognitojam
incognitojam merged commit d376493 into main Oct 15, 2026
34 checks passed
@incognitojam
incognitojam deleted the styal/browser-calibration-ci branch October 15, 2026 13:16
incognitojam pushed a commit that referenced this pull request Oct 16, 2026
…dentity (pingdotgg#16032)

Fork adaptation: The backend shutdown finalizer keeps the fork's span and trace flush (fork #203) and adds upstream's renderer history shutdown before the shutdown marker completes. The fork-only browser calibration harness (fork #841) now provides a no-op renderer history, because the preview manager requires the new service.

(cherry picked from commit 7b797f2)
Upstream-PR: 16032
Fork-Feature: desktop-graceful-shutdown, preview-surface-continuity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant