Skip to content

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

Open
Hona wants to merge 3 commits into
anomalyco:devfrom
Hona:fix/desktop-fullscreen-titlebar-spacing
Open

fix(desktop): remove titlebar inset in fullscreen#38793
Hona wants to merge 3 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.

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