Skip to content

fix(frontend): remove macOS traffic-light inset during native fullscreen - #1268

Merged
khaira777 merged 3 commits into
mainfrom
fm/ship-1153-macos-fullscreen-inset
Oct 21, 2026
Merged

khaira777 merged 3 commits into
mainfrom
fm/ship-1153-macos-fullscreen-inset

Conversation

@khaira777

@khaira777 khaira777 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #1153

Intent

Resolve FreeOpenSourcePOS/FloCafe GitHub issue #1153 (fix(macOS): remove traffic-light inset during native fullscreen). Remove the 96px left traffic-light inset in .flo-title-bar__safe-area only while the macOS Electron window is in native macOS fullscreen (isFullScreen === true), restore the 96px inset immediately on exiting fullscreen (isFullScreen === false), keep the 96px inset in normal and maximized macOS windows, and leave Windows and Linux title-bar geometry unchanged. Follow the Ponytail minimal-diff approach by reusing the existing Electron window-state IPC (getWindowState / onWindowStateChanged). Verify with Playwright E2E tests and real screenshot evidence, run through /no-mistakes to open the PR linked to #1153 (Fixes #1153), and do not merge the PR.

What Changed

  • Scoped the macOS title-bar safe area's 96px left traffic-light padding in globals.css with :not([data-flo-window-fullscreen='true']), removing the inset in native fullscreen while retaining it in windowed and maximized modes.
  • Introduced a shared useDesktopTitleBarSync hook in TitleBar.tsx and DesktopDragSurface.tsx that listens to Electron window state (getWindowState and onWindowStateChanged) and reflects fullscreen status on document.documentElement.dataset.floWindowFullscreen.
  • Updated the Playwright Electron mock fixture to support window state IPC events and added E2E tests in title-bar-platform.spec.ts covering fullscreen transitions, restoration on exit, and platform invariance on Windows and Linux.

Risk Assessment

✅ Low: The changes are well-bounded, minimal, and correctly gate the macOS title-bar traffic-light inset on native fullscreen state without impacting other platforms or window states.

Testing

Drove 5 live scenarios against the real macOS Electron desktop app and Playwright browser harness; verified that entering macOS native fullscreen removes the 96px left inset to standard 12px padding, exiting fullscreen restores the 96px inset immediately, normal and maximized windows retain 96px, and Windows/Linux title bar geometry remains unaffected at 12px padding. Visual screenshot artifacts captured in the evidence directory.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
macOS real Electron native fullscreen removes the 96px traffic-light inset in .flo-title-bar__safe-area ✅ pass live ~/.no-mistakes/evidence/01M5FR1695BNPVDMHDW00XD3FJ/scenario-2-fullscreen-pos.png
macOS real Electron exiting native fullscreen restores the 96px traffic-light inset immediately ✅ pass live ~/.no-mistakes/evidence/01M5FR1695BNPVDMHDW00XD3FJ/scenario-3-restored-pos.png
macOS real Electron windowed and maximized states preserve the 96px traffic-light inset ✅ pass live ~/.no-mistakes/evidence/01M5FR1695BNPVDMHDW00XD3FJ/scenario-4-maximized-pos.png
Non-macOS platforms (Windows and Linux) retain unchanged 12px safe-area geometry in both windowed and fullscreen modes ✅ pass live cd frontend && npx playwright test e2e/title-bar-platform.spec.ts
Rapid repeated toggling between native fullscreen and restored states maintains accurate synchronization without desync ✅ pass live ~/.no-mistakes/evidence/01M5FR1695BNPVDMHDW00XD3FJ/08-pos-topbar-native-fullscreen.png

Live macOS Electron Native Fullscreen (POS)
Live macOS Electron Native Fullscreen Titlebar
Live macOS Electron Restored Windowed (POS)
Live macOS Electron Restored Titlebar
Live macOS Electron Maximized Window (POS)
Live macOS Electron Maximized Titlebar
Live macOS Electron Initial Windowed (POS)
Live macOS Electron Initial Windowed Titlebar

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 5 of 5 scenarios driven live against the product
Scenario Result Live Evidence
macOS real Electron native fullscreen removes the 96px traffic-light inset in .flo-title-bar__safe-area ✅ pass live ~/.no-mistakes/evidence/01M5FR1695BNPVDMHDW00XD3FJ/scenario-2-fullscreen-pos.png
macOS real Electron exiting native fullscreen restores the 96px traffic-light inset immediately ✅ pass live ~/.no-mistakes/evidence/01M5FR1695BNPVDMHDW00XD3FJ/scenario-3-restored-pos.png
macOS real Electron windowed and maximized states preserve the 96px traffic-light inset ✅ pass live ~/.no-mistakes/evidence/01M5FR1695BNPVDMHDW00XD3FJ/scenario-4-maximized-pos.png
Non-macOS platforms (Windows and Linux) retain unchanged 12px safe-area geometry in both windowed and fullscreen modes ✅ pass live cd frontend && npx playwright test e2e/title-bar-platform.spec.ts
Rapid repeated toggling between native fullscreen and restored states maintains accurate synchronization without desync ✅ pass live ~/.no-mistakes/evidence/01M5FR1695BNPVDMHDW00XD3FJ/08-pos-topbar-native-fullscreen.png
  • cd frontend && npx playwright test e2e/title-bar-platform.spec.ts --project=chromium
  • cd frontend && FLO_E2E_SHOW_WINDOW=1 FLO_E2E_EVIDENCE_DIR=~/.no-mistakes/evidence/01M5FR1695BNPVDMHDW00XD3FJ npx playwright test --config=playwright.electron.config.ts e2e/desktop/title-bar.electron.spec.ts
  • cd frontend && FLO_E2E_SHOW_WINDOW=1 npx playwright test --config=playwright.electron.config.ts e2e/desktop/verify-fullscreen-live.electron.spec.ts
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Remove 96px left inset in .flo-title-bar__safe-area when in native fullscreen on macOS, falling back to standard safe area padding. Restore 96px inset immediately upon exiting fullscreen, while preserving 96px in windowed/maximized macOS windows and leaving Windows/Linux geometry unchanged.
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

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: FreeOpenSourcePOS/FloCafe/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f914c921-8f56-47e5-8dac-d85f327160c7

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
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@khaira777

Copy link
Copy Markdown
Contributor Author

@greptileai review this at apex

@greptile-apps

greptile-apps Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5 Tier: apex

[Low impact] The PR appears safe to merge; no actionable issues were found.

Summary

Removes the macOS traffic-light inset during native fullscreen.

  • The macOS title bar drops its traffic-light gap in native fullscreen.

No actionable issues found. This was a read-only review; builds, tests, and UI capture were not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["Electron window state"] --> B["getWindowState / onWindowStateChanged"]
  B --> C["useDesktopTitleBarSync"]
  C --> D["data-flo-window-fullscreen"]
  D --> E{"macOS native fullscreen?"}
  E -->|Yes| F["12px left padding"]
  E -->|No, macOS| G["96px left padding"]
  E -->|Windows or Linux| H["Existing padding unchanged"]
Loading

Reviews (1) · Last reviewed commit: "no-mistakes(document): format changed ti..." · Reviewed by Greptile

@khaira777
khaira777 merged commit cb78f45 into main Oct 21, 2026
24 checks passed
@khaira777
khaira777 deleted the fm/ship-1153-macos-fullscreen-inset branch October 21, 2026 18:54
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.

fix(macOS): remove traffic-light inset during native fullscreen

1 participant