fix(desktop): persist zoom level across routes - #38908
Closed
katanumahotori wants to merge 1 commit into
Closed
katanumahotori wants to merge 1 commit into
katanumahotori wants to merge 1 commit into
Conversation
Co-Authored-By: OpenAI <support@openai.com>
This was referenced Jun 16, 2026
16 tasks
Collaborator
|
Thanks for isolating the route-level zoom problem. The underlying gap remains relevant, but this draft needs a current-architecture salvage rather than a direct application. Problems
Suggested changes
Automated hermes-sweeper review. |
Collaborator
|
Closing as superseded — both halves of this design have since landed on main via other PRs:
You had the right architecture — main-process file as the source of truth — before either of those landed; it just arrived via parallel salvages. Thanks for the work, and sorry it sat in draft long enough to be overtaken. |
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Desktop zoom persistence so the selected zoom level behaves as an app-wide preference instead of a per-route Chromium value.
Chromium stores zoom for
file://...index.html#/routeentries separately, so Hermes Desktop could reset or vary zoom when switching sessions, opening settings, or landing on a different hash route. This PR stores the Desktop zoom level under ElectronuserDataand reapplies it on window load/navigation events.Changes
zoom.jsonunder ElectronuserDatawith{ zoomLevel }.[-9, 9]range.dom-ready,did-finish-load,did-navigate, anddid-navigate-in-page.Related
Fixes #38854.
Validation
node --check apps/desktop/electron/main.cjsI did not run the packaged Windows desktop build for this PR because Hermes Desktop is currently running locally, and the Windows package build can fail when
release/win-unpackedDLLs are locked by the running app.