Skip to content

fix(search): bring the tab bar back after a predictive back from Search - #1855

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/search-predictive-back-tab-bar
Oct 26, 2026
Merged

bmc08gt merged 1 commit into
code/cashfrom
fix/search-predictive-back-tab-bar

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

A predictive back from Search lands on the tab home with no tab bar.

Search hands the bar's pill and search button over to its field through SearchMorph.fraction. When Search leaves without closing through the morph, as a committed back does, Publish()'s DisposableEffect resets the morph with scope?.launch { fraction.snapTo(0f) }. scope is the Search entry's rememberCoroutineScope, which is cancelled as that entry leaves composition, so the launched reset never runs. fraction stays where the last seek frame left it, and the bar's chrome stays hidden.

The reset now launches on rootScope, which outlives the entry and which the ✕ close path already uses for its shrink.

On a Pixel 7a API 36 emulator, a back gesture from Search left Chat without its tab bar on a build without this change, and with the tab bar on a build with it.

A predictive back from Search left Chat without its tab bar. When Search
left without closing through the morph, its DisposableEffect reset the
morph with a launch on Search's own rememberCoroutineScope. That scope is
cancelled as the entry leaves composition, so the reset never ran and
SearchMorph.fraction stayed where the gesture left it, keeping the bar's
pill and search button hidden.

Launch the reset on rootScope, which ✕ already uses for its shrink.
@bmc08gt bmc08gt self-assigned this Oct 26, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Oct 26, 2026
@bmc08gt
bmc08gt merged commit f405a48 into code/cash Oct 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant