Skip to content

fix(nav): back closes thread, tutorial deep link survives hydration, group LEAVE cleanup#107

Merged
epicexcelsior merged 3 commits into
anonmesh:stagingfrom
epicexcelsior:night3/nav-fixes
Jun 13, 2026
Merged

fix(nav): back closes thread, tutorial deep link survives hydration, group LEAVE cleanup#107
epicexcelsior merged 3 commits into
anonmesh:stagingfrom
epicexcelsior:night3/nav-fixes

Conversation

@epicexcelsior

Copy link
Copy Markdown
Collaborator

What

Three daily-use navigation paper cuts.

  • Hardware back closes the open thread instead of exiting the app.
  • The tutorial deep link survives onboarding hydration (focus gate) instead of being dropped.
  • Leaving a group hides the rest strip (latent issue — the strip was always painted behind transparent rows).

Scope

closeThread hook, (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.

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.
@epicexcelsior epicexcelsior merged commit 7db2aab into anonmesh:staging Jun 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant