Skip to content

fix(desktop): remove titlebar inset in fullscreen - #38793

Merged
Hona merged 5 commits into
anomalyco:devfrom
Hona:fix/desktop-fullscreen-titlebar-spacing
Jul 27, 2026
Merged

fix(desktop): remove titlebar inset in fullscreen#38793
Hona merged 5 commits into
anomalyco:devfrom
Hona:fix/desktop-fullscreen-titlebar-spacing

Conversation

@Hona

@Hona Hona commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

  • expose Electron window fullscreen transitions to the renderer
  • remove the macOS traffic-light titlebar inset while fullscreen and restore it when windowed
  • drop the dead __TAURI__ titlebar bridge (drag/maximize/setTheme no-ops, unreachable decorum containers, electronWindows alias) left behind after the Tauri shell removal
  • cover fullscreen, windowed, and zoomed titlebar padding

Root cause

The macOS traffic-light padding was keyed only by platform, so the 84px reservation remained after Electron hid the native controls in fullscreen. Electron emits enter-full-screen / leave-full-screen after the asynchronous native transition completes, so the inset updates immediately with those events rather than adding a late CSS animation.

Notes

  • data-tauri-drag-region is kept: it is the live CSS hook for app-region: drag in packages/ui/src/styles/base.css, just legacy-named. Window dragging and native double-click zoom/maximize are unaffected (the removed handlers always early-returned on window.__TAURI__ === undefined).
  • The fullscreen signal is cross-platform plumbing (isFullScreen(), enter/leave-full-screen), but only the macOS inset consumes it; Windows continues to size via env(titlebar-area-width).

Testing

  • bun typecheck in packages/app and packages/desktop
  • bun test ./src/components/titlebar-padding.test.ts ./src/components/titlebar-history.test.ts ./src/components/titlebar-tab-gesture.test.ts ./src/components/titlebar-session-events.test.ts in packages/app
  • bun test ./src/main/window-registry.test.ts ./electron-builder.config.test.ts in packages/desktop
  • push hook: full workspace typecheck, 30 packages passed

The macOS traffic-light padding was keyed only by platform, so it remained after Electron hid the controls in fullscreen.
Copilot AI review requested due to automatic review settings July 25, 2026 02:52
@Hona
Hona requested a review from Brendonovich as a code owner July 25, 2026 02:52

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Hona added 2 commits July 25, 2026 13:12
The __TAURI__ window bridge is always undefined since the Tauri shell was removed; drag, maximize, and setTheme were no-ops (CSS app-region and native OS handling do the real work). The inset change now follows the macOS fullscreen transition and respects reduced motion.
Electron emits macOS fullscreen events after the native transition completes, so animating the inset from those events delayed its alignment with the traffic lights.
@Hona Hona added the beta label Jul 25, 2026
@opencode-agent

Copy link
Copy Markdown
Contributor

⚠️ Blocking Beta Release

This PR cannot be merged into the beta branch due to: Merge failed

Please resolve this issue to include this PR in the next beta release.

Guard the fullscreen IPC send against window teardown, restore the standard content inset when the traffic lights are hidden, and move the renderer signal alongside the existing webview-zoom module.
The extracted helper was a single-use ternary and division, so it moves back to the call site next to the existing Windows caption-width constant and the two fullscreen memos collapse into one.
@Hona
Hona enabled auto-merge (squash) July 27, 2026 03:47
@Hona
Hona merged commit a9afed0 into anomalyco:dev Jul 27, 2026
8 checks passed
minhmc2007 pushed a commit to minhmc2007/AniCode that referenced this pull request Jul 27, 2026
minhmc2007 pushed a commit to minhmc2007/AniCode that referenced this pull request Jul 29, 2026
3kaiu pushed a commit to 3kaiu/opencode-x that referenced this pull request Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants