Repository navigation
Tahoe 26 Liquid Glass: hide tab bar when tabBarHeight is 0; fix split divider position - #95
rodchristiansen wants to merge 2 commits into
Conversation
The animated code path hardcoded 0.5 for both the animation target and the completion handler, overriding whatever ratio splitState.dividerPosition was set to. Use the configured position instead.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 59 minutes and 9 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Greptile SummaryThis PR delivers two fixes for the macOS 26 Liquid Glass integration: the tab bar in Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[PaneContainerView.body] --> B{tabBarHeight > 0\nOR tabs.count > 1?}
B -- Yes --> C[Render TabBarView\n+showSplitButtons]
B -- No\ntabBarHeight==0 AND count ≤ 1 --> D[Tab bar hidden]
C --> E[contentAreaWithDropZones]
D --> E
F[syncPosition called] --> G{isAnimating / isSyncing\n/ depth > 0?}
G -- Yes --> X[return]
G -- No --> H{arrangedSubviews < 2\nOR availableSize == 0?}
H -- Yes --> X
H -- No --> I[clamp statePosition]
I --> J[read currentNormalized\nfrom live subview frame]
J --> K{both within 0.01\nof lastAppliedPosition?}
K -- Yes --> X
K -- No --> L[setPositionSafely\nupdate lastAppliedPosition]
Reviews (1): Last reviewed commit: "Hide tab bar when tabBarHeight is 0, sho..." | Re-trigger Greptile |
| isFocused: isFocused, | ||
| showSplitButtons: showSplitButtons | ||
| ) | ||
| // Tab bar: hidden when tabBarHeight is 0 AND only one tab in pane |
There was a problem hiding this comment.
Comment says "only one tab" but condition covers zero tabs
The inline comment says the tab bar is hidden "when tabBarHeight is 0 AND only one tab in pane," but the guard pane.tabs.count > 1 also suppresses the tab bar when count == 0. That's almost certainly the right call (no point showing an empty tab bar), but the comment is misleading. Consider:
| // Tab bar: hidden when tabBarHeight is 0 AND only one tab in pane | |
| // Tab bar: hidden when tabBarHeight is 0 AND pane has 0 or 1 tabs |
There was a problem hiding this comment.
Pull request overview
This PR adjusts Bonsplit’s split-view and pane chrome behavior to better support the macOS 26 “Liquid Glass” companion integration in cmux—preserving configured divider positions on entry and conditionally hiding the tab bar for single-tab panes when configured.
Changes:
- Use the configured
splitState.dividerPositionduring split entry animation instead of forcing a 0.5 default. - Conditionally render
TabBarViewwhentabBarHeight == 0only if the pane has 2+ tabs (otherwise hide it).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
Sources/Bonsplit/Internal/Views/SplitContainerView.swift |
Fixes entry animation to respect the persisted/configured divider ratio and keeps coordinator state in sync. |
Sources/Bonsplit/Internal/Views/PaneContainerView.swift |
Hides the tab bar for single-tab panes when appearance.tabBarHeight == 0, showing it again once multiple tabs exist. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Tab bar: hidden when tabBarHeight is 0 AND only one tab in pane | ||
| if bonsplitController.configuration.appearance.tabBarHeight > 0 || pane.tabs.count > 1 { | ||
| TabBarView( | ||
| pane: pane, | ||
| isFocused: isFocused, | ||
| showSplitButtons: showSplitButtons | ||
| ) | ||
| } |
There was a problem hiding this comment.
tabBarHeight is documented as a height setting, but here it’s effectively being used as a boolean/sentinel to control tab bar visibility (and TabBarView uses a fixed TabBarMetrics.barHeight). This makes tabBarHeight = 0 mean “auto-hide on single tab” rather than “0pt height”, which is surprising for API consumers. Consider introducing an explicit appearance option for tab bar visibility (e.g., enum/flag like tabBarVisibility: .always/.auto/.hidden) and/or updating the configuration API/docs to match the actual behavior.
Companion to cmux #2647 (Adopt macOS 26 Liquid Glass design). cmux #2647 pins to this bonsplit SHA; merging here lets it bump pointer back to manaflow-ai/bonsplit#main.
Summary
setDividerPosition, visible when restoring a split from saved stateTest plan
tabBarHeight = 0, single-tab pane shows no tab bar; opening a second tab in that pane restores the tab bartabBarHeight) still shows the tab bar as beforeSummary by cubic
Implements macOS 26 Liquid Glass behavior by hiding the tab bar when
tabBarHeightis 0 and only one tab is present. Fixes split divider to honor the configured position during animations and on restore.New Features
tabBarHeight = 0and the pane has a single tab; show it once there are 2+ tabs.Bug Fixes
splitState.dividerPositioninstead of a hardcoded 0.5, so restored layouts and animated inserts land at the correct position.Written for commit cfff8a9. Summary will update on new commits.