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

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
This commit was merged in pull request #479.
This commit is contained in:
2026-10-07 01:43:07 +02:00
parent cd730241bb
commit e865099c5b
7 changed files with 160 additions and 12 deletions
+3 -3
View File
@@ -1075,13 +1075,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");