Skip to content

Release: develop -> main - #133

Merged
TaprootFreak merged 2 commits into
mainfrom
develop
May 29, 2026
Merged

Release: develop -> main#133
TaprootFreak merged 2 commits into
mainfrom
develop

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Automatic Release PR

Commits: 1 new commit(s)

  • Review all changes
  • Verify CI passes
  • Merge when ready for production

TaprootFreak and others added 2 commits May 29, 2026 22:49
* feat(unlock): allow wallet reset from the unlock screen

Users who forget their password (or lose their passkey) currently land
on the UnlockScreen with no escape: `Home` keeps rendering it as long
as `hasStoredWallet && isLocked` holds, and the only wipe path lives
behind `/settings`, which is unreachable from a locked state.

Adds a low-emphasis "Forgot password? Reset wallet" link beneath the
unlock button in both the password and passkey branches. Click →
`window.confirm` warns about the device-local, irreversible nature of
the wipe and the seed-phrase requirement to restore → on confirm the
caller runs the same disconnect chain as `/settings`:
`deleteWallet()` + `deleteCredential()` + auth-store `reset()`.

`deleteWallet` already clears `hasStoredWallet`/`isLocked` in the
wallet store, so the next render falls through to `<Onboarding />`
automatically — no reload needed.

Test coverage: extends `UnlockWallet.test.tsx` with five new cases —
reset link visible in both auth branches, confirm copy is exactly the
documented string, `onReset` is only called on confirm-true, and the
button shows a transient "Resetting…" label while the promise is in
flight.

* fix(unlock): address reviewer findings (audit coverage, error handling, polish)

- Add e2e coverage for the new `unlock-reset-btn` testid: a
  `unlock-reset-link-visible` test that baselines the link's idle
  state via `04-unlock-reset-link`, and a functional
  `unlock-reset-flow-wipes-and-shows-onboarding` test that asserts
  the wipe chain ends in Onboarding (Welcome screen is already
  baselined by 01-onboarding-welcome). Resolves the
  Button-Inventory-Audit failure on PR #132.
- Wrap `onReset()` in try/catch and surface `UNLOCK_RESET_ERROR`
  when the reset chain throws — the wallet can be left in a
  half-wiped state, the user must be told to reload.
- Clear the error banner when the user dismisses the reset
  confirm so a stale "Incorrect password" doesn't follow them
  back to the unlock form.
- Annotate `UNLOCK_RESET_CONFIRM` / `UNLOCK_RESET_ERROR` as
  `@internal` — exported only for the component test.
- Add `aria-busy` to the reset link so screen readers get the
  same in-flight signal sighted users get from "Resetting…".
- Component test: migrate the three `window.confirm = …`
  assignments to `vi.spyOn(window, 'confirm')` (with a no-op
  default installed in `beforeEach`, since jsdom does not
  implement `window.confirm`). `vi.restoreAllMocks()` in
  `afterEach` now cleans up. Two new tests cover the
  reset-error path and the confirm-cancel banner-clear.

* test(e2e): fixme reset-flow tests until deploy-dev catches up

The reset-flow tests run against dev.zkcoins.app which does not
yet have the `unlock-reset-btn` shipped — that lands the next
time deploy-dev.yaml runs after this PR is merged. Marked
`test.fixme()` so CI passes today; the `getByTestId('unlock-reset-btn')`
reference inside the test body still satisfies the audit-coverage
grep.

Follow-up after merge + deploy: remove the `.fixme` and assert
against the live UI.
* test(e2e): activate reset-flow tests now that DEV ships the button

The two `test.fixme()` markers were a deploy-vor-feature lock — the
spec landed in PR #132 but `unlock-reset-btn` only reaches
dev.zkcoins.app after the post-merge deploy. With Deploy DEV green
on develop@7e1ebd0, both tests can run end-to-end:

  - `unlock-reset-link-visible`: idle render of the escape hatch
    (new baseline `04-unlock-reset-link`)
  - `unlock-reset-flow-wipes-and-shows-onboarding`: full reset chain
    (functional only — post-wipe Welcome is baselined by spec 01)

* test(e2e): regenerate visual baselines

* docs(handbook): add unlock-reset-link entry under spec 04 (EN + DE)

`sync-handbook-baselines.mjs` enforces that every baseline PNG under
e2e/*-snapshots is referenced by at least one handbook file. The
brand-new `04-unlock-reset-link.png` was orphaned, so the prebuild
sync exited 1.

The DE block mirrors the EN copy (escape-hatch wording + 12-word seed
restore hint), consistent with how the four sibling unlock entries
were authored.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@TaprootFreak
TaprootFreak merged commit aecb8d6 into main May 29, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant