Repository navigation
fix(browser): preserve locale, timezone, and device overrides - #119695
Conversation
|
Land-ready proof for
No proof gap or actionable finding remains. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: stale review; fresh review needed. Summary Next step |
|
ClawSweeper exact-head status for
Proceeding through the repository-native guarded merge without claiming a ClawSweeper approval. |
|
Merged via squash.
|
…cope * origin/main: (70 commits) fix(clickclack): preserve MIME extension for unnamed uploads (openclaw#119646) fix(memory): keep post-ready RPCs responsive (openclaw#119710) fix(browser): preserve locale, timezone, and device overrides (openclaw#119695) fix(agents): stop messaging dedupe from dropping final replies that quote a short tool send (openclaw#118178) test(agents): batch code mode budget proof (openclaw#119699) fix(memory): keep gateway RPCs responsive during startup (openclaw#119676) improve(ui): trail transient session status beside row actions (openclaw#119560) refactor(msteams): consolidate channel action target resolution (openclaw#119632) fix: tail context answers the current user message (openclaw#117364) fix(whatsapp): exercise descriptor-safe credential persistence (openclaw#119621) fix(diagnostics-otel): route OTLP endpoints by signal (openclaw#101655) refactor(skills): consolidate workshop transcript and record normalization (openclaw#119643) fix(video): harden DashScope task and media lifecycle (openclaw#117303) refactor(transcripts): consolidate persistence and export ownership (openclaw#119634) fix: preserve ClickClack discussion state contracts (openclaw#118851) fix(matrix): retire shared E2EE clients safely (openclaw#119570) refactor(cron): unify catch-up persistence and payload encoding (openclaw#119636) refactor(ui): centralize composer attachment and capability controls (openclaw#119650) refactor(daemon): consolidate managed service lifecycle ownership (openclaw#119647) fix(browser): honor explicit navigation timeouts across browser drivers (openclaw#119654) ...
…aw#119695) * fix(browser): make device emulation transitions atomic * test(browser): verify device presets in packaged profile * fix(browser): retain page emulation overrides
What Problem This Solves
Fixes an issue where
openclaw browser set locale,set timezone, andset devicecould report success but lose their direct Chrome emulation state immediately. Device changes preserved only the Playwright-owned viewport; user agent, DPR, physical screen, orientation, mobile mode, and touch state reverted when OpenClaw detached its temporary CDP session. Switching from a mobile preset to desktop also never explicitly disabled touch, and overlapping device commands could interleave fields from different presets.Why This Change Was Made
Persistent page emulation now has one lifecycle owner. Locale, timezone, and device commands reuse a retained page-scoped CDP session that is detached when the page closes. Device presets run through one per-page atomic queue, explicitly replacing every descriptor field; a request cancelled before admission is skipped, while an admitted descriptor completes as one transition.
This mirrors Playwright 1.62's Chromium device-context behavior and keeps ordinary one-shot CDP reads/mutations on their existing temporary-session helper.
User Impact
Browser locale, timezone, and device overrides now remain active for the controlled page. Switching from iPhone 14 to Desktop Chrome replaces viewport, user agent, DPR, physical screen, orientation, mobile mode, and touch state without mixed or stale values.
Release-note context: fixes browser locale, timezone, and device emulation overrides that reverted or mixed state after successful CLI commands.
Evidence
Exact head:
0b2adead84f90a7089e4bda2b747f75c32070092.main: 4/4 focused cases failed, proving stale touch, incorrect screen/orientation, descriptor interleaving, and ignored cancellation.tbx_01kz9hjzdws88bw65pq62pmg9g, run https://github.com/openclaw/openclaw/actions/runs/31033035253, builtmainplus the E2E assertion. The public CLI changed only viewport; observed DPR 1, screen 800×600, touch 0, and landscape orientation instead of the iPhone preset.tbx_01kz9j57v8cx2axgpg90nq699r, run https://github.com/openclaw/openclaw/actions/runs/31033822493, synced the six final owner/test files that were then committed as this exact head. The built CLI preserveden-GBandAmerica/New_York, applied iPhone 14 with its exact viewport/DPR/screen/touch/orientation, fully replaced it with Desktop Chrome, stopped the Chromium process, and deleted the managed profile. Marker:BROWSER_PLUGIN_PROFILES_PACKAGED_OK; final command 2m44s.gpt-5.6-sol, xhigh, clean at 0.98 with no accepted/actionable findings.[email protected]device descriptors and Chromium application code:Production delta is +144/-53 (net +91) for the retained emulation-session lifecycle and atomic device-transition boundary. Tests and packaged E2E are +410/-0. No config, protocol, storage schema, dependency, or permission surface changes.
Docs remain accurate: the existing CLI pages already document locale, timezone, and Playwright device presets. OpenClaw changelog generation is release-owned.