Give every tab its own navigation stack and a floating glass tab bar - #120
Open
AndrewG828 wants to merge 1 commit into
Conversation
Home / Explore / Sell / Messages / Profile, five tabs where there were three, each with an independent navigation history. The single app-wide `NavigationStack` meant pushing a listing from Home and then switching to Messages left the listing on screen — there was one path and every tab shared it. `Router` now holds one path per tab and exposes the active one through the same `path` property, so `push`/`pop`/`popToRoot` and all their call sites are unchanged. `Router.Tab` names the slots, because the indices appear in the tab bar, the stack container and two unrelated screens. The container is hand-rolled rather than a `TabView`. The system bar kept drawing underneath the custom one and showed through the glass as a second outline. Every stack stays mounted and is toggled by opacity so tab state survives switching; the inactive ones are hidden from accessibility and hit testing. Fixes that come with the tab-count change: - `ProductDetailsView` sent you to `selection = 2` when you tapped your own name on a listing. Slot 2 is now Sell, not Profile; both call sites use `Router.Tab` instead of a literal. - `showsTabBar` reacts to the route rather than to `MessagesView.onDisappear`, which fires after the pop animation and left the bar missing for a beat. - Bottom content inset is always in the tree, just zero-height when the bar is hidden. Adding and removing the `safeAreaInset` broke scroll insets after a push and often failed to restore them on pop. - The `.reviewTesting` destination pointed at a view deleted from main; the branch it came from still referenced it and did not compile. The conversation toolbar picks up a Lucide calendar icon, which is what adds `lucide-icons-swift` to the project (Profile and Availability use two more of its glyphs in later commits). Four glyphs is a thin reason for a dependency — worth revisiting if we don't reach for more of it. Its status dot is drawn only when there actually is a confirmed meeting; unconditionally is how it started, which made a badge that told you nothing and lost the hint explaining why the button refuses to open the picker. `TabViewIcon` is removed: it drew the old three-icon bar and has no other caller. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017R8mua9xepzF3mnRETtd6W
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Home / Explore / Sell / Messages / Profile, five tabs where there were three,
each with an independent navigation history.
The single app-wide
NavigationStackmeant pushing a listing from Home andthen switching to Messages left the listing on screen — there was one path and
every tab shared it.
Routernow holds one path per tab and exposes the activeone through the same
pathproperty, sopush/pop/popToRootand all theircall sites are unchanged.
Router.Tabnames the slots, because the indicesappear in the tab bar, the stack container and two unrelated screens.
The container is hand-rolled rather than a
TabView. The system bar keptdrawing underneath the custom one and showed through the glass as a second
outline. Every stack stays mounted and is toggled by opacity so tab state
survives switching; the inactive ones are hidden from accessibility and hit
testing.
Fixes that come with the tab-count change:
ProductDetailsViewsent you toselection = 2when you tapped your ownname on a listing. Slot 2 is now Sell, not Profile; both call sites use
Router.Tabinstead of a literal.showsTabBarreacts to the route rather than toMessagesView.onDisappear,which fires after the pop animation and left the bar missing for a beat.
hidden. Adding and removing the
safeAreaInsetbroke scroll insets after apush and often failed to restore them on pop.
.reviewTestingdestination pointed at a view deleted from main; thebranch it came from still referenced it and did not compile.
The conversation toolbar picks up a Lucide calendar icon, which is what adds
lucide-icons-swiftto the project (Profile and Availability use two more ofits glyphs in later commits). Four glyphs is a thin reason for a dependency —
worth revisiting if we don't reach for more of it. Its status dot is drawn only
when there actually is a confirmed meeting; unconditionally is how it started,
which made a badge that told you nothing and lost the hint explaining why the
button refuses to open the picker.
TabViewIconis removed: it drew the old three-icon bar and has no othercaller.
Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_017R8mua9xepzF3mnRETtd6W