docs(tui): visual audit, before frames, and design spec #23

Merged
sirius merged 1 commit from wt/t_3c2d56df into main 2026-09-12 04:15:38 +00:00
Owner

Summary

Visual audit + implementable TUI spec. No src/ changes.

  • tests/tui_frames.rs — TestBackend dumps at 80x24, 120x40, 200x60
  • docs/TUI.md — findings (severity + file:line) and the design spec for the next card

Dump command:

cargo test --locked --test tui_frames -- --nocapture dump_audit_frames

git diff --stat origin/main is only those two files.

Gaps

App / draw_main / private draw_* need Node (Arti). Could not construct that. Share is a real draw_share. Main/help/profile/confirm are RECONSTRUCTED from the same layout constants and public copy. Pay/file have no screen (footer only). Color is not in the glyph dump.

Blocker

status_footer (src/tui.rs:1505) drops send failed: … at 80 and 120 so ident + ? help fit. Fail-closed is invisible on the floor size. Proven: status_footer_drops_send_failed_when_crowded. Survives only at 200.

Other majors

  • Help overlay (draw_text_overlay ~1702) punches through banner/roster/composer at 80x24 and clips Esc closes this overlay
  • Roster clips petnames mid-word; 36% width steals the chat
  • 3-line wordmark + three boxed panes: chat is not primary
  • Chat/composer focus is color-only (roster has > )
  • Empty roster is a blank list
  • RGB only; no NO_COLOR / 16-color
  • Invite wraps mid-hex at 80

Spec (see docs/TUI.md)

  • Chat is the one primary pane; 1-line header at height 24 (keep banner_for_width locked)
  • Spacing unit 1; box only roster+chat
  • One accent; NO_COLOR = glyphs + weight; ASCII (o) > ...
  • Focus = > + bold, never color alone
  • Footer never drops send failed; always keep TOR / me: / ? help
  • Help is full-screen when height < 28
  • Do not add unicode-width until approved (你好 is 2 chars / 4 cells)

Before frames (80x24)

  .-~~-.  .-~~-.  .-~~-.     ONIONWIRE
 (  o   )(  o   )(  o   )    identity = pubkey  onion = locator
  `-..-'  `-..-'  `-..-'     tor messenger  no server
…
TOR  me:abcdef01…  onion:abcdefgh…  Tab F2 F3 F4 F5 Ctrl-Q  ? help

RECONSTRUCTED main, empty

  .-~~-.  .-~~-.  .-~~-.     ONIONWIRE
 (  o   )(  o   )(  o   )    identity = pubkey  onion = locator
  `-..-'  `-..-'  `-..-'     tor messenger  no server
┌roster 0───────────────────┐┌chat─────────────────────────────────────────────┐
│                           ││no friends yet                                   │
│                           ││F3 paste an invite to add one                    │
│                           ││                                                 │
└───────────────────────────┘└─────────────────────────────────────────────────┘
┌composer──────────────────────────────────────────────────────────────────────┐
│/wipe  /wipe-all  /profile  /who  /pay  /tip  /file                           │
└──────────────────────────────────────────────────────────────────────────────┘
TOR  me:abcdef01…  onion:abcdefgh…  Tab F2 F3 F4 F5 Ctrl-Q  ? help

RECONSTRUCTED main, fail-closed note dropped

┌roster 2  1 stale──────────┐┌chat  bob-the-stale-peer─────────────────────────┐
│  alice  aaaaaaaa…         ││no messages                                      │
│> bob-the-stale-peer  bbbbb││                                                 │
└───────────────────────────┘└─────────────────────────────────────────────────┘
┌composer──────────────────────────────────────────────────────────────────────┐
│/wipe  /wipe-all  /profile  /who  /pay  /tip  /file                           │
└──────────────────────────────────────────────────────────────────────────────┘
TOR  me:abcdef01…  onion:abcdefgh…  Tab F2 F3 F4 F5 Ctrl-Q  ? help

(status_note was send failed: peer onion down.)

RECONSTRUCTED help overlay — overlap + clipped last line

  .-~~-.  .-~~-.  .-~~-.     ONIONWIRE
 (  o   ┌? help─────────────────────────────────────────────────────────┐
  `-..-' │OnionWire keys                                                 │
┌roster│                                                               │───────┐
│      │Tab / Shift-Tab   cycle roster, chat, composer                 │       │
└──────│/restore /path    overwrite self keys                          │───────┘
┌compos│?                 this help                                    │───────┐
│/wipe │Ctrl-Q            quit; type CLEAR or QUIT                     │       │
└──────└───────────────────────────────────────────────────────────────┘───────┘
TOR  me:abcdef01…  onion:abcdefgh…  Tab F2 F3 F4 F5 Ctrl-Q  ? help

120x40 / 200x60: same command. At 120 the full onion is shown and send failed still drops.

After mockups

In docs/TUI.md (main + help at 80x24). Next card implements; this PR does not.

Test / clippy

cargo test --locked green (6 new tests in tui_frames). cargo clippy --locked --all-targets -- -D warnings green. Locked tui_chrome helpers untouched.

## Summary Visual audit + implementable TUI spec. **No `src/` changes.** - `tests/tui_frames.rs` — TestBackend dumps at 80x24, 120x40, 200x60 - `docs/TUI.md` — findings (severity + `file:line`) and the design spec for the next card Dump command: ``` cargo test --locked --test tui_frames -- --nocapture dump_audit_frames ``` `git diff --stat origin/main` is only those two files. ## Gaps `App` / `draw_main` / private `draw_*` need `Node` (Arti). Could not construct that. Share is a **real** `draw_share`. Main/help/profile/confirm are **RECONSTRUCTED** from the same layout constants and public copy. Pay/file have **no screen** (footer only). Color is not in the glyph dump. ## Blocker `status_footer` (`src/tui.rs:1505`) **drops** `send failed: …` at 80 and 120 so ident + `? help` fit. Fail-closed is invisible on the floor size. Proven: `status_footer_drops_send_failed_when_crowded`. Survives only at 200. ## Other majors - Help overlay (`draw_text_overlay` ~1702) punches through banner/roster/composer at 80x24 and clips `Esc closes this overlay` - Roster clips petnames mid-word; 36% width steals the chat - 3-line wordmark + three boxed panes: chat is not primary - Chat/composer focus is color-only (roster has `> `) - Empty roster is a blank list - RGB only; no `NO_COLOR` / 16-color - Invite wraps mid-hex at 80 ## Spec (see `docs/TUI.md`) - Chat is the one primary pane; 1-line header at height 24 (keep `banner_for_width` locked) - Spacing unit 1; box only roster+chat - One accent; `NO_COLOR` = glyphs + weight; ASCII `(o)` `> ` `...` - Focus = `> ` + bold, never color alone - Footer never drops `send failed`; always keep `TOR` / `me:` / `? help` - Help is full-screen when height < 28 - Do not add `unicode-width` until approved (`你好` is 2 chars / 4 cells) ## Before frames (80x24) ### chrome + footer (real helpers). Same row with `send failed: connection timed out` — note absent. ``` .-~~-. .-~~-. .-~~-. ONIONWIRE ( o )( o )( o ) identity = pubkey onion = locator `-..-' `-..-' `-..-' tor messenger no server … TOR me:abcdef01… onion:abcdefgh… Tab F2 F3 F4 F5 Ctrl-Q ? help ``` ### RECONSTRUCTED main, empty ``` .-~~-. .-~~-. .-~~-. ONIONWIRE ( o )( o )( o ) identity = pubkey onion = locator `-..-' `-..-' `-..-' tor messenger no server ┌roster 0───────────────────┐┌chat─────────────────────────────────────────────┐ │ ││no friends yet │ │ ││F3 paste an invite to add one │ │ ││ │ └───────────────────────────┘└─────────────────────────────────────────────────┘ ┌composer──────────────────────────────────────────────────────────────────────┐ │/wipe /wipe-all /profile /who /pay /tip /file │ └──────────────────────────────────────────────────────────────────────────────┘ TOR me:abcdef01… onion:abcdefgh… Tab F2 F3 F4 F5 Ctrl-Q ? help ``` ### RECONSTRUCTED main, fail-closed note dropped ``` ┌roster 2 1 stale──────────┐┌chat bob-the-stale-peer─────────────────────────┐ │ alice aaaaaaaa… ││no messages │ │> bob-the-stale-peer bbbbb││ │ └───────────────────────────┘└─────────────────────────────────────────────────┘ ┌composer──────────────────────────────────────────────────────────────────────┐ │/wipe /wipe-all /profile /who /pay /tip /file │ └──────────────────────────────────────────────────────────────────────────────┘ TOR me:abcdef01… onion:abcdefgh… Tab F2 F3 F4 F5 Ctrl-Q ? help ``` (`status_note` was `send failed: peer onion down`.) ### RECONSTRUCTED help overlay — overlap + clipped last line ``` .-~~-. .-~~-. .-~~-. ONIONWIRE ( o ┌? help─────────────────────────────────────────────────────────┐ `-..-' │OnionWire keys │ ┌roster│ │───────┐ │ │Tab / Shift-Tab cycle roster, chat, composer │ │ └──────│/restore /path overwrite self keys │───────┘ ┌compos│? this help │───────┐ │/wipe │Ctrl-Q quit; type CLEAR or QUIT │ │ └──────└───────────────────────────────────────────────────────────────┘───────┘ TOR me:abcdef01… onion:abcdefgh… Tab F2 F3 F4 F5 Ctrl-Q ? help ``` 120x40 / 200x60: same command. At 120 the full onion is shown and `send failed` still drops. ## After mockups In `docs/TUI.md` (main + help at 80x24). Next card implements; this PR does not. ## Test / clippy `cargo test --locked` green (6 new tests in `tui_frames`). `cargo clippy --locked --all-targets -- -D warnings` green. Locked `tui_chrome` helpers untouched.
docs(tui): visual audit, before frames, and design spec
All checks were successful
ci / test (pull_request) Successful in 2m45s
4205ed149d
Dump current chrome through TestBackend at 80x24 / 120x40 / 200x60.
No src changes. Spec in docs/TUI.md for the implementation card.
sirius merged commit 53f9914be5 into main 2026-09-12 04:15:38 +00:00
sirius deleted branch wt/t_3c2d56df 2026-09-12 04:15:55 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sirius/onionwire!23
No description provided.