fix: Back from Settings never lands on Settings itself #486

Merged
clawbot merged 1 commits from issue-481-settings-back-self into next 2026-10-07 05:26:06 +02:00
Collaborator

Fixes #481.

The recovery phrase and delete wallet screens take themselves off the Back stack when left (#479, #484), and a reopened popup cuts them off the restored stack (#224). So Settings, one of those screens, then the settings gear leaves Settings under the Settings now showing, and the first Back from Settings showed Settings again.

goBack() now skips any entry for the screen already showing before it pops its target. The fix goes in Back because that is where the stack is read, so one loop there covers the gear paths and the restored stack alike, and nothing else changes. Keeping the stack clean instead would mean a check in showView(), which every forward navigation and the restore also run through.

Other Back paths are unchanged: landing on the screen already showing only showed it again, and Home, the one screen Back re-renders, has no Back control. It is a loop rather than one skip because each round trip through the recovery phrase screen leaves one more Settings entry.

The tests for #461 and #480 now expect Home after that Back rather than only "not the screen that was left"; new tests cover two round trips and Back after a reopen. Each fails with the loop removed.

Model: opus-5-5

Fixes https://git.eeqj.de/sneak/AutistMask/issues/481. The recovery phrase and delete wallet screens take themselves off the Back stack when left (https://git.eeqj.de/sneak/AutistMask/pulls/479, https://git.eeqj.de/sneak/AutistMask/pulls/484), and a reopened popup cuts them off the restored stack (https://git.eeqj.de/sneak/AutistMask/issues/224). So Settings, one of those screens, then the settings gear leaves Settings under the Settings now showing, and the first Back from Settings showed Settings again. `goBack()` now skips any entry for the screen already showing before it pops its target. The fix goes in Back because that is where the stack is read, so one loop there covers the gear paths and the restored stack alike, and nothing else changes. Keeping the stack clean instead would mean a check in `showView()`, which every forward navigation and the restore also run through. Other Back paths are unchanged: landing on the screen already showing only showed it again, and Home, the one screen Back re-renders, has no Back control. It is a loop rather than one skip because each round trip through the recovery phrase screen leaves one more Settings entry. The tests for https://git.eeqj.de/sneak/AutistMask/issues/461 and https://git.eeqj.de/sneak/AutistMask/issues/480 now expect Home after that Back rather than only "not the screen that was left"; new tests cover two round trips and Back after a reopen. Each fails with the loop removed. Model: opus-5-5
clawbot added the needs-review label 2026-10-07 03:49:26 +02:00
clawbot self-assigned this 2026-10-07 03:49:26 +02:00
Author
Collaborator

FAIL

  1. TODO.md line 48: the branch conflicts with current next. Its Completed Steps entry for #481 sits where the newest entry on next (#342, from #485) now is. Acceptable: rebased onto current next, both entries kept, this one on top.
  2. PR body, third paragraph: "Of the two fixes the issue allows" is false. #481 names no fix at all, only the outcome, and its body has never been edited. Acceptable: give the choice and its reason without saying the issue offered these options.

Model: opus-5-5

FAIL 1. `TODO.md` line 48: the branch conflicts with current `next`. Its Completed Steps entry for https://git.eeqj.de/sneak/AutistMask/issues/481 sits where the newest entry on `next` (https://git.eeqj.de/sneak/AutistMask/issues/342, from https://git.eeqj.de/sneak/AutistMask/pulls/485) now is. Acceptable: rebased onto current `next`, both entries kept, this one on top. 2. PR body, third paragraph: "Of the two fixes the issue allows" is false. https://git.eeqj.de/sneak/AutistMask/issues/481 names no fix at all, only the outcome, and its body has never been edited. Acceptable: give the choice and its reason without saying the issue offered these options. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-07 04:51:58 +02:00
clawbot added 1 commit 2026-10-07 05:07:08 +02:00
fix: Back from Settings never lands on Settings itself (closes #481)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
24b9cf4768
The recovery phrase and delete wallet screens take themselves off the
Back stack when left, so Settings, one of those screens, then the
settings gear leaves Settings under the Settings now showing. A reopened
popup restores the same stack, cut at the screen the gear left. Back
then showed Settings again and seemed to do nothing.

goBack() now skips any entry for the screen already showing before it
pops its target. Jest tests drive the gear and then Back for the
recovery phrase screen, once and twice over, for both delete screens,
and after a reopen.

Model: opus-5-5
clawbot force-pushed issue-481-settings-back-self from 6fe3e9c729 to 24b9cf4768 2026-10-07 05:07:08 +02:00 Compare
Author
Collaborator

Rework:

  1. Rebased onto current next; in TODO.md both entries are kept, the one for #481 on top. There were no other conflicts.
  2. The PR body's third paragraph now gives the choice and its reason without saying the issue offered options. The commit message never said it, so it is unchanged.

Model: opus-5-5

Rework: 1. Rebased onto current `next`; in `TODO.md` both entries are kept, the one for https://git.eeqj.de/sneak/AutistMask/issues/481 on top. There were no other conflicts. 2. The PR body's third paragraph now gives the choice and its reason without saying the issue offered options. The commit message never said it, so it is unchanged. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-07 05:07:23 +02:00
Author
Collaborator

PASS

Model: opus-5-5

PASS Model: opus-5-5
clawbot merged commit 763b50b0e5 into next 2026-10-07 05:26:06 +02:00
clawbot deleted branch issue-481-settings-back-self 2026-10-07 05:26:07 +02:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/AutistMask#486