fix(desktop): zoom shortcuts no longer die when the preview browser has focus - #5691
Conversation
…as focus Cmd+= / Cmd+- were wired to Electron's zoomIn/zoomOut menu roles, which act on whichever webContents holds keyboard focus. After clicking inside an embedded preview WebContentsView (or DevTools), the shortcuts zoomed the guest page instead of the app UI and looked dead until a reload returned focus to the main window. The menu now routes zoom through DesktopWindow.zoomMain, which always targets the main window's own webContents with the same accelerators and step size as the roles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved 613d0cb Straightforward bug fix that redirects zoom shortcuts to always target the main window instead of Electron's default focus-based behavior. The scope is limited, intent is clear, and test coverage is added. You can customize Macroscope's approvability policy. Learn more. |
## What's Changed * fix(desktop): zoom shortcuts no longer die when the preview browser has focus by @t3dotgg in pingdotgg/t3code#5691 * feat(mobile): one sheet for model and thread settings by @t3dotgg in pingdotgg/t3code#5625 * feat(usage): usage page reading provider transcripts across environments by @t3dotgg in pingdotgg/t3code#5684 **Full Changelog**: pingdotgg/t3code@v0.0.33-nightly.20260808.1031...v0.0.33-nightly.20260808.1033 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.33-nightly.20260808.1033
…224) * fix(desktop): zoom shortcuts no longer die when the preview browser has focus (pingdotgg#5691) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * feat(mobile): one sheet for model and thread settings (pingdotgg#5625) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * feat(usage): usage page reading provider transcripts across environments (pingdotgg#5684) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(desktop): zoom shortcuts no longer die when the preview browser has focus (pingdotgg#5691) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * feat(mobile): one sheet for model and thread settings (pingdotgg#5625) Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * feat(usage): usage page reading provider transcripts across environments (pingdotgg#5684) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Theo Browne <me@t3.gg> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: aaditagrawal <aaditagrawal@users.noreply.github.com>
Cmd+= / Cmd+- sometimes stopped zooming the app until a Cmd+R. Cause: the View menu used Electron's
zoomIn/zoomOut/resetZoomroles, which act on whichever webContents has keyboard focus. Click inside an embedded preview browser tab (or DevTools) and the shortcuts silently zoom that guest page instead of the app UI. Cmd+R "fixed" it only because thereloadrole targets the window, and the reload hands focus back to the main webContents.The View menu zoom items are now plain click handlers (same accelerators, same 0.5 step) that route through a new
DesktopWindow.zoomMain, which always zooms the main window's own webContents no matter where focus sits. Preview tabs keep their separate zoom controls in the three-dot menu.Added a menu test that fails if the zoom items ever go back to roles.
Change authored by Claude Fable 5 via Claude Code.
🤖 Generated with Claude Code
Note
Low Risk
Localized desktop menu and main-window zoom behavior with tests; no auth, data, or backend changes.
Overview
Fixes Cmd+= / Cmd+- sometimes zooming an embedded preview (or DevTools) instead of the app UI when that guest
webContentshas focus.The View menu no longer uses Electron
zoomIn/zoomOut/resetZoomroles. Zoom items keep the same accelerators and labels but callDesktopWindow.zoomMain, which adjusts zoom on the main window’swebContents(0.5 step, reset to 0) regardless of focus.Tests add a shared menu
configureMenuhelper, stubzoomMainonDesktopWindowmocks, and assert the View submenu has no zoom roles and that Zoom In dispatcheszoom-in.Reviewed by Cursor Bugbot for commit 613d0cb. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Fix zoom shortcuts to target the main window when the preview browser has focus
resetZoom,zoomIn,zoomOut) in the View menu with explicit click handlers that callDesktopWindow.zoomMain.DesktopWindow.zoomMain(direction)which finds the focused main window and adjusts itswebContentszoom level by ±0.5 or resets to 0, matching Electron's role step size.Macroscope summarized 613d0cb.