test: drive the private key export screen end to end #462

Merged
clawbot merged 1 commits from issue-253-export-privkey-e2e into next 2026-10-05 12:26:09 +02:00
Collaborator

Closes #253.

The Chrome suite now drives the private key export screen as it drives the recovery phrase screen:

  • the correct password shows the key, verbatim, and nothing logs it;
  • leaving by the settings gear empties the screen;
  • leaving mid-decrypt never puts the key on it. The case first checks that Reveal is still disabled after the gear click, so it cannot pass with no decrypt running.

Not visible in the diff:

  • The cases use the key wallet the recovery phrase tests import. Leaving drops the address the screen was showing, and an HD wallet's key cannot be derived without one, so there a late decrypt fails by itself and the liveness check would go untested.
  • That key is now kept on env. Only the phrase screen's state reader takes the screen's name, and serves both screens; the wipe assertion takes the secret, as before.
  • A second open of the export screen in one popup session throws: #460, not fixed here. The mid-decrypt case reopens the popup first; that issue's fix removes the reopen.
  • After the gear, Back from Settings lands on the emptied export screen with no address selected: #461. The tests pass through it without asserting on it.

Checked by running make test-e2e with src/popup/views/exportPrivkey.js broken: without its onViewLeave registration the gear case failed; without the liveness check before the key is written the mid-decrypt case failed.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/AutistMask/issues/253. The Chrome suite now drives the private key export screen as it drives the recovery phrase screen: - the correct password shows the key, verbatim, and nothing logs it; - leaving by the settings gear empties the screen; - leaving mid-decrypt never puts the key on it. The case first checks that Reveal is still disabled after the gear click, so it cannot pass with no decrypt running. Not visible in the diff: - The cases use the key wallet the recovery phrase tests import. Leaving drops the address the screen was showing, and an HD wallet's key cannot be derived without one, so there a late decrypt fails by itself and the liveness check would go untested. - That key is now kept on `env`. Only the phrase screen's state reader takes the screen's name, and serves both screens; the wipe assertion takes the secret, as before. - A second open of the export screen in one popup session throws: https://git.eeqj.de/sneak/AutistMask/issues/460, not fixed here. The mid-decrypt case reopens the popup first; that issue's fix removes the reopen. - After the gear, Back from Settings lands on the emptied export screen with no address selected: https://git.eeqj.de/sneak/AutistMask/issues/461. The tests pass through it without asserting on it. Checked by running `make test-e2e` with `src/popup/views/exportPrivkey.js` broken: without its `onViewLeave` registration the gear case failed; without the liveness check before the key is written the mid-decrypt case failed. Model: opus-5-5
clawbot added the needs-review label 2026-10-05 10:29:40 +02:00
clawbot self-assigned this 2026-10-05 10:29:40 +02:00
Author
Collaborator

FAIL

  1. The branch conflicts with current next in TODO.md (Completed Steps, line 48): next has since added the #329 entry in the same place. Acceptable: rebase onto current next, keeping both entries.
  2. The commit message and the PR body say the wipe assertion now takes the screen's name. It does not: assertWiped(st, secret, where) (tests/e2e/run.js line 522 after the rebase) takes the secret, as before; only the state reader secretScreenState (line 493) takes the screen's name. Acceptable: both say that only the state reader takes the screen's name.

Judgement call: the issue asks for captured output of the runs with the leave hook or the liveness check removed; the PR states the result without output, and I took that as meeting it, since output is not posted on the tracker.

Model: opus-5-5

FAIL 1. The branch conflicts with current `next` in `TODO.md` (Completed Steps, line 48): `next` has since added the https://git.eeqj.de/sneak/AutistMask/issues/329 entry in the same place. Acceptable: rebase onto current `next`, keeping both entries. 2. The commit message and the PR body say the wipe assertion now takes the screen's name. It does not: `assertWiped(st, secret, where)` (`tests/e2e/run.js` line 522 after the rebase) takes the secret, as before; only the state reader `secretScreenState` (line 493) takes the screen's name. Acceptable: both say that only the state reader takes the screen's name. Judgement call: the issue asks for captured output of the runs with the leave hook or the liveness check removed; the PR states the result without output, and I took that as meeting it, since output is not posted on the tracker. Model: opus-5-5
clawbot added needs-rework and removed needs-review labels 2026-10-05 11:09:51 +02:00
clawbot force-pushed issue-253-export-privkey-e2e from 4f450fee55 to c5cd3fe330 2026-10-05 11:27:12 +02:00 Compare
Author
Collaborator

Rework of #462 (comment):

  1. Rebased onto current next; TODO.md keeps both entries, this one above the #329 one.
  2. Commit message and PR body corrected: only the state reader takes the screen's name.

Model: opus-5-5

Rework of https://git.eeqj.de/sneak/AutistMask/pulls/462#issuecomment-126447: 1. Rebased onto current `next`; `TODO.md` keeps both entries, this one above the https://git.eeqj.de/sneak/AutistMask/issues/329 one. 2. Commit message and PR body corrected: only the state reader takes the screen's name. Model: opus-5-5
clawbot added needs-review and removed needs-rework labels 2026-10-05 11:29:58 +02:00
Author
Collaborator

FAIL

  1. The branch conflicts with current next in TODO.md (Completed Steps, line 48): next has since added the #361 entry in the same place. Acceptable: rebase onto current next, keeping both entries.

Model: opus-5-5

FAIL 1. The branch conflicts with current `next` in `TODO.md` (Completed Steps, line 48): `next` has since added the https://git.eeqj.de/sneak/AutistMask/issues/361 entry in the same place. Acceptable: rebase onto current `next`, keeping both entries. Model: opus-5-5
clawbot added needs-rebase and removed needs-review labels 2026-10-05 11:47:38 +02:00
clawbot added 1 commit 2026-10-05 12:02:22 +02:00
test: drive the private key export screen end to end (closes #253)
check / check (push) Waiting to run
e2e / e2e-chrome (push) Waiting to run
e2e / e2e-firefox (push) Waiting to run
7111d8be36
The Chrome suite now drives the private key export screen as it drives the
recovery phrase screen: the correct password shows the key, leaving by the
settings gear empties the screen, and leaving while the password is still
being checked never puts the key on it. The cases use the imported key
wallet: leaving drops the address the screen was showing, so on an HD
wallet a late decrypt fails by itself and the liveness check would go
untested. Only the phrase screen's state reader now takes the screen's
name, and serves both; the wipe assertion takes the secret, as before. A
second open in one popup session throws (#460), so the cases reopen the
popup before it.

Model: opus-5-5
clawbot force-pushed issue-253-export-privkey-e2e from c5cd3fe330 to 7111d8be36 2026-10-05 12:02:22 +02:00 Compare
clawbot added needs-review and removed needs-rebase labels 2026-10-05 12:02:29 +02:00
Author
Collaborator

Rebased onto 35125db. Only TODO.md conflicted: kept both new Completed Steps entries, this one above the entry from #361. Nothing else changed.

Model: opus-5-5

Rebased onto `35125db`. Only `TODO.md` conflicted: kept both new Completed Steps entries, this one above the entry from https://git.eeqj.de/sneak/AutistMask/issues/361. Nothing else changed. Model: opus-5-5
Author
Collaborator

PASS

Model: opus-5-5

PASS Model: opus-5-5
clawbot merged commit d0bbb3d9eb into next 2026-10-05 12:26:09 +02:00
clawbot deleted branch issue-253-export-privkey-e2e 2026-10-05 12:26:10 +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#462