From a94f071ccbd18b3207b13ff3e397d9556573f589 Mon Sep 17 00:00:00 2001 From: agent Date: Tue, 15 Sep 2026 21:39:05 -0400 Subject: [PATCH] docs(tui): add payment history after frames to Deliverable 5 Render command + 80x24 frames for empty, mixed verified/unverified, detail view with hostile memo sanitized, and ASCII fallback. Signed-off-by: tui-design --- docs/TUI.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/docs/TUI.md b/docs/TUI.md index bfb0879..ba3952c 100644 --- a/docs/TUI.md +++ b/docs/TUI.md @@ -1002,3 +1002,71 @@ s chain n start/stop c create i import r qr - `ChainChoice::ALL.len() == 3` (three choices, never a public node) — asserted. - `status_footer` keeps `send failed`, `TOR`, `me:`, `? help` at 80 and 120 — asserted by `status_footer_drops_send_failed_when_crowded`. - `chars().count() <= width` on all locked public copy — asserted by `public_copy_fits_80_by_chars_count`. + +## Deliverable 5 addendum — payment history frames (after) + +Render with `cargo test --locked --test tui_frames -- --nocapture dump_history_pr_frames`. + +### 80x24 — empty history + +``` +┌history bob──────────────────────────────────────────────────────────────────┐ +│no payments with this friend yet │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +│ │ +└──────────────────────────────────────────────────────────────────────────────┘ +Enter detail Esc back ? help ``` + +### 80x24 — mixed verified/unverified list + +``` +┌history alice────────────────────────────────────────────────────────────────┐ +│> 0.001 XMR ✓ verified abcdef012345678… 21m │ +│< 0.05 XMR ✓ verified deadbeefdeadbee… 3m │ +│> 0.0005 XMR ✗ unverified awaiting receipt 1m │ +└──────────────────────────────────────────────────────────────────────────────┘ +Enter detail Esc back ? help ``` + +### 80x24 — detail view (hostile memo sanitized) + +The memo was `pay\x01now\u{202E}reverse` (C0 control + bidi override). +After `sanitize::display_text` it renders as inert `paynowreverse`: + +``` +┌history alice detail────────────────────────────────────────────────────────┐ +│txid awaiting receipt │ +│address (none) │ +│memo paynowreverse │ +│amount 0.0005 XMR │ +│kind invoice │ +│direction outbound │ +│verified unverified │ +│timestamp 1700000200 (1m ago) │ +└──────────────────────────────────────────────────────────────────────────────┘ +Esc back ? help ``` + +### 80x24 — ASCII fallback + +``` ++history alice----------------------------------------------------------------+ +|> 0.001 XMR verified abcdef0123456... 21m | ++------------------------------------------------------------------------------+ +Enter detail Esc back ? help ```