Skip to content

Drop the shop the Shops tab saved when the shopkeeper changes - #95

Merged
dadachi merged 1 commit into
mainfrom
fix/tab-state-across-sign-in
Oct 26, 2026
Merged

dadachi merged 1 commit into
mainfrom
fix/tab-state-across-sign-in

Conversation

@dadachi

@dadachi dadachi commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Found in MyTurnTag's 2.2.0 smoke test on a real device (MyTurnTagCreator-Android #164, same fix): after signing out and in, opening Settings and coming back to Shops brought back the previous shopkeeper's shop detail, answered 404. (No organization switching here.)

  • AuthRoutingEffect: off the signed-in screens, clearBackStack(ShopBaseRoute).

Cause: Navigation maps a non-inclusive popUpTo(start) { saveState = true } save to the start destination and its parents only when the key is not there yet, so the start tab's first saved stack stays and later saves do not replace it; replacing the back stack did not clear it.

  • Tests first in AuthRoutingTest (failed with the detail route on the stack before the fix; removing each clearBackStack line fails its test again).
  • Local CI: ./scripts/pre-push passed (spotless, lint, R8, unit tests). GitHub Actions does not start (account billing).
  • Clearing the other tabs in AuthRoutingEffect too was tried in MyTurnTag: it made the fix fail (clearing a route with nothing saved drops null-mapped keys), and a test showed a non-start tab does not bring back the old screen, so only the start tab's graph is cleared.

🤖 Generated with Claude Code

After signing out and in, the Shops tab brought back the shop detail it saved
when it was left: the previous shopkeeper's shop, answered 404. Navigation
keeps a saved back stack under the destination popped up to and does not
replace it on a later save, so AuthRoutingEffect clears the tab's saved screens
with the Shops graph off the signed-in screens.

Ported from MyTurnTagCreator-Android, where it was found on a real device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dadachi
dadachi merged commit 843d2de into main Oct 26, 2026
1 check passed
@dadachi
dadachi deleted the fix/tab-state-across-sign-in branch October 29, 2026 07:57
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