The passphrase is now chosen in a dedicated first-run step instead of as a side effect of adding the first key. A passphrase with no keys is stored as a NIP-49 verifier in keys.json; the first key afterwards only checks the passphrase, and storing it clears the verifier so a keyed vault keeps its original on-disk shape. Setup, Create and Import are HIG action dialogs that stay open on error and can never submit a too-short or mismatched passphrase.
This branch also folds in follow-ups from testing the flow:
The import dialog reveals the ncryptsec password only when an ncryptsec is pasted, directly under the key field, rather than always showing a field that is dead weight for an nsec/hex import.
A wrong ncryptsec password reports "Wrong ncryptsec password." instead of the raw aead::Error, and a wrong vault passphrase reports "Wrong vault passphrase." — short enough for the dialog toast.
The first-run "Set a passphrase" button is no longer stretched to the full width of the status page.
The passphrase is now chosen in a dedicated first-run step instead of as a side effect of adding the first key. A passphrase with no keys is stored as a NIP-49 `verifier` in `keys.json`; the first key afterwards only checks the passphrase, and storing it clears the verifier so a keyed vault keeps its original on-disk shape. Setup, Create and Import are HIG action dialogs that stay open on error and can never submit a too-short or mismatched passphrase.
This branch also folds in follow-ups from testing the flow:
- The import dialog reveals the `ncryptsec` password only when an `ncryptsec` is pasted, directly under the key field, rather than always showing a field that is dead weight for an `nsec`/hex import.
- A wrong `ncryptsec` password reports "Wrong ncryptsec password." instead of the raw `aead::Error`, and a wrong vault passphrase reports "Wrong vault passphrase." — short enough for the dialog toast.
- The first-run "Set a passphrase" button is no longer stretched to the full width of the status page.
The passphrase used to be set as a side effect of adding the first
identity key, in the same dialog. Split it into a first-run "Set up your
vault" step, so the first key afterwards only *checks* the passphrase,
and make the three forms HIG action dialogs that stay open on error.
A passphrase with no keys is now representable: keys.json gains an
optional NIP-49 `verifier` (a fixed 32-byte constant, so it round-trips
through EncryptedSecretKey). has_vault() accepts it, set_passphrase
writes it (only while keyless — that is also the "forgot it" reset, which
loses nothing), unlock and verify_passphrase check it, and add_user_key
clears it once a key is stored, so a keyed vault is byte-for-byte the old
shape. change_passphrase re-encrypts it too. A malformed verifier is
dropped on load rather than quarantining the file. The version stays 1:
serde ignores the unknown field, so an older Regent reads a
verifier-only vault as empty and its next add drops the verifier —
accepted, no keys were lost.
Setup/Create/Import are now plain AdwDialog action dialogs: the action
starts insensitive and is re-evaluated on every keystroke, which also
marks the offending row with libadwaita's `.error` class, so a too-short
or mismatched passphrase can never be submitted (no error dialog at all).
Only an unknowable error — a wrong vault passphrase — is shown, as a
toast inside the dialog, which stays open and keeps the input. Return
submits, the first field takes initial focus, and closing wipes the
fields (L5). An AdwAlertDialog cannot do this: it always closes when a
response is activated.
The Identities window is 460 wide so its dialogs present as centered
floating cards instead of sheets docked to the bottom edge (libadwaita
switches below 450px), and the dialog footer is equal-width buttons like
an alert dialog's response area.
An import of an `ncryptsec` with the wrong password surfaced the NIP-49
crypto failure verbatim — an opaque `aead::Error`. Translate it to
"Wrong ncryptsec password." by matching on the error kind, so an
unsupported or tampered `log_n` is not mislabelled as a wrong password.
Shorten the vault-passphrase error to "Wrong vault passphrase." as well:
the old sentence was too long for the dialog's toast.
Reveal the `ncryptsec` password only when the pasted string is one — it is
dead weight for an `nsec`/hex import — place it directly under the key
field, and let the dialog track its content so the revealed row is not
clipped. The submit branch now trims too, so the field and the branch
agree on what counts as an `ncryptsec`.
Also stop stretching the first-run "Set a passphrase" button to the full
width of the status page.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
The passphrase is now chosen in a dedicated first-run step instead of as a side effect of adding the first key. A passphrase with no keys is stored as a NIP-49
verifierinkeys.json; the first key afterwards only checks the passphrase, and storing it clears the verifier so a keyed vault keeps its original on-disk shape. Setup, Create and Import are HIG action dialogs that stay open on error and can never submit a too-short or mismatched passphrase.This branch also folds in follow-ups from testing the flow:
ncryptsecpassword only when anncryptsecis pasted, directly under the key field, rather than always showing a field that is dead weight for annsec/hex import.ncryptsecpassword reports "Wrong ncryptsec password." instead of the rawaead::Error, and a wrong vault passphrase reports "Wrong vault passphrase." — short enough for the dialog toast.