diff --git a/supacode/Features/Terminal/TabBar/TerminalTabBarMetrics.swift b/supacode/Features/Terminal/TabBar/TerminalTabBarMetrics.swift index e27b596b..cf249bf8 100644 --- a/supacode/Features/Terminal/TabBar/TerminalTabBarMetrics.swift +++ b/supacode/Features/Terminal/TabBar/TerminalTabBarMetrics.swift @@ -3,6 +3,11 @@ import CoreGraphics enum TerminalTabBarMetrics { static let barHeight: CGFloat = 31 static let barPadding: CGFloat = 4 + // Gap between the tab bar and the terminal surface below it. The chrome + // tint band extends across this gap so it reads as one continuous surface + // instead of revealing the translucent window background when + // `background-opacity` < 1. + static let barBottomGap: CGFloat = 4 static let tabHeight: CGFloat = 30 static let tabMinWidth: CGFloat = 140 static let tabCornerRadius: CGFloat = 0 diff --git a/supacode/Features/Terminal/TabBar/Views/TerminalTabBarView.swift b/supacode/Features/Terminal/TabBar/Views/TerminalTabBarView.swift index 1393e1b0..c1b28e6e 100644 --- a/supacode/Features/Terminal/TabBar/Views/TerminalTabBarView.swift +++ b/supacode/Features/Terminal/TabBar/Views/TerminalTabBarView.swift @@ -3,7 +3,8 @@ import SwiftUI struct TerminalTabBarView: View { @Bindable var manager: TerminalTabManager /// Chrome tint painted as a full-width strip behind the whole bar row — - /// the left gap, the tabs, and the trailing accessories — so the bar's + /// the left gap, the tabs, and the trailing accessories — and extended + /// down across the bottom gap to the terminal surface, so the bar's /// backing reads as part of the same tinted chrome as the toolbar above. /// The tabs keep their own neutral capsule on top. `nil` leaves the bare /// (untinted) bar chrome. @@ -50,9 +51,15 @@ struct TerminalTabBarView: View { // is inactive — the tint band below stays out of this scope so it keeps // its hue on blur, matching the toolbar / nav chrome (which don't gray out). .saturation(activeState == .inactive ? 0 : 1) - // Tint the full-width bar backing (behind the left gap, tabs capsule, and - // trailing accessories) so it joins the toolbar / nav chrome as one tinted - // surface. Fixed band alpha mirrors `windowChromeTint`; `nil` leaves it bare. + // Reserve the gap down to the terminal *inside* the tinted region (added + // after saturation, before the tint) so the band fills it instead of the + // parent leaving a transparent seam that reveals the translucent window + // background when `background-opacity` < 1. + .padding(.bottom, TerminalTabBarMetrics.barBottomGap) + // Tint the full-width bar backing (behind the left gap, tabs capsule, + // trailing accessories, and the bottom gap) so it joins the toolbar / nav + // chrome as one tinted surface. Fixed band alpha mirrors `windowChromeTint`; + // `nil` leaves it bare. .background { if let barTint { barTint.color.opacity(barTint.alpha) diff --git a/supacode/Features/Terminal/Views/WorktreeTerminalTabsView.swift b/supacode/Features/Terminal/Views/WorktreeTerminalTabsView.swift index 4e5bcc95..1d0de786 100644 --- a/supacode/Features/Terminal/Views/WorktreeTerminalTabsView.swift +++ b/supacode/Features/Terminal/Views/WorktreeTerminalTabsView.swift @@ -17,8 +17,11 @@ struct WorktreeTerminalTabsView: View { var body: some View { let state = manager.state(for: worktree) { shouldRunSetupScript } let _ = configReloadCounter - // 4pt gap between the tab bar and the terminal surface below it. - VStack(spacing: 4) { + // The gap between the tab bar and the terminal surface lives inside the + // tab bar (`TerminalTabBarMetrics.barBottomGap`) so the chrome tint band + // fills it, rather than a transparent VStack seam that reveals the + // translucent window background when `background-opacity` < 1. + VStack(spacing: 0) { tabBar(state: state) tabContent(state: state) }