fix: Back from Settings no longer lands on a secret screen left by the gear (closes #461)
check / check (push) Successful in 6m17s
e2e / e2e-chrome (push) Successful in 5m22s
e2e / e2e-firefox (push) Successful in 2m20s

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 for both screens, and
leavePrivkeyScreen() in the e2e suite expects the address screen.

Model: opus-5-5
This commit is contained in:
2026-10-06 17:53:12 +00:00
parent cb23611a17
commit 978e8e49d8
7 changed files with 138 additions and 12 deletions
+3 -3
View File
@@ -1037,13 +1037,13 @@ async function revealPrivkey(page) {
}
// Leave the export screen, or the Settings screen the gear left it for, for
// Home. The gear put the export screen on the Back stack, so from Settings the
// way home passes through it, already emptied
// Home. Leaving takes the export screen off the Back stack, so from Settings
// Back goes to the address screen it was opened from
// (https://git.eeqj.de/sneak/AutistMask/issues/461).
async function leavePrivkeyScreen(page) {
if (await page.isVisible("#view-settings")) {
await page.click("#btn-settings-back");
await visible(page, "#view-export-privkey");
await visible(page, "#view-address");
}
if (await page.isVisible("#view-export-privkey")) {
await page.click("#btn-export-privkey-back");