fix: Back from Settings no longer lands on a secret screen left by the settings gear #479

Merged
clawbot merged 1 commits from issue-461-secret-screen-back into next 2026-10-07 01:43:07 +02:00
Collaborator

Leaving the private key export screen or the recovery phrase screen drops the address or wallet it was showing. The settings gear had just pushed the screen onto the Back stack, so Back from Settings landed on a password prompt that could only answer "No address is selected." or "No wallet is selected."

Each screen's leave handler now also takes the screen off the top of the Back stack. A reopened popup already treats these screens this way (#224): they are dropped from the stack, and Back goes to what was under them. There is no new list of secret screens; each screen removes its own entry.

Outcome chosen: the screen it was opened from. Showing the same screen again, still able to reveal, would mean keeping the selection after leaving, and then checking that it still points at the same wallet and address.

  • Export screen: Back from Settings goes to the address screen.
  • Recovery phrase screen: it is opened from Settings, so after the gear the first Back from Settings stays on Settings and the second goes Home. A reopened popup does the same today.

tests/exportPrivkey.test.js and tests/showPhrase.test.js press the gear and then Back; both tests fail on next. leavePrivkeyScreen() in tests/e2e/run.js now expects the address screen after Settings. The README screen map gains the gear transition for both screens.

Judgement call: the recovery phrase case keeps the one Back press that stays on Settings, to match the reopen behaviour; removing it would change Back for every screen. Filed as #481.

Model: opus-5-5

Leaving the private key export screen or the recovery phrase screen drops the address or wallet it was showing. The settings gear had just pushed the screen onto the Back stack, so Back from Settings landed on a password prompt that could only answer "No address is selected." or "No wallet is selected." Each screen's leave handler now also takes the screen off the top of the Back stack. A reopened popup already treats these screens this way (https://git.eeqj.de/sneak/AutistMask/issues/224): they are dropped from the stack, and Back goes to what was under them. There is no new list of secret screens; each screen removes its own entry. Outcome chosen: the screen it was opened from. Showing the same screen again, still able to reveal, would mean keeping the selection after leaving, and then checking that it still points at the same wallet and address. - Export screen: Back from Settings goes to the address screen. - Recovery phrase screen: it is opened from Settings, so after the gear the first Back from Settings stays on Settings and the second goes Home. A reopened popup does the same today. `tests/exportPrivkey.test.js` and `tests/showPhrase.test.js` press the gear and then Back; both tests fail on `next`. `leavePrivkeyScreen()` in `tests/e2e/run.js` now expects the address screen after Settings. The README screen map gains the gear transition for both screens. Judgement call: the recovery phrase case keeps the one Back press that stays on Settings, to match the reopen behaviour; removing it would change Back for every screen. Filed as https://git.eeqj.de/sneak/AutistMask/issues/481. Model: opus-5-5
clawbot added the needs-review label 2026-10-06 21:39:48 +02:00
clawbot self-assigned this 2026-10-06 21:39:48 +02:00
Author
Collaborator

FAIL

  1. TODO.md line 48: the branch conflicts with current next, whose newest Completed Steps entry (#475) sits where this one goes. Acceptable: rebased onto current next, both entries kept, this one on top.
  2. src/popup/views/showPhrase.js line 145: no test covers the check that takes the recovery phrase screen off the Back stack only when it is on top. Without the check, leaving the screen by its own Back would also drop the screen under Settings, and no test would fail. The export screen has this test (its own Back button leaves the rest of the stack alone in tests/exportPrivkey.test.js). Acceptable: the same test for the recovery phrase screen in tests/showPhrase.test.js, failing when the check is removed.

Model: opus-5-5

FAIL 1. `TODO.md` line 48: the branch conflicts with current `next`, whose newest Completed Steps entry (https://git.eeqj.de/sneak/AutistMask/issues/475) sits where this one goes. Acceptable: rebased onto current `next`, both entries kept, this one on top. 2. `src/popup/views/showPhrase.js` line 145: no test covers the check that takes the recovery phrase screen off the Back stack only when it is on top. Without the check, leaving the screen by its own Back would also drop the screen under Settings, and no test would fail. The export screen has this test (`its own Back button leaves the rest of the stack alone` in `tests/exportPrivkey.test.js`). Acceptable: the same test for the recovery phrase screen in `tests/showPhrase.test.js`, failing when the check is removed. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-06 23:05:04 +02:00
clawbot force-pushed issue-461-secret-screen-back from 978e8e49d8 to eca2d15249 2026-10-06 23:10:47 +02:00 Compare
Author
Collaborator

Rework for #479 (comment):

  1. Rebased onto current next. TODO.md keeps both entries, this one above the one for #475.
  2. tests/showPhrase.test.js gains its own Back button leaves the rest of the stack alone: opened from Settings, its own Back must return to Settings with ["main"] still on the stack. To press the real button, its document stub now keeps each element's click handler, and the two tests share a small setup function. Checked: with the top-of-stack check removed from src/popup/views/showPhrase.js, this test fails.

Each check this PR adds to the two leave handlers, removed alone:

  • The top-of-stack check (stack popped unconditionally): its own Back button leaves the rest of the stack alone fails, in tests/exportPrivkey.test.js and in tests/showPhrase.test.js.
  • Removing the screen from the stack at all (the handler only wipes): goes to the address screen it was opened from in tests/exportPrivkey.test.js and does not land on the recovery phrase screen in tests/showPhrase.test.js fail.

None went uncaught, so no further test was needed.

Model: opus-5-5

Rework for https://git.eeqj.de/sneak/AutistMask/pulls/479#issuecomment-130509: 1. Rebased onto current `next`. `TODO.md` keeps both entries, this one above the one for https://git.eeqj.de/sneak/AutistMask/issues/475. 2. `tests/showPhrase.test.js` gains `its own Back button leaves the rest of the stack alone`: opened from Settings, its own Back must return to Settings with `["main"]` still on the stack. To press the real button, its document stub now keeps each element's click handler, and the two tests share a small setup function. Checked: with the top-of-stack check removed from `src/popup/views/showPhrase.js`, this test fails. Each check this PR adds to the two leave handlers, removed alone: - The top-of-stack check (stack popped unconditionally): `its own Back button leaves the rest of the stack alone` fails, in `tests/exportPrivkey.test.js` and in `tests/showPhrase.test.js`. - Removing the screen from the stack at all (the handler only wipes): `goes to the address screen it was opened from` in `tests/exportPrivkey.test.js` and `does not land on the recovery phrase screen` in `tests/showPhrase.test.js` fail. None went uncaught, so no further test was needed. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-06 23:33:18 +02:00
Author
Collaborator

FAIL

  1. TODO.md line 48: the branch conflicts with current next. #482 landed the Completed Steps entry for #458 where this one goes. Acceptable: rebased onto current next, both entries kept.

Model: opus-5-5

FAIL 1. `TODO.md` line 48: the branch conflicts with current `next`. https://git.eeqj.de/sneak/AutistMask/pulls/482 landed the Completed Steps entry for https://git.eeqj.de/sneak/AutistMask/issues/458 where this one goes. Acceptable: rebased onto current `next`, both entries kept. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-07 00:48:55 +02:00
clawbot added 1 commit 2026-10-07 01:14:46 +02:00
fix: Back from Settings no longer lands on a secret screen left by the gear (closes #461)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
0ad3a8a0a3
Leaving the private key export or recovery phrase screen drops the
selection it was showing, but the settings gear had just pushed the
screen onto the Back stack, so Back from Settings landed on a password
prompt that could only fail. Each screen's leave handler now also takes
it off the top of the stack, which is what a reopened popup already does
to these screens. Back from Settings goes to the address screen for the
export screen; for the recovery phrase screen, opened from Settings, it
stays on Settings once, as after a reopen.

Jest tests drive the gear and then Back, and each screen's own Back, for
both screens; leavePrivkeyScreen() in the e2e suite expects the address
screen.

Model: opus-5-5
clawbot force-pushed issue-461-secret-screen-back from eca2d15249 to 0ad3a8a0a3 2026-10-07 01:14:46 +02:00 Compare
Author
Collaborator

Rebased onto cd73024; only TODO.md conflicted (the #482 entry and this one, both at the top of Completed Steps), resolved by keeping both with this entry first; nothing else changed.

Model: opus-5-5

Rebased onto `cd73024`; only `TODO.md` conflicted (the https://git.eeqj.de/sneak/AutistMask/pulls/482 entry and this one, both at the top of Completed Steps), resolved by keeping both with this entry first; nothing else changed. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-07 01:14:49 +02:00
Author
Collaborator

PASS

Model: opus-5-5

PASS Model: opus-5-5
clawbot merged commit e865099c5b into next 2026-10-07 01:43:07 +02:00
clawbot deleted branch issue-461-secret-screen-back 2026-10-07 01:43: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#479