Skip to content

fix: titlebar alignment in fullscreen and on windows - #277

Merged
nwparker merged 6 commits into
stablyai:mainfrom
Jingyue-Wu:fix/fullscreen-titlebar-alignment
Apr 6, 2026
Merged

nwparker merged 6 commits into
stablyai:mainfrom
Jingyue-Wu:fix/fullscreen-titlebar-alignment

Conversation

@Jingyue-Wu

@Jingyue-Wu Jingyue-Wu commented Apr 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

On Windows and fullscreen Mac, the sidebar toggle and text in titlebar were not aligned due to the traffic light position. #236

Screenshots

Before:
image

After (Mac):
image

After (Windows):
image

Testing

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed

AI Review Report

Reviewed behavior on Mac/Linux/Windows, React patterns, and IPC correctness. Fullscreen state comes from the native window (not derived from other state), so the useEffect subscription is appropriate. Titlebar trafficlight padding is only required on Mac. Linux/Windows uses pl-2 (I adjusted from pl-3 for symmetry and alignment). Initial state hydrated via getIsFullScreen() invoke to avoid missing early send. No shortcut, path, or shell changes.

Security Audit

IPC: window:fullscreen-changed only pushes booleans; window:is-full-screen only returns a boolean from BrowserWindow.isFullScreen(). No user-controlled input, no exec, no path concatenation, no elevated privileges.

Preload: Same channel names; no new invoke surface that accepts arbitrary payloads.

Secrets / auth: None touched.

Dependencies: No new packages.

Follow-up: None for security; optional hardening is only “ensure handler removed/re-registered if you ever add multiple main windows” (already handled via removeHandler + handle on attach).

@AmethystLiang
AmethystLiang self-requested a review April 4, 2026 04:08

@AmethystLiang AmethystLiang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM! I added the missing getIsFullScreen() invoke to hydrate the initial fullscreen state as mentioned in the PR description, and disabled the max-lines lint rule for src/preload/index.ts to make it pass. The styling changes are correct and gracefully handle the Windows padding.

@AmethystLiang

Copy link
Copy Markdown
Contributor

Maybe this PR #317 provided part of the fix?

@Jingyue-Wu

Copy link
Copy Markdown
Contributor Author

Maybe this PR #317 provided part of the fix?

Oops I forgot to tag with Fixes #236

It solved the issue for Windows, but still needs to take into account fullscreen on Mac:

image

@nwparker
nwparker merged commit 77f6021 into stablyai:main Apr 6, 2026
1 check passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants