fix(nav): back closes thread, tutorial deep link survives hydration, group LEAVE cleanup#107
Merged
Merged
Conversation
A thread is MessagesScreen state (activePeerHex slides a chat panel over the list), not a route — so the (tabs) layout's unconditional back handler offered exit-app while a conversation was open, while the header arrow (goBack) worked. Bridge with the existing module-ref pattern (drawerState, activeConversation, messagesFocused): MessagesScreen exposes its animated close via closeThreadRef while a thread is open and clears it on close/unmount; the (tabs) back handler invokes it first and only when the Messages tab is focused, so a thread left open on the frozen tab can't swallow back presses from other tabs.
anonmesh://tutorial resolves correctly (verified on device: warm app on
Messages, backgrounded, and on onboarding all navigate). The breakage is
the cold/anchored path: unstable_settings.anchor mounts onboarding
BENEATH a deep-linked tutorial, and onboarding's wallet-hydration effect
then fires router.replace('/(tabs)') — replace targets the focused
route, so it kills the tutorial the user just deep-linked into. On a
device with a wallet + completed tutorial that reads as 'link does
nothing, app sits on Messages'.
Gate the auto-proceed on useIsFocused(): onboarding only self-navigates
while it is actually the focused route. Normal flows are unchanged
(cold start lands focused on onboarding; back-nav re-focuses it).
Boundary: on dev-client builds a cold deep link lands in the launcher
(and the launcher replays the LAST stored link on reconnect), so cold
replay can only be exercised on release builds.
Every group row showed its red LEAVE action with no swipe performed. The strip is an absolutely-positioned opaque red block behind the row, and the row's resting background is 'transparent' (activeBg falls back to transparent, design tokens pass kept it that way) — so tx=0 'closed' just parks a see-through cover over a fully painted strip. The shared value and gesture were never wrong; the strip was simply never hidden. Drive the strip's own opacity from tx (0 at rest → 1 within the first ~12px of swipe). Z-order already routes taps to the row when closed, so swipe, LEAVE tap, confirm sheet, and snap-back stay as they were. Device-verified: three group rows rest closed; swiping one reveals LEAVE for that row only; cancel snaps it closed.
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.
What
Three daily-use navigation paper cuts.
Scope
closeThreadhook,(tabs)/_layout, group leave handling.Test
tsc clean · tier0 config/services clean · fake-money + lint clean. Back/LEAVE root-caused; tutorial deep link verified on the final bundle in overnight3.