Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Sources/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,10 @@ struct ContentView: View {
}

private var effectiveTitlebarPadding: CGFloat {
isMinimalMode ? -titlebarPadding : titlebarPadding
if isMinimalMode {
return isFullScreen ? 0 : -titlebarPadding
}
return titlebarPadding
}

private var terminalContent: some View {
Expand Down Expand Up @@ -2378,6 +2381,7 @@ struct ContentView: View {
workspace: tab,
isWorkspaceVisible: presentation.isPanelVisible,
isWorkspaceInputActive: isInputActive,
isFullScreen: isFullScreen,
workspacePortalPriority: portalPriority,
onThemeRefreshRequest: { reason, eventId, source, payloadHex in
scheduleTitlebarThemeRefreshFromWorkspace(
Expand Down Expand Up @@ -2514,7 +2518,7 @@ struct ContentView: View {
}

private func syncTrafficLightInset() {
let inset: CGFloat = (isMinimalMode && !sidebarState.isVisible) ? 80 : 0
let inset: CGFloat = (isMinimalMode && !sidebarState.isVisible && !isFullScreen) ? 80 : 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resync tab inset when fullscreen state is initialized

syncTrafficLightInset() now depends on isFullScreen, but isFullScreen is also initialized asynchronously from window.styleMask.contains(.fullScreen) (outside the enter/exit fullscreen notifications). Since syncTrafficLightInset() is only called on appear and on specific change handlers, a window restored already in fullscreen can keep the old 80px tab leading inset until another trigger occurs. Please also resync when the initial fullscreen state is set (for example via an onChange(of: isFullScreen) handler or immediately after that assignment).

Useful? React with 👍 / 👎.

@cubic-dev-ai cubic-dev-ai Bot Mar 30, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: Because this inset now depends on isFullScreen, restored windows that start in fullscreen can keep a stale 80px leading gap if isFullScreen is initialized later without triggering another sync. Resync the tab inset immediately after initial fullscreen-state assignment (or observe isFullScreen changes) so startup/restored fullscreen state is applied consistently.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Sources/ContentView.swift, line 2521:

<comment>Because this inset now depends on `isFullScreen`, restored windows that start in fullscreen can keep a stale 80px leading gap if `isFullScreen` is initialized later without triggering another sync. Resync the tab inset immediately after initial fullscreen-state assignment (or observe `isFullScreen` changes) so startup/restored fullscreen state is applied consistently.</comment>

<file context>
@@ -2514,7 +2518,7 @@ struct ContentView: View {
 
     private func syncTrafficLightInset() {
-        let inset: CGFloat = (isMinimalMode && !sidebarState.isVisible) ? 80 : 0
+        let inset: CGFloat = (isMinimalMode && !sidebarState.isVisible && !isFullScreen) ? 80 : 0
         for tab in tabManager.tabs {
             if tab.bonsplitController.configuration.appearance.tabBarLeadingInset != inset {
</file context>
Fix with Cubic

for tab in tabManager.tabs {
if tab.bonsplitController.configuration.appearance.tabBarLeadingInset != inset {
tab.bonsplitController.configuration.appearance.tabBarLeadingInset = inset
Expand Down Expand Up @@ -3051,6 +3055,7 @@ struct ContentView: View {
isFullScreen = true
setTitlebarControlsHidden(true, in: window)
AppDelegate.shared?.fullscreenControlsViewModel = fullscreenControlsViewModel
syncTrafficLightInset()
})

view = AnyView(view.onReceive(NotificationCenter.default.publisher(for: NSWindow.didExitFullScreenNotification)) { notification in
Expand All @@ -3059,6 +3064,7 @@ struct ContentView: View {
isFullScreen = false
setTitlebarControlsHidden(false, in: window)
AppDelegate.shared?.fullscreenControlsViewModel = nil
syncTrafficLightInset()
})

view = AnyView(view.onReceive(NotificationCenter.default.publisher(for: NSWindow.didResizeNotification)) { notification in
Expand Down
3 changes: 2 additions & 1 deletion Sources/WorkspaceContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ struct WorkspaceContentView: View {
@ObservedObject var workspace: Workspace
let isWorkspaceVisible: Bool
let isWorkspaceInputActive: Bool
let isFullScreen: Bool
let workspacePortalPriority: Int
let onThemeRefreshRequest: ((
_ reason: String,
Expand Down Expand Up @@ -377,7 +378,7 @@ struct WorkspaceContentView: View {
}

Group {
if isMinimalMode {
if isMinimalMode && !isFullScreen {
bonsplitView
.ignoresSafeArea(.container, edges: .top)
} else {
Expand Down
Loading