Skip to content

fix: clear device metrics overrides when a DevTools client disconnects - #52946

Merged
codebytere merged 4 commits into
43-x-yfrom
manual-bp/43-x-y/52254
Aug 24, 2026
Merged

codebytere merged 4 commits into
43-x-yfrom
manual-bp/43-x-y/52254

Conversation

@VerteDinde

Copy link
Copy Markdown
Member

Backport of #52254

See that PR for details.

Manual backport notes: include-order conflict only (devtools_manager_delegate.cc); hunks are otherwise identical to main.

Notes: Fixed DevTools device metrics overrides persisting indefinitely when a remote debugging client disconnected without clearing them.

@VerteDinde VerteDinde added backport This is a backport PR semver/patch backwards-compatible bug fixes 43-x-y labels Aug 18, 2026
@electron-cation electron-cation Bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Aug 18, 2026

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new test has typescript errors that need to be resolved.

The namespace import is not constructable under tsconfig.spec.json
(nodenext implies esModuleInterop), and new-cap rejects `new ws()`.
@codebytere
codebytere dismissed jkleinsc’s stale review August 23, 2026 09:18

Issue corrected.

@codebytere
codebytere enabled auto-merge (squash) August 23, 2026 09:18
@codebytere
codebytere merged commit d7733aa into 43-x-y Aug 24, 2026
75 checks passed
@codebytere
codebytere deleted the manual-bp/43-x-y/52254 branch August 24, 2026 01:09
@release-clerk

release-clerk Bot commented Aug 24, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed DevTools device metrics overrides persisting indefinitely when a remote debugging client disconnected without clearing them.

reachjalil added a commit to different-ai/openwork that referenced this pull request Oct 7, 2026
Electron 43.5 restores a page's view size when a DevTools client that set
Emulation.setDeviceMetricsOverride disconnects without clearing it
(electron/electron#52946). Since dev moved from Electron 43.2.0 to 43.7.7
(#5535), closing the capture client while building the world undid the
leftover 1440x900 viewport before the test body ran, so the spec failed
before the tab was selected.

Keep the client connected until the world is disposed. A client that stays
connected still leaves the page laid out at its capture size inside the
panel, which is the case selecting the tab must recover.

Signed-off-by: Jalil <[email protected]>
reachjalil added a commit to different-ai/openwork that referenced this pull request Oct 8, 2026
* fix(browser): keep native pages contained in their pane

Signed-off-by: Jalil <[email protected]>

* fix(browser): cover geometry and background transition races

Signed-off-by: Jalil <[email protected]>

* fix(browser): retain viewport recovery during queued resets

Signed-off-by: Jalil <[email protected]>

* test(browser): verify initial resize with divider focus

Signed-off-by: Jalil <[email protected]>

* test(browser): use the command palette's current placeholder

#5159 renamed the root palette placeholder to "Search actions and settings…".

Signed-off-by: Jalil <[email protected]>

* test(browser): keep the capture client connected in the viewport world

Electron 43.5 restores a page's view size when a DevTools client that set
Emulation.setDeviceMetricsOverride disconnects without clearing it
(electron/electron#52946). Since dev moved from Electron 43.2.0 to 43.7.7
(#5535), closing the capture client while building the world undid the
leftover 1440x900 viewport before the test body ran, so the spec failed
before the tab was selected.

Keep the client connected until the world is disposed. A client that stays
connected still leaves the page laid out at its capture size inside the
panel, which is the case selecting the tab must recover.

Signed-off-by: Jalil <[email protected]>

---------

Signed-off-by: Jalil <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

43-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

No open projects
Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants