onionwire/docs/tui-wallet-ux-review.md

1079 lines
59 KiB
Markdown
Raw Normal View History

# TUI wallet surfaces: presentation and flow review
Audit of the wallet screens as they render at `a1f5c878` (main). Report only —
no source file was changed by this review. Frames below are the real render
path unless the caption says RECONSTRUCTED; see **Method** and **Not examined**.
## Summary
The two wallet screens the user is most likely to reach first are the two that
do not render: a fresh install opens on the create-spend-wallet confirmation, and
pressing `F6` on that install exits the process with a one-line error. At the
width where wallets are actually named — `F6` then `w` — the flow is good: a
designed empty state, a designed failed-read state, fixed columns measured in
terminal cells, and the create row always last. Two structural faults account for
most of what is wrong here: `draw_wallet` gives its body pane `Constraint::Length(2)`
inside a full border (so the wallet data is never drawn at any width), and
`draw_text_overlay` pins every long body to its **tail** (so the SPEND warning,
the seed, the offset notice and the help overlay all lose their first lines).
Everything below the crash is copy and ordering, not architecture.
## Method
* Widths are terminal **cells**, via `onionwire::tui::cell_width` (`Span::width`,
`src/tui.rs:3895`) — never `chars().count()`. The dump helper asserts
`cells <= width` on every row of every frame below.
* Sizes: 80x24 (floor), 120x40 (target), 200x60. A frame is shown at each width
where the behaviour differs.
* The F6 wallet screen and the setup overlays are private (`draw_wallet`
`src/tui.rs:5277`, `draw_wallet_setup` `src/tui.rs:5386`), so their frames are
**RECONSTRUCTED** by a scratch driver that copies the layout constants and the
copy from those two functions verbatim, and draws through the real public
`draw_text_overlay`. The card forbids changes under `tests/`, so this driver is
not committed; its source and the raw dump are attached to the task and the
follow-up should add them to `tests/tui_frames.rs` as labelled dumps.
Everything marked **REAL** calls the shipped public render path
(`draw_wallet_select`, `draw_wallets_settings`, `draw_text_overlay`,
`status_footer_phased`) with the same footers `App::draw` builds.
* Styling (colour, weight) does not appear in a text dump. Tone claims below are
read from the `style_*` call sites, and are labelled as such.
## Frames
### 1. First run — what a fresh install sees (`App::new`, `src/tui.rs:1387-1390`)
`list_wallets()` returning empty selects `Screen::WalletSetup(WalletSetup::CreateWarn)`,
drawn by `draw_wallet_setup` (`src/tui.rs:5388-5394`) through `draw_text_overlay`.
**RECONSTRUCTED — first run, `create spend wallet`, 80x24, nothing typed**
```
┌create spend wallet─────────────────────────────────────────────────────────┐
│trust. │
│ │
│Type SPEND to confirm Esc to cancel │
└────────────────────────────────────────────────────────────────────────────┘
```
At the floor the whole warning is one word: `trust.` The popup has three inner
rows and the body wraps to four, so `draw_text_overlay`'s
`scroll = wrapped - inner_h` (`src/tui.rs:3820`) drops the head — which is where
the sentence that says what this wallet can do lives.
**RECONSTRUCTED — first run, 120x40, nothing typed**
```
┌create spend wallet─────────────────────────────────────────────────────────────────────────────────────────────────┐
│do not leave it on a box you do not trust. │
│ │
│Type SPEND to confirm Esc to cancel │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```
Still one sentence: `do not leave it on a box you do not trust.`
**RECONSTRUCTED — first run, 200x60, nothing typed**
```
┌create spend wallet────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│this wallet file can spend. anyone with its passphrase or the RPC creds can move the balance. write down the seed. do not leave it on a box you do not trust. │
│ │
│Type SPEND to confirm Esc to cancel │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```
The warning only reads in full at 200 columns, where it happens to fit one row.
Nothing in the frame says the install has no wallet, or that this screen is a
dead end other than `Esc`.
**RECONSTRUCTED — first run, 80x24, `SPEN` typed (before the gate opens)**
```
┌create spend wallet─────────────────────────────────────────────────────────┐
│trust. │
│ │
│Type SPEND to confirm Esc to cancel │
│SPEN │
└────────────────────────────────────────────────────────────────────────────┘
```
The typed buffer is echoed one row lower, unlabelled: the frame shows `SPEN` with
no prompt saying what is being collected. Accepting the gate is
case-insensitive (`handle_wallet_setup`, `src/tui.rs:2440-2448`), so `spend`
works too, and the frames give no hint of that.
### 2. The F6 wallet screen with nothing configured
`open_wallet` (`src/tui.rs:2022-2033`) asks `Node::wallet_receive_address` first;
on an install with no profile `xmr` and no `ONIONWIRE_WALLET_RPC` that call
returns `Err("no receive address — set profile xmr or ONIONWIRE_WALLET_RPC")`
(`src/node.rs:1322`, `:1345`). The key handler propagates it
(`FunctionKey::Wallet => self.open_wallet()?`, `src/tui.rs:1504`), the event loop
propagates it (`run`, `src/tui.rs:1438`), and `main` prints and exits
(`src/main.rs:30`). **The screen below is therefore not reachable at HEAD** — it
is what the same function draws whenever the address read *does* succeed, which
is why it is shown: it is the frame a user gets on any install that has a wallet
configured.
**RECONSTRUCTED — F6 wallet, unconfigured (address empty, balance `off`), 80x24**
```
┌wallet────────────────────────────────────────────────────────────────────────┐
└──────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────┐
└──────────────────────────────────────────────────────────────────────────────┘
s start child x stop child p probe c create i import r qr Esc back
```
**RECONSTRUCTED — F6 wallet, unconfigured, 120x40**
```
┌wallet────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
s start child x stop child p probe c create i import r qr Esc back
```
**RECONSTRUCTED — F6 wallet, connected (address, balance and one transfer), 200x60**
```
┌wallet────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
s start child x stop child p probe c create i import r qr Esc back
```
All three frames are the same screen: an empty `wallet` title box, a blank field,
a second empty box, one help line. `draw_wallet` renders the body — `address`,
`balance`, `recent transfers` — into `cols[2]`, and the layout at
`src/tui.rs:5327-5333` gives `cols[2]` `Constraint::Length(2)`. With
`Borders::ALL` (`src/tui.rs:5379`) that is zero inner rows, so the paragraph is
never drawn: address, balance, transfers and the child line are all invisible, at
every size, configured or not. The `Min(4)` row and the trailing `Length(1)` row
are never rendered into.
### 3. `F6` then `w` — the wallet list (REAL)
**REAL — `draw_wallet_select`, empty list (`WalletSelectState::from_rows(vec![])`), 80x24**
```
┌(o) wallets───────────────────────────────────────────────────────────────────┐
│ no saved wallets yet │
│ create one to get an identity and an onion address │
│ │
│ │
│ │
│ │
│> + create new wallet │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
✓ TOR ready me:abcdef01… onion:abcdefgh… Esc back j k select Enter open ? help
```
The one row the card asks about is `> + create new wallet`, last, marked and
bold. The state above it is designed copy, not a blank pane.
**REAL — `draw_wallet_select`, two saved wallets (one unlabelled, one unpublished), 120x40**
```
┌(o) wallets · 2 saved─────────────────────────────────────────────────────────────────────────────────────────────────┐
│ name identity locator since │
│> spend 9f2c41ab… abcdefgh… 2026-09-21 │
│ (unlabelled) - - unknown │
│ │
│ id 9f2c41ab8d7e0f13a5b6c7d8e9f0a1b2c3d4e5f60718293a4b5c6d7e8f90a1b2 │
│ onion abcdefghijklmnopqrstuvwxyz234567abcdefghijklmnopqrstuvwx │
│ │
│ + create new wallet │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
✓ TOR ready me:abcdef01… onion:abcdefghijklmnopqrstuvwxyz234567abcdefghijklmnopqrstuvwx.onion Enter open ? help
```
**REAL — `draw_wallet_select`, failed read (`WalletSelectState::error`), 80x24**
```
┌(o) wallets───────────────────────────────────────────────────────────────────┐
│ could not read saved wallets │
│ no wallet store: database is locked by another process │
│ │
│ │
│ │
│ │
│> + create new wallet │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
✓ TOR ready me:abcdef01… onion:abcdefgh… Esc back j k select Enter open ? help
```
**REAL — `draw_wallet_select`, read in flight (`WalletSelectState::reading()`), 80x24**
```
┌(o) wallets───────────────────────────────────────────────────────────────────┐
│ reading saved wallets │
│ one moment │
│ │
│ │
│ │
│ │
│> + create new wallet │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────┘
✓ TOR ready me:abcdef01… onion:abcdefgh… Esc back j k select Enter open ? help
```
### 4. The create-spend-wallet warning frame
The warning frame is frame 1: same function, same body, `src/tui.rs:5388-5394`.
Judged as a security gate at the moment of commitment:
* **Unmissable**: yes. It owns the whole screen, the gate is a typed word, and
`SPEND` is stated on the frame (`Type SPEND to confirm Esc to cancel`).
* **A wall?** Only in the sense that its content is not readable: at 80x24 and
120x40 the user confirms a warning they cannot see (finding 2).
* **The confirmation affordance**: the accepted word is on the frame, and the
typed echo is visible (`SPEN` above). It does not say the word is
case-insensitive, and it does not gate on the buffer being complete before
entering it — the transition fires on the last letter
(`src/tui.rs:2443`), which is the right behaviour for a typed gate.
* **Do not weaken it.** The warning text, the `type SPEND` gate, the seed's
`type SEEN` acknowledgement and the offset notice that `Esc` must not dismiss
(`handle_wallet_setup`, `src/tui.rs:2410-2415`) are deliberate. Finding 2 is a
rendering bug, not a request to shorten any of it.
Supporting frame, same overlay idiom, same fault:
**RECONSTRUCTED — `write down this seed`, 80x24 (25-word BIP39 test vector)**
```
┌write down this seed────────────────────────────────────────────────────────┐
│abandon abandon abandon abandon abandon abandon about │
│ │
│this is shown once. anyone with it can spend. │
│Type SEEN when you have written it down │
└────────────────────────────────────────────────────────────────────────────┘
```
Six words of twenty-five. The popup clips the seed to its last wrapped row.
**RECONSTRUCTED — `write down this seed`, 200x60**
```
┌write down this seed────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│about │
│ │
│this is shown once. anyone with it can spend. │
│Type SEEN when you have written it down │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```
At 200 columns the seed is 197 cells and the popup's inner width is 196, so it
wraps to two rows, the box shows four, and the scroll drops row one: the frame
reads `about` alone. A user who writes down what they can see writes down one
word. Same mechanism at every width, for `import seed`, `seed offset passphrase`
and `offset not saved` (`src/tui.rs:5403-5441`).
### 5. The F9 WALLETS & SETTINGS menu (REAL)
`menu_groups` (`src/tui.rs:3970`) builds **seventeen** rows — nine under WALLET
(`endpoint`, `child`, `sync`, `receive`, `balance`, `transfers`, `payments`,
`create`, `import`) and eight under SETTINGS (`nickname`, `profile`, `identity`,
`colour`, `backup`, `restore`, `wipe`, `wipe-all`). The card's brief says eleven;
the tree says seventeen.
**REAL — `draw_wallets_settings`, unconfigured, 80x24**
```
┌(o) wallets & settings────────────────────────────────────────────────────────┐
│WALLET ───────────────────────────────────────────────────────────────────────│
│ endpoint not configured · receive-only │
│ child receive-only · not started F6 s/x│
│ sync not probing · no chain source F6 p│
│ receive no address yet · wallet unreachable │
│ balance off F6│
│ transfers no transfers yet F6│
│ payments no friend selected │
│ create /wallet create · seed shown once F6 c│
│ import /wallet import · 25-word seed F6 i│
│ │
│SETTINGS ─────────────────────────────────────────────────────────────────────│
│ nickname (none) /profile│
│ profile bio unset · xmr unset /profile│
│ identity abcdef01… · identity = pubkey F2│
│ colour auto · follows NO_COLOR / TERM │
│ backup encrypted identity export /backup│
│ restore overwrite self keys from a backup /restore│
│ wipe messages · identity and friends stay /wipe│
│ wipe-all deletes your identity key · new person /wipe-all│
│ │
└──────────────────────────────────────────────────────────────────────────────┘
✓ TOR ready me:abcdef01… onion:abcdefgh… Esc back c copy ? help
```
**REAL — `draw_wallets_settings`, configured and connected, 120x40**
```
┌(o) wallets & settings────────────────────────────────────────────────────────────────────────────────────────────────┐
│WALLET ───────────────────────────────────────────────────────────────────────────────────────────────────────────────│
│ endpoint configured · connected │
│ child local node · running F6 s/x│
│ sync chain at tip · wallet answering F6 p│
│ receive 4AdUndXHHZ6cfufTMvppY6JwXNouMBzSkbLYfpAV5Usx3skxNgYeYJKUGVktfzxayYmZreZ3Gvd1AAb1d1EU7oFyJX8… c copy F6 r│
│ balance 12.500000000000 F6│
│ transfers 3 recent F6│
│ payments 4 with alice p│
│ create /wallet create · seed shown once F6 c│
│ import /wallet import · 25-word seed F6 i│
│ │
│SETTINGS ─────────────────────────────────────────────────────────────────────────────────────────────────────────────│
│ nickname lance /profile│
│ profile bio set · xmr set /profile│
│ identity abcdef01… · identity = pubkey F2│
│ colour auto · follows NO_COLOR / TERM │
│ backup encrypted identity export /backup│
│ restore overwrite self keys from a backup /restore│
│ wipe messages · identity and friends stay /wipe│
│ wipe-all deletes your identity key · new person /wipe-all│
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
✓ TOR ready me:abcdef01… onion:abcdefghijklmnopqrstuvwxyz234567abcdefghijklmnopqrstuvwx.onion Esc back c copy ? help
```
Scanning order is right: capability group first, then the identity/settings
group, with the wallet's own `transfers` and the peer-scoped `payments` kept
distinct and worded differently. Three rows carry no key at all (`endpoint`,
`receive` when empty, `colour`), and the value column truncates in cells with an
ellipsis so no row wraps or pushes its key off the row.
### 6. Empty and error states
Every distinct "nothing here yet" / "that failed" string the wallet surfaces can
render, and where it lands:
| string | surface | tone | source |
|---|---|---|---|
| `no saved wallets yet` + `create one to get an identity and an onion address` | `F6`→`w`, no rows | dim | `src/tui.rs:5003-5007` |
| `could not read saved wallets` + the reason | `F6`→`w`, read failed | alert | `src/tui.rs:4990-4995` |
| `reading saved wallets` + `one moment` | `F6`→`w`, in flight | dim | `src/tui.rs:4996-5001` — unreachable, see finding 11 |
| `(none)` | `F6` body, no transfers | text | `src/tui.rs:5366` — never drawn, see finding 1 |
| `no address` | `F6` body, address empty | text | `src/tui.rs:5344` — never drawn |
| `(qr error)` | `F6`, QR modal | text | `src/tui.rs:5306` |
| `no transfers yet` | `F9`, `transfers` row | dim | `src/tui.rs:4042` |
| `no address yet · wallet unreachable` | `F9`, `receive` row | dim | `src/tui.rs:4018` |
| `off` | `F9`, `balance` row | dim | `src/node.rs:1092` |
| `err` | `F9`, `balance` row | alert | `src/node.rs:1096` |
| `not configured · receive-only` | `F9`, `endpoint` row | dim | `src/tui.rs:3972` |
| `configured · not connected` | `F9`, `endpoint` row | stale | `src/tui.rs:3976` |
| `child exited` | `F9`, `sync` row | alert | `src/tui.rs:4002` |
| `not probing · no chain source` | `F9`, `sync` row | dim | `src/tui.rs:4003` |
| `no friend selected` | `F9`, `payments` row / status note | dim / text | `src/tui.rs:4060`, `2106` |
| `history unreadable · <peer>` | `F9`, `payments` row | — | `src/tui.rs:4064` |
| `no history with <peer>` | `F9`, `payments` row | dim | `src/tui.rs:4065` |
| `-` (empty identity/locator cell) | `F6`→`w` row | dim | `src/tui.rs:5064-5079` |
| `(unlabelled)` (NULL name) | `F6`→`w` row | row style | `src/tui.rs:5056-5063` |
| `unknown` (no creation date) | `F6`→`w` row | dim | `src/tui.rs:4864` |
| `no receive address to copy` | status line, `c` on `F9` | text | `src/tui.rs:2216` |
| `could not write the clipboard sequence` | status line | text | `src/tui.rs:2227`, `:2247` |
| `no receive address — set profile xmr or ONIONWIRE_WALLET_RPC` | **process exit** | — | `src/node.rs:1322`, `:1345` |
| `the saved wallets changed — reopen the list` | `alert` | alert | `src/tui.rs:2187` |
| `wallet <label> needs its passphrase` | status line | text | `src/tui.rs:2156` |
Three separate dim words mean "there is nothing": `(none)`, `no transfers yet`,
`off`. Two more mean "we could not look": `err` and `history unreadable`.
`no address`, `no address yet · wallet unreachable` and `no receive address to
copy` are the same fact in three lengths. Only the `err`/`exited`/`unreadable`
family is alert-toned; every other absence is dim, including the one that means
the wallet is not configured at all.
### 7. Footer hints and the help overlay at 80 columns
`F6`'s hint is built in `footer_hints` (`src/tui.rs:3516-3518`) and the `F6`
screen renders no status line at all — `App::draw` (`src/tui.rs:2850-2865`)
calls `draw_wallet` only. What the screen *does* draw is a second, shorter list
at `src/tui.rs:5373`.
**RECONSTRUCTED — the F6 footer hint the app builds (drawn through
`status_footer_phased`, as `Screen::WalletSelect` does), 80x24**
```
✓ TOR ready me:abcdef01… onion:abcdefgh… 2 full 3 testnet Esc back ? help
```
**RECONSTRUCTED — the same built footer, 120x40**
```
✓ TOR ready me:abcdef01… onion:abcdefghijklmnopqrstuvwxyz234567abcdefghijklmnopqrstuvwx.onion Esc back ? help
```
**RECONSTRUCTED — the help line `F6` actually draws (`src/tui.rs:5373`), 80x24**
```
s start child x stop child p probe c create i import r qr Esc back
```
The built hint is grouped by task (create/import/QR, then wallets, then the
child, then the chain switch, then `Esc`) — the ordering is right. It does not
fit: `status_footer_inner` (`src/tui.rs:3449-3458`) drops tokens with
`hint_tokens.remove(0)`, i.e. **from the front**, so at 80 columns the surviving
words are `2 full 3 testnet Esc back ? help` — the chain-switch extras live and
`c create`, `i import`, `r qr`, `w wallets` all die. At 120 columns the full
onion takes the room and the entire hint is gone.
The line the user actually sees names seven bindings and omits `w wallets` — the
only route to a wallet that already exists — and omits `? help`, on the screen
where a new user most needs to find both. `docs/TUI.md:110-113` documents the
footer that is never drawn.
**REAL — `?` help overlay, 80x24**
```
┌? help─────────────────────────────────────────────────────────┐
│F2 share invite (C copies it) │
│F3 paste invite │
│F4 rotate onion locator │
│F5 selected friend's profile (/who) │
│F6 wallet (receive QR, create/import) │
│F8 rotate prekey │
│F9 wallets & settings menu │
│/profile edit name, bio, Monero address │
│/pay <xmr> [memo] invoice to receive │
│/tip <xmr> [memo] pay selected friend │
│/wallet create new spend wallet (seed shown once) │
│/wallet import restore from existing seed │
│/file /path send file to selected friend (1 MiB) │
│/backup /path encrypted identity export │
│/restore /path overwrite self keys │
│/wipe wipe messages; identity and friends stay │
│/wipe-all wipe identity too — you become a new person │
│/settings wallets & settings menu │
│? this help │
│Ctrl-Q quit; type CLEAR or QUIT │
│ │
│Esc closes this overlay │
└───────────────────────────────────────────────────────────────┘
```
The overlay is thirty lines tall in a twenty-four row terminal and is pinned to
its tail, so the eight lines that teach navigation — `Tab/Shift-Tab`, `1/2/3`,
`j k`, `g/G`, `Enter`, `Esc` — are the ones cut. `F2`…`F9` survive. Same fault
as the seed and the SPEND warning.
## Findings
| severity | surface | what a user sees | why it is wrong | suggested change |
|---|---|---|---|---|
| blocker | `F6` wallet screen — `draw_wallet`, `src/tui.rs:5327-5333` + `:5375-5381` | An empty `wallet` box, a blank field, a second empty box, one help line. No address, no balance, no transfers, at 80x24, 120x40 and 200x60, configured or not. | The body paragraph is rendered into `cols[2]`, which `Constraint::Length(2)` gives two rows; with `Borders::ALL` that leaves zero inner rows, so the text is never drawn. `cols[1]` (`Min(4)`) and `cols[4]` (`Length(1)`) are unused. | Give the body the flexible row — e.g. `[Length(2), Min(10), Length(3)]` — and render the status line in the last row. Owned by the sibling `rust-dev` card. |
| blocker | every setup overlay — `draw_text_overlay`, `src/tui.rs:3809-3820`, called by `draw_wallet_setup` `src/tui.rs:5386-5452` | The frames above: the SPEND warning reads `trust.` at 80x24 and one sentence at 120x40; the create-seed frame shows six of twenty-five words at 80x24 and `about` at 200x60; `offset not saved` shows only its last clause. | `scroll = wrapped.saturating_sub(inner_h)` pins the body to its tail; the popup is sized from the *unwrapped* longest line and its height is clamped, so a body that needs five rows gets four and silently loses the first. There is no `…` marker and no scroll indicator. | Size the box to `min(content, cap)` and scroll to the **top**; page the seed over rows; if scrolling stays possible, print `… n lines above` so a cut body is visible rather than silent. |
| blocker | first run — `App::new`, `src/tui.rs:1387-1390` | A fresh install opens on `create spend wallet`, showing one word of a security warning and `Type SPEND to confirm`. Nothing says the install has no wallet, or what happens after `Esc`. | The highest-severity decision in the product is the first frame, before any orientation, and its only exit (`handle_wallet_setup` `src/tui.rs:2434-2437` → `Screen::Main`) lands on a main screen whose `F6` then fails on the missing wallet. | First run opens the wallet list with `+ create new wallet` selected (the sibling card's F6-first-run fix); keep the SPEND gate where it is — after the user asks for a spend wallet. Warning text and gate unchanged. |
| blocker | `F6` with no receive address — `src/tui.rs:1504`, `:2022-2033`, `:1438`, `src/main.rs:30` | The app exits; the terminal is left with `onionwire: no receive address — set profile xmr or ONIONWIRE_WALLET_RPC`. | A missing configuration is reported by ending the process, from a key the footer names on every screen. There is no state to read and nothing to press — the exact complaint filed. | `open_wallet`'s failure sets `alert` and lands on a screen that names the fix, the way `select_wallet`'s error does (`choose_wallet`, `src/tui.rs:2166`). Owned by the sibling `rust-dev` card. |
| should-fix | `F6` footer vs the line it draws — `footer_hints` `src/tui.rs:3516-3518` vs `draw_wallet` `src/tui.rs:5373` | A help line naming `s x p c i r Esc`, and no status line anywhere on the screen. `w wallets` and `? help` are absent. | The saved-wallet list is unreachable by reading the screen that owns the key; the copy and the code disagree, and `docs/TUI.md:110-113` documents the version nobody sees. | Draw one status line on `Screen::Wallet` from `status_footer_phased` + `footer_hints`, delete the bespoke help paragraph, and name `w` and `? help` on it. |
| should-fix | status-line fit — `status_footer_inner`, `src/tui.rs:3449-3458` | With the `F6` hint at 80 columns: `✓ TOR ready me:abcdef01… onion:abcdefgh… 2 full 3 testnet Esc back ? help`. At 120: no hint at all. | The fit loop removes tokens from the **front** (`hint_tokens.remove(0)`), so the surviving words are the least important ones — the chain-switch extras — and whole groups vanish without a marker. | Drop from the tail of the lowest-priority group, keeping `Esc back`, `? help` and the first group; or shorten to `c new i import r qr w wallets …`; move `1/2/3` out of the footer into the help overlay. |
| should-fix | `F9` rows with no key — `menu_groups`, `src/tui.rs:4011-4081` | Three rows whose key column is blank: `endpoint` (always), `receive` (when empty), `colour`. The `endpoint` row is the one the user's complaint is about. | A discoverability menu whose rows cannot be acted on teaches that the menu is read-only; the wallet endpoint is the single thing the user asked to be able to set from the TUI (`docs/WALLET.md`'s F7 screen). | Put `F7` in `endpoint`'s key column as soon as that screen lands; make `receive`'s key `F6 r` whenever a wallet is configured; drop `colour` (a fact, not a capability) or give it a key. |
| should-fix | empty/error vocabulary — the table in section 6 | `(none)`, `no transfers yet`, `off`, `no address`, `no address yet · wallet unreachable`, `no receive address to copy` — six spellings, four surfaces, all dim. | A user cannot tell "empty" from "failed" from "not set up": the only alert-toned wallet strings are `err` and `child exited`, and the not-configured state is the dimmest of them. | One word per meaning: `none yet` for a genuine empty list, `unreachable` for a failed look, and the full sentence only in the alert tone — which already gains a `!` prefix under `NO_COLOR` (`src/tui.rs:3406-3412`). |
| should-fix | no reachable loading state — `open_wallet` `src/tui.rs:2022-2033`; `WalletSelectState::reading()` `src/tui.rs:4760` | Pressing `F6` freezes the previous frame for as long as the RPC takes (the chain budget is 60s, `wallet::CHAIN_RPC_TIMEOUT`). `reading saved wallets / one moment` is designed and never set — `open_wallet_select` (`src/tui.rs:2199`) goes straight from the store read to a finished state. | A frozen frame reads as the crash the user already reported for this screen. | Set the reading state and draw it before the blocking read (or take an F9-style snapshot); needs a `rust-dev` decision on where the read happens. |
| polish | `F9` when nothing is configured — `menu_groups`, `src/tui.rs:3971-4044` | Five of nine WALLET rows say the same absence: `not configured · receive-only`, `receive-only · not started`, `not probing · no chain source`, `no address yet · wallet unreachable`, `off`. | Scanning for "what do I do" means reading five dim rows; the two rows that *do* something (`create`, `import`) are last. | With nothing configured, state it once and promote `create`/`import` above the state rows — or mark the actionable row with the focus marker so the eye lands on it. |
| polish | help overlay at 80x24 — `help_overlay_text` `src/tui.rs:528`, `draw_text_overlay` `src/tui.rs:3820` | The overlay opens at `F2`; the navigation keys above it are cut. | Same tail-pinning as the seed and the warning, on the screen a confused user opens *because* they are lost. | Same fix as finding 2. |
## What is already right
Do not touch these; they are the reason the wallet flow is legible at all.
* **The `F6` → `w` list screen** (`draw_wallet_select`, `wallet_select_lines`,
`src/tui.rs:4969-5191`). Empty, failed-read and in-flight are three separate
designs, each with its own words; `+ create new wallet` is always the last row
and is the only item an empty or failed list contains; the marker is `> `
**plus** accent and bold, not colour alone (`src/tui.rs:5082-5097`); the grid
columns are cell-measured constants (`WALLET_ID_W`/`WALLET_LOC_W`/
`WALLET_SINCE_W`, `src/tui.rs:4835-4855`) and a column that does not fit is
dropped before it can wrap; the full identity/locator strip appears only where
it cannot wrap (`w >= 75 && h >= 14`, `src/tui.rs:5022`) and its rows are
reserved whether or not the selection is a wallet, so the marker moving to the
create row never shifts the table.
* **The `F9` menu's shape** (`wallets_settings_menu_lines`,
`menu_row_line`, `src/tui.rs:4182-4227`). Labels dim, values toned, keys
accent and right-aligned so the eye can run down them; the value truncates
rather than pushing the key off the row; no row can wrap. The two-group split
(WALLET, SETTINGS) and the `transfers` (wallet's own, F6) vs `payments`
(peer-scoped, `p`) distinction are deliberate and the copy says so
(`src/tui.rs:3965-3969`).
* **Untrusted text is display data everywhere it should be.** `menu_cell_text`
(`src/tui.rs:3926`) strips controls and bidi and drops newlines/tabs before any
peer string can reach a row; `fit_cells` truncates in cells with the ellipsis;
`WalletMenuState` has no field that can hold a passphrase, a seed or RPC creds
(`src/tui.rs:3840-3884`), which is what makes it safe to draw at all.
* **The colour-blind path.** Every `MenuTone` value spells its state out in
words (`src/tui.rs:3937-3938`, `4154-4160`); failures gain a `!` prefix when
colour is off (`src/tui.rs:3406-3412`); the section rule degrades to `-` under
ASCII (`src/tui.rs:4167`).
* **The SPEND gate, the seed acknowledgement and the offset notice.** Warning
text unchanged, `type SPEND` (case-insensitive) and `type SEEN` unchanged,
and `Esc` deliberately cannot dismiss `ImportOffsetSeen` (`src/tui.rs:2410-2415`)
because the app keeps no copy of the offset. `docs/payment-integration-plan.md:243`
records the gate as locked. Nothing in this review proposes weakening any of it.
* **`cell_width` via `Span::width` and the hand-rolled `format_day_utc`**
(`src/tui.rs:3895`, `:4862`). Cells not chars, and no date crate for one
calendar date.
## Not examined
* **The F7 wallet endpoint screen.** It is not on `main` (`docs/WALLET.md`
describes it; `src/node.rs` comments call it "the F7 screen"), so there is no
frame to judge. Finding 7 anticipates its key column; the screen itself is
unrouted. This is the gap behind the user's third and fourth complaints.
* **The QR modal** (`draw_wallet`, `src/tui.rs:5286-5325`). Reachable only via
`r`/Enter on a wallet that has an address, i.e. on an install where the reachable
path is the screen broken by finding 1. Not rendered.
* **Cuprate child lifecycle.** `s`/`x`/`p`/`1`/`2`/`3` and the child line
(`wallet_child_screen_line`, `src/tui.rs:2276`) were read, not exercised: no
node runs on this host, so no child state was produced.
* **`/pay`, `/tip` and the peer-payment history** (`draw_peer_payments`,
`src/tui.rs:4667`). Another card's surface with its own frame tests
(`tests/tui_payments.rs`); only its footprint in the `F9` `payments` row was
reviewed.
* **Reduced-colour and 16-colour rendering.** Tone claims are read from the
`style_*` call sites, not from a frame dumped with `NO_COLOR`, because the
colour mode is process-wide and `tests/tui_spec.rs` mutates it without a lock
(a known flake source in this repo).
* **Glyph fallback beyond box-drawing.** `ascii_chrome()` degradation is covered
by existing tests; no ASCII frame was dumped for this review.
* **The seed/offset crypto**, the wallet file format, and anything behind the
RPC. Presentation only.
* **Frames for the two private wallet functions are RECONSTRUCTED**, copied
from `src/tui.rs:5277-5384` and `:5386-5452`. They are exact as to text and
geometry; they are not exact as to weight or colour (a `TestBackend` text dump
carries neither), and styling claims about them are read from the source.