Skip to content

fix: preserve horizontal tab bar in fullscreen with minimal mode - #2341

Closed
solssak wants to merge 1 commit into
manaflow-ai:mainfrom
solssak:fix/2317-minimal-mode-fullscreen-tab-bar
Closed

solssak wants to merge 1 commit into
manaflow-ai:mainfrom
solssak:fix/2317-minimal-mode-fullscreen-tab-bar

Conversation

@solssak

@solssak solssak commented Mar 30, 2026 •

Copy link
Copy Markdown

Fixes #2317 — Horizontal tab bar (Bonsplit tabs) disappears when minimal mode is enabled and the window enters fullscreen.

Problem

In WorkspaceContentView, .ignoresSafeArea(.container, edges: .top) is applied unconditionally whenever minimal mode is active. In fullscreen, the safe area computation changes, causing the Bonsplit tab bar to be pushed out of view.

// Before (bug): always ignores safe area in minimal mode
if isMinimalMode {
    bonsplitView
        .ignoresSafeArea(.container, edges: .top)
}

Fix

Pass isFullScreen from ContentView to WorkspaceContentView and skip the .ignoresSafeArea modifier when fullscreen is active. This preserves the intended minimal mode behavior in windowed mode while keeping tabs visible in fullscreen.

// After: only ignore safe area in windowed minimal mode
if isMinimalMode && !isFullScreen {
    bonsplitView
        .ignoresSafeArea(.container, edges: .top)
}

Changes

  • Sources/WorkspaceContentView.swift: Add isFullScreen property; guard .ignoresSafeArea with !isFullScreen
  • Sources/ContentView.swift: Pass isFullScreen to WorkspaceContentView at the call site

Testing

  1. Enable minimal mode
  2. Open 2+ tabs so tab bar is visible
  3. Enter fullscreen (⌘⌃F or ⌘↩)
  4. Tab bar remains visible

Also verified windowed minimal mode still hides the titlebar area correctly (no regression).

Regression test: skipped (intentional)

Per CLAUDE.md test quality policy: this fix changes how a SwiftUI layout modifier (.ignoresSafeArea) is conditionally applied based on window fullscreen state. The bug is purely visual — it depends on AppKit's safe area computation during fullscreen transitions, which cannot be exercised through unit or integration tests. No meaningful behavioral or artifact-level test is practical for this change.

Guard .ignoresSafeArea(.container, edges: .top) so it only applies in
windowed minimal mode, not fullscreen. In fullscreen the safe area
computation changes and causes Bonsplit tabs to disappear.

Pass isFullScreen from ContentView to WorkspaceContentView and skip
the ignoresSafeArea modifier when the window is fullscreen.

Fixes manaflow-ai#2317
@vercel

vercel Bot commented Mar 30, 2026

Copy link
Copy Markdown

@solssak is attempting to deploy a commit to the Manaflow Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Mar 30, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The changes forward full-screen state from ContentView to WorkspaceContentView and conditionally apply the top safe area ignore only when in minimal mode and not in full-screen, addressing a bug where the tab bar disappears in fullscreen with minimal mode enabled.

Changes

Cohort / File(s) Summary
Full-screen state propagation
Sources/ContentView.swift, Sources/WorkspaceContentView.swift
Added isFullScreen: Bool parameter to WorkspaceContentView and modified the minimal-mode layout to conditionally apply .ignoresSafeArea(.container, edges: .top) only when not in full-screen, preventing tab bar visibility regression.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 Full-screen dreams once hid the tabs away,
In minimal mode's playful sway,
A boolean flag, so small and bright,
Brings back the view to fullscreen's light! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main fix: preserving the horizontal tab bar in fullscreen when minimal mode is enabled.
Linked Issues check ✅ Passed All coding requirements from issue #2317 are met: the tab bar visibility bug is fixed, fullscreen behavior is preserved, windowed minimal mode behavior is maintained, and safe area handling is properly guarded.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the reported issue. The modifications to ContentView.swift and WorkspaceContentView.swift are necessary and focused on the tab bar visibility problem.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description is comprehensive, detailed, and follows the template structure with all required sections present and well-documented.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No issues found across 2 files

@greptile-apps

greptile-apps Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a visual regression where the horizontal tab bar (Bonsplit tabs) disappears when both minimal mode and fullscreen are active simultaneously. The root cause was that .ignoresSafeArea(.container, edges: .top) was applied unconditionally whenever minimal mode was on — fullscreen changes the safe area geometry in a way that pushed the tab bar out of view.

The fix is minimal and well-scoped: isFullScreen is threaded from ContentView (where it already existed as a @State var driven by NSWindow fullscreen notifications) into WorkspaceContentView as a plain let property, and the safe area modifier is now only applied when the window is in windowed minimal mode. There is only one WorkspaceContentView call site, so no other places need updating.

Key changes:

  • Sources/WorkspaceContentView.swift: New isFullScreen: Bool property; .ignoresSafeArea guard tightened from isMinimalMode → isMinimalMode && !isFullScreen
  • Sources/ContentView.swift: Passes the existing isFullScreen @State to WorkspaceContentView

Notes:

  • Per the project's regression test commit policy (CLAUDE.md), bug fixes should include a failing test in commit 1 and the fix in commit 2. The PR does not include a regression test. Given that this is a pure UI layout fix driven by SwiftUI modifier application, a meaningful runtime behavioral test may not be practical — if so, CLAUDE.md allows skipping and stating that explicitly, but it's worth confirming.

Confidence Score: 5/5

Safe to merge — the change is a two-line, well-contained fix with no P0 or P1 issues.

The fix correctly threads an already-reliable isFullScreen state down to the view that needs it and narrows the safe area modifier guard accordingly. The existing isFullScreen source of truth is used consistently throughout ContentView and is initialised both from window observation and from the styleMask check, so there is no race or stale-state risk. All remaining feedback is P2 (missing regression test per project policy).

No files require special attention.

Important Files Changed

Filename Overview
Sources/WorkspaceContentView.swift Adds isFullScreen: Bool property and guards .ignoresSafeArea(.container, edges: .top) with !isFullScreen, correctly fixing tab bar visibility in fullscreen minimal mode.
Sources/ContentView.swift Passes the existing isFullScreen @State variable to WorkspaceContentView at the sole call site — minimal, correct, no other changes needed.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[WorkspaceContentView body] --> B{isMinimalMode?}
    B -- No --> D[render bonsplitView]
    B -- Yes --> C{isFullScreen?}
    C -- "Yes: fullscreen, skip modifier" --> D
    C -- "No: windowed, apply modifier" --> E["bonsplitView\n.ignoresSafeArea(.container, edges: .top)"]
Loading

Reviews (1): Last reviewed commit: "fix: preserve horizontal tab bar in full..." | Re-trigger Greptile

Comment thread Sources/WorkspaceContentView.swift
lawrencecchen added a commit that referenced this pull request Mar 30, 2026
Three issues caused the Bonsplit horizontal tab bar to be hidden
when entering fullscreen with minimal mode enabled:

1. ignoresSafeArea(.container, edges: .top) was applied unconditionally
   in minimal mode, pushing content behind the fullscreen menu bar area.
   Now gated on !isFullScreen.

2. effectiveTitlebarPadding returned -titlebarPadding in minimal mode
   regardless of fullscreen state. In fullscreen there is no native
   titlebar to compensate for, so the negative offset pushed content
   off the top of the screen. Now returns 0 in fullscreen.

3. Traffic light leading inset (80px) was applied in fullscreen minimal
   mode even though there are no traffic light buttons. Now gated on
   !isFullScreen, and syncTrafficLightInset is called on fullscreen
   enter/exit.

Closes #2317
Based on #2341
lawrencecchen added a commit that referenced this pull request Mar 30, 2026
Three issues caused the Bonsplit horizontal tab bar to be hidden
when entering fullscreen with minimal mode enabled:

1. ignoresSafeArea(.container, edges: .top) was applied unconditionally
   in minimal mode, pushing content behind the fullscreen menu bar area.
   Now gated on !isFullScreen.

2. effectiveTitlebarPadding returned -titlebarPadding in minimal mode
   regardless of fullscreen state. In fullscreen there is no native
   titlebar to compensate for, so the negative offset pushed content
   off the top of the screen. Now returns 0 in fullscreen.

3. Traffic light leading inset (80px) was applied in fullscreen minimal
   mode even though there are no traffic light buttons. Now gated on
   !isFullScreen, and syncTrafficLightInset is called on fullscreen
   enter/exit.

Closes #2317
Based on #2341

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
@lawrencecchen

Copy link
Copy Markdown
Contributor

Thank you for the contribution! Your ignoresSafeArea fix was the right direction. We expanded on it in #2375 with two additional fixes needed for full correctness:

  1. effectiveTitlebarPadding was returning a negative offset in fullscreen minimal mode (pushing the tab bar off the top of the screen)
  2. Traffic light leading inset (80px) was being applied in fullscreen where there are no traffic lights

All three fixes are now merged to main.

bn-l pushed a commit to bn-l/cmux that referenced this pull request Apr 3, 2026
Three issues caused the Bonsplit horizontal tab bar to be hidden
when entering fullscreen with minimal mode enabled:

1. ignoresSafeArea(.container, edges: .top) was applied unconditionally
   in minimal mode, pushing content behind the fullscreen menu bar area.
   Now gated on !isFullScreen.

2. effectiveTitlebarPadding returned -titlebarPadding in minimal mode
   regardless of fullscreen state. In fullscreen there is no native
   titlebar to compensate for, so the negative offset pushed content
   off the top of the screen. Now returns 0 in fullscreen.

3. Traffic light leading inset (80px) was applied in fullscreen minimal
   mode even though there are no traffic light buttons. Now gated on
   !isFullScreen, and syncTrafficLightInset is called on fullscreen
   enter/exit.

Closes manaflow-ai#2317
Based on manaflow-ai#2341

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
ShubhamPatilsd pushed a commit to emergent-inc/mosaic that referenced this pull request Jul 9, 2026
Three issues caused the Bonsplit horizontal tab bar to be hidden
when entering fullscreen with minimal mode enabled:

1. ignoresSafeArea(.container, edges: .top) was applied unconditionally
   in minimal mode, pushing content behind the fullscreen menu bar area.
   Now gated on !isFullScreen.

2. effectiveTitlebarPadding returned -titlebarPadding in minimal mode
   regardless of fullscreen state. In fullscreen there is no native
   titlebar to compensate for, so the negative offset pushed content
   off the top of the screen. Now returns 0 in fullscreen.

3. Traffic light leading inset (80px) was applied in fullscreen minimal
   mode even though there are no traffic light buttons. Now gated on
   !isFullScreen, and syncTrafficLightInset is called on fullscreen
   enter/exit.

Closes manaflow-ai/cmux#2317
Based on manaflow-ai/cmux#2341

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
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.

Horizontal tab bar disappears in fullscreen with minimal mode enabled

2 participants