Skip to content

fix(desktop): keep header aligned after zoom changes - #5235

Open
r6mez wants to merge 1 commit into
pingdotgg:mainfrom
r6mez:fix-header-after-zoom
Open

fix(desktop): keep header aligned after zoom changes#5235
r6mez wants to merge 1 commit into
pingdotgg:mainfrom
r6mez:fix-header-after-zoom

Conversation

@r6mez

@r6mez r6mez commented Aug 2, 2026

Copy link
Copy Markdown

Closes: #5232

What Changed

  • Keep the Linux title bar overlay height synchronized with renderer zoom changes.
  • Update desktop View menu zoom actions to synchronize window appearance.
  • Add extra sidebar header padding to preserve alignment.
  • Add focused tests for zoom behavior and title bar sizing.

Why

Zooming the renderer could leave the desktop title bar overlay at its original height, causing the header and sidebar content to become misaligned. This updates the overlay whenever zoom changes and covers the behavior with platform-specific tests.

UI Changes

Before:
image

After:
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Low Risk
Desktop window chrome and menu zoom behavior only; no auth, data, or backend changes. Risk is limited to Electron title bar overlay sizing on non-macOS platforms.

Overview
Fixes #5232 by keeping the native title bar overlay aligned with renderer zoom on Linux/Windows desktop, and nudging sidebar header padding so chrome stays visually consistent.

On non-macOS, resolveTitleBarOverlayHeight scales overlay height when zoom factor exceeds 1, and syncWindowTitleBarHeight runs after load, on zoom-changed, and when zoom keyboard shortcuts are detected. syncAppearance now applies overlay height from getZoomFactor() as well. The View menu on Linux/Windows uses custom zoom click handlers that adjust zoomLevel and call desktopWindow.syncAppearance (macOS keeps Electron role-based zoom items).

SidebarChrome changes header vertical padding from py-0 to py-2. Tests cover menu zoom + appearance sync and Linux title bar overlay updates.

Reviewed by Cursor Bugbot for commit 9eb8014. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Fix desktop title bar alignment after zoom changes on non-macOS platforms

  • On non-macOS, the title bar overlay height now scales with the renderer zoom factor via a new resolveTitleBarOverlayHeight util, so the header stays aligned after zooming.
  • DesktopWindow listens for zoom-changed and before-input-event (keyboard zoom shortcuts) to resync the title bar height after each zoom change.
  • DesktopApplicationMenu adds explicit Zoom In/Out/Actual Size menu items with click handlers on non-macOS (macOS continues to use role-based items), each calling desktopWindow.syncAppearance after adjusting webContents.zoomLevel.
  • Sidebar header vertical padding is increased from py-0 to py-2 in SidebarChromeHeader.

Macroscope summarized 9eb8014.

- Sync the Linux title bar overlay height with renderer zoom
- Add desktop zoom menu handlers and regression coverage
- Preserve sidebar header spacing after zoom
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b5e5e4f-50cc-44c4-bac2-5c79049e3203

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Aug 2, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This bug fix adds new event listeners and zoom synchronization logic to desktop window management on Windows/Linux platforms. While the changes are well-tested and self-contained, the new runtime behavior (keyboard shortcut detection, zoom event handling) combined with the author being new to these files warrants human review.

You can customize Macroscope's approvability policy. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Linux desktop title-bar controls touch the window edge when UI is zoomed

1 participant