tui: F9 works on the peer-payments screen, and frames dump the real footer
Review round 1 on the F9 `payments` row found two false affordances. 1. `footer_hints(Screen::PeerPayments)` prints `F9 menu`, and docs/TUI.md says F9 reopens the menu, but the `KeyCode::F(9)` arm opened it only from `Screen::Main`, so pressing F9 on the peer history did nothing. The function keys are now routed through one table, `function_key_for(screen, code)`, and the F9 arm no longer has the Main-only guard: it opens (or reopens) the menu from `Main`, `WalletsSettings` and `PeerPayments`. A screen that names a key has to answer it while it is open — that is what the table encodes, and `mod function_key_tests` locks it, including a test that reads the screen's own hint and asserts every `F<n>` it names is answered there. 2. The PR's frame dumps passed `"Esc back up/down select ? help"` to `status_footer` by hand, so every dumped frame showed a footer the app never renders. `peer_payments_footer_hint()` is now the single source both `footer_hints` and the fixture read, and `peer_payments_frame_shows_the_shipped_footer` pins the dumped frame's last line to the shipped one. Also restores the rustfmt-only reflow of unrelated tests in `tests/tui_spec.rs` (`queued_row`, a `failed_row` call, `rgb_tokens_…`, `alert_line_…`), keeping this card's real edits there. Presentation only: no wire, store, session, send-path or `Node` change.
This commit is contained in:
parent
2fa3466019
commit
b8fefe9c18
4 changed files with 185 additions and 54 deletions
|
|
@ -749,6 +749,12 @@ dumps the screen at 80x24, 120x40 and 200x60, populated and empty.
|
|||
- The focused row is marked with `>` **and** bold, so focus survives a
|
||||
monochrome terminal. `up`/`down` (or `k`/`j`) move it, `Esc` returns to the
|
||||
main screen, `F9` reopens the menu.
|
||||
- `F9` is honoured **while this screen is open**, not only from the main screen:
|
||||
the function-key table (`function_key_for`) answers it from `Main`,
|
||||
`WalletsSettings` and `PeerPayments` alike, so the hint the screen prints
|
||||
cannot be a no-op there. `peer_payments_footer_hint()` is the single place that
|
||||
hint string is written, and the frame-dump fixture is driven from it — a dumped
|
||||
frame cannot show a footer the app does not render.
|
||||
- The selected row's `tx` and `addr` are spelled out under the rows: a 64-hex
|
||||
txid is unusable truncated, and a 95-character base58 address is **wrapped**
|
||||
over two lines rather than clipped to a prefix.
|
||||
|
|
|
|||
Loading…
Reference in a new issue