tui: wallet selection screen (F6 -> w) with create as the last row
All checks were successful
ci / test (pull_request) Successful in 5m58s
android-ci / android (pull_request) Successful in 12m2s
ci / sdk (pull_request) Successful in 1m28s
ci / fuzz (pull_request) Successful in 4m46s

Screen::WalletSelect: a table of saved wallets — name, identity prefix,
locator prefix, creation day — the selected row's full identity and locator
under it, and a `+ create new wallet` row as the last item. j/k or arrows
move, Enter takes the choice, Esc back. Empty, failed and in-flight reads
each get their own copy; a wallet with a NULL label, no published locator or
no usable timestamp reads `(unlabelled)` / `-` / `unknown` rather than blank.

Presentation only. Rows are plain display data (WalletRow) built by the
caller; the render path never reads the store, and the selection is by row
index because two records may share an identity key. Loading a chosen record
into the session is the wallet-store integration step, so the F6 `w` entry
opens the screen on its unavailable state until that accessor lands, and the
create row works today either way.

Evidence: tests/tui_select.rs (16 tests) drives the real draw path through
TestBackend at 80x24, 120x40 and 200x60, pins the dumped frame's footer to
status_footer_phased(..., wallet_select_footer_hint()), asserts exactly one
focus marker, a cell-width line budget from 20 to 200 columns, the window
disclosure with the create row always visible, hostile labels (ESC/BEL/C1/
bidi/newline/tab) and the crate-local UTC date formatter.
This commit is contained in:
agent 2026-09-21 10:41:53 -04:00
commit 99a4ab640e
No known key found for this signature in database
3 changed files with 1095 additions and 2 deletions

View file

@ -23,6 +23,7 @@ ASCII chrome.
| `Profile` | `/profile` | Edit name, bio, optional Monero address |
| `ConfirmKeys` / `Passphrase` | `/backup`, `/restore` | Type `BACKUP`/`RESTORE`, then passphrase |
| `Wallet` | `F6` | Receive QR, balance, transfers, child, chain source |
| `WalletSelect` | `F6` `w` | Saved wallets, pick one or create one |
| `WalletSetup` | `F6` `c` / `i`, or `/wallet create` / `import` | Spend warning, seed, import |
| `WalletsSettings` | `F9` or `/settings` | Discovery menu (does not replace F-keys) |
| `PeerPayments` | F9 then `p` | Peer-scoped `/pay` / `/tip` history |
@ -109,12 +110,13 @@ Pane-specific (`pane_footer_hints`):
Footer:
```
c create i import r qr s/x child 1 pruned 2 full 3 testnet Esc back ? help
c create i import r qr w wallets s/x child 1 pruned 2 full 3 testnet Esc back ? help
```
| Key | Effect |
|---|---|
| `r` or Enter | Toggle receive-address QR |
| `w` | Saved wallets (`WalletSelect`) |
| `c` | Create wallet (`SPEND` then seed once, type `SEEN`) |
| `i` | Import 25-word seed |
| `s` | Start app-owned wallet child |
@ -133,6 +135,24 @@ feature name.
Create/import require the wallet RPC started with `--wallet-dir`. Filename:
`onionwire`. Seed is never collected on the composer.
## Saved wallets (`F6` then `w`)
`WalletSelect`. One row per persisted wallet — name, identity prefix, locator
prefix, creation day — plus the selected row's full identity and locator under
the table. `j`/`k` or arrows select, Enter opens the selection, Esc back to
Main. Footer: `Esc back j k select Enter open ? help`.
The last item is **not** a wallet: `+ create new wallet` starts the same create
flow as `F6` `c`, so an empty list still has a way forward. An unlabelled wallet
(`NULL` in the store) reads `(unlabelled)`; a wallet whose onion service is not
published yet reads `-`; an unknown creation time reads `unknown`. A read that
failed is named on the screen — that is a different state from `no saved wallets
yet`, and the two never share copy.
Rows are plain display data (`WalletRow`), built by the caller from
`Store::list_wallets`; the render path never reads the store. Selection is by
row index, not by identity key (two records may share one).
## Wallets & settings (`F9` / `/settings`)
Discovery layer, not a replacement. Function keys stay live on this screen.
@ -180,4 +200,5 @@ Floor **80×24**. Target **120×40**. Frame dumps:
```
cargo test --locked --test tui_spec -- --nocapture dump_spec_frames
cargo test --locked --test tui_spec -- --nocapture wallets_settings_menu_frame_dumps
cargo test --locked --test tui_select -- --nocapture wallet_select_frame_dumps
```