Skip to content

stack/getpaid 2 55 nostr keys ux - #223

Draft
BullishNode wants to merge 7 commits into
stack/getpaid-2-54-various-fixesfrom
stack/getpaid-2-55-nostr-keys-ux
Draft

stack/getpaid 2 55 nostr keys ux#223
BullishNode wants to merge 7 commits into
stack/getpaid-2-54-various-fixesfrom
stack/getpaid-2-55-nostr-keys-ux

Conversation

@BullishNode

Copy link
Copy Markdown
Owner

Stack created with GitHub Stacks CLIGive Feedback 💬

…guards

Batch N1 of the Nostr-keys redesign (model layer; screens follow in N2):

- description: optional user-authored context on Nostr key materializations,
  end to end — entity validation (trim, empty=>null, 200 chars, no control
  chars), folded into schema v19 in place (unreleased schema, zero users; no
  new migration), repository updateNostrKeyMetadata writing purpose and
  description as one editable unit, manifest-file round-trip that omits null
  (preserves byte-exact canonical re-encode of legacy backups) and parses
  absent/null tolerantly, carried through import, merge conflict detection,
  and recovery without path reallocation
- classification: KeychainManifestNostrKeyDisplay resolves system kinds via
  the bip85 registry by exact path (metadata backup, bullnym auth, nip05
  verification) plus a defensive obsolete kind for the retired
  wallet_metadata_signing_key legacy rows
- filter: GetDefaultWalletNostrKeysUsecase excludes obsolete records from
  listings; backup/recovery inventory deliberately unfiltered
- guards (ported from paused work): reserved-key purpose/description
  mutation rejected in the update usecase below the widget layer; create
  dialog controller lifetime fix; nsec dialog owns screen-capture privacy
- facade: createUserNostrKey/updateNostrKey gain description; cubit plumbed
  so N2 can wire the UI without domain changes

Gates: dart analyze --fatal-infos clean; 445 tests green (keychain_manifest,
keychain_recovery, wallet_backup, migrations, core nostr).
Batch N2 of the Nostr-keys redesign — the screens, built entirely on the
app's established components (no invented UI, no FAB/raw dialogs):

- list: SettingsEntryItem rows showing names only; system keys hidden by
  default behind a muted, warning-gated footer affordance and rendered
  subdued below user keys when revealed; AppBar create action (invoices
  list convention)
- create/edit: one BBInputText form for Name (purpose, 80) + optional
  Description (200), validation via cubit error idiom, path allocation
  automatic and invisible
- detail: DetailsTable with Name, Description, Derivation path, and npub
  only (bech32 encoder added beside the nsec encoder with an independently
  re-derived NIP-19 test vector; hex never rendered anywhere) — user keys
  get AddressViewer copy+QR and an Edit action; system keys hide the npub
  behind the exact troubleshooting warning, get no QR and no edit
- nsec: derived on demand, revealed through the blurred warning-gated
  privacy dialog, cleared on close/background/copy; system keys use the
  exact emergency-recovery warning text
- labels resolve from the registry classification, never stored purpose
  text; 28 new EN arb keys

Gates: analyze --fatal-infos clean; 486 tests green (+41: encoder, cubit,
list/detail/form widget suites mounted through the real route table).
…review

- create action moves from an AppBar icon to a footer 'Create nostr key'
  BBButton.big (primary-action convention); a test pins Icons.add out
- 'Show system keys' restyled to the shared Advanced-Settings construction
  (centered TextButton in the error color); style pinned by test
- nsec reveal actually shows the nsec: WarningBottomSheet pops the top
  route after onConfirm, so pushing the reveal dialog inside onConfirm got
  the dialog closed before its first frame. Confirm now sets a flag; the
  dialog is pushed after the sheet settles. Covered by reveal/dismiss tests
  with the privacy channel stubbed.

Gates: analyze --fatal-infos clean; 491 tests green.
System keys render owner-approved localized role descriptions in the
Description row (metadata backup / Bullnym auth / dormant NIP-05) — UI copy
keyed off the registry classification, never stored data; a reserved row's
stored purpose/description can never surface. User keys keep their own
stored words; the row still omits when absent.
The nsec reveal now uses the same AddressViewer presentation as the npub
row — truncated value, tap for the full value, and a QR — so a key's
secret and public forms are read identically. The difference stays where
it belongs: the warning gate in front of the dialog, plus the existing
screen-capture privacy and clear-on-close/background/copy rules.
Tapping the revealed nsec opens the shared full-value/QR view, which
carries its own copy control, so the dialog's separate copy button was a
second way to do the same thing. Close is the only action left; the test
now pins the single in-dialog AddressViewer and the absence of the button.
The repo-wide CI format check flags this file; it slipped through a
touched-files-only format pass in an earlier batch.
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.

2 participants