Repository navigation
fix(desktop): re-apply UI zoom on show/restore, scoped to chat windows (supersedes #61245) - #61925
Merged
Merged
Conversation
Windows drops webContents zoom on minimize/restore, so the UI snapped back to 100% while Settings still read 125%. Zoom was only reasserted on the main window's did-finish-load, never on show/restore and never for session windows. Reassert the persisted level on show/restore + first load, wired once in wireCommonWindowHandlers so the main window and secondary session windows share it. The pet overlay opts out (zoom:false): it sizes its own OS window to fit the sprite in unzoomed CSS px and has its own Alt+wheel scale, so inheriting the global zoom would render the mascot larger than its window and crop it (and it shares the renderer origin's zoom localStorage key). Salvages #61245; keeps its pure-helper tests and adds a scope assertion. Co-authored-by: HexLab98 <liruixinch@outlook.com>
1 of 2 tasks
OutThisLife
enabled auto-merge
July 10, 2026 07:14
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
…245-ui-zoom fix(desktop): re-apply UI zoom on show/restore, scoped to chat windows (supersedes NousResearch#61245)
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
…245-ui-zoom fix(desktop): re-apply UI zoom on show/restore, scoped to chat windows (supersedes NousResearch#61245)
7 tasks done
8 tasks done
1 task
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
…245-ui-zoom fix(desktop): re-apply UI zoom on show/restore, scoped to chat windows (supersedes NousResearch#61245)
randlee
pushed a commit
to randlee/hermes-agent
that referenced
this pull request
Aug 11, 2026
…245-ui-zoom fix(desktop): re-apply UI zoom on show/restore, scoped to chat windows (supersedes NousResearch#61245)
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
…245-ui-zoom fix(desktop): re-apply UI zoom on show/restore, scoped to chat windows (supersedes NousResearch#61245)
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
Supersedes #61245.
On Windows, Chromium drops
webContentszoom on minimize→restore, so the UI snapped back to 100% while Settings still read 125% (#61081). Zoom was only reasserted on the main window'sdid-finish-load— never onshow/restore, and never for secondary session windows.This reasserts the persisted zoom on
show+restore+ first load, wired once inwireCommonWindowHandlersso the main window and session windows share the fix.What this changes vs #61245
#61245 wired the reassert through
wireCommonWindowHandlers, which is also used by the pet overlay — the open question Gille raised in the report thread. Letting the pet inherit global UI zoom is a bug, not a nicety:overlayWindowSize→setBounds).setZoomLevelscales rendered content but not window bounds, so at 125% the sprite renders larger than the window that contains it and gets cropped at the edges (breaking that helper's own "never cropped by the window edge" invariant; theright:0/top:0mail button can clip off too).…/index.html?win=overlay), so it reads the samehermes:desktop:zoomLevelkey — fix(desktop): re-apply UI zoom after minimize/restore on Windows #61245 would newly pull the main window's 125% into the mascot on spawn.So zoom is now opt-out:
wireCommonWindowHandlers(win, { zoom: false })for the pet overlay; chat windows keep it on. (Click-through alpha hit-testing itself stays correct — it's all one CSS-px space — but window-fit + the screen/CSS coordinate mixing in drag/pop-out is where zoom bites.)Files
electron/zoom.ts—installZoomReassertOnWindowEvents+ZOOM_REASSERT_WINDOW_EVENTS(from fix(desktop): re-apply UI zoom after minimize/restore on Windows #61245).electron/main.ts—wireCommonWindowHandlers(win, { zoom })gate; pet passes{ zoom: false }; drop the now-redundantrestorePersistedZoomLevel(mainWindow)increateWindow(shared helper handles it).electron/zoom.test.ts— fix(desktop): re-apply UI zoom after minimize/restore on Windows #61245's pure-helper tests + a scope assertion (pet opts out, chat windows keep zoom, no double-restore increateWindow).Test plan
npx tsx --test electron/zoom.test.ts→ 10 passedtsc -p apps/desktop --noEmit→ no errors in changed filesCredit: @HexLab98 (original fix + helper tests), preserved via
Co-authored-by. Closes the pet-scope review question from the report thread.