Skip to content

fix(chat): return to the chat list from a chat opened by handle - #811

Merged
bmc08gt merged 1 commit into
mainfrom
fix/username-lookup-back-nav
Sep 21, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
fix/username-lookup-back-nav

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 21, 2026

Copy link
Copy Markdown
Collaborator

Finding someone by their username and landing in their chat left the username field under the chat, so Back went back to the field rather than to the chat list.

The lookup screen already handles this: once it pushes the chat, it rewrites the tips stack to hold that chat alone. The rewrite was guarded on the stack being two deep, which is what it was in #661, when the lookup was pushed straight off the chat list. #790 put the New Chat picker in between, so the chat lands three deep, the guard never matches, and the rewrite is skipped.

The guard now measures the stack before the push instead of assuming its depth, so it tracks whatever route reaches the screen. Everything else about the hand-off is unchanged, including the 150ms delay that hides the chat's remount behind the push transition.

Two tests in UsernameLookupRoutingTests cover the back stack: one pins that the route in has no fixed depth, and one that the rewrite leaves the chat at the root of the stack.

The username lookup replaces its route with the chat it pushes, so Back
from that chat lands on the chat list rather than on the field that
found the person. It guarded that rewrite on the tips stack being two
deep, which is what it was in #661, when the lookup was pushed straight
off the list.

#790 put the New Chat picker in between. The chat now lands three deep,
the guard never matches, and the rewrite is skipped — so Back goes to
the username field.

Measure the stack before the push instead of assuming its depth, so the
guard tracks whatever route reaches this screen.
@bmc08gt bmc08gt self-assigned this Sep 21, 2026
@bmc08gt
bmc08gt merged commit 664a491 into main Sep 21, 2026
1 check passed
@bmc08gt
bmc08gt deleted the fix/username-lookup-back-nav branch October 5, 2026 15:15
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