feat(tui): fail-closed footer, 1-line header, help overlay #24

Merged
sirius merged 3 commits from wt/t_0d3b0f80 into main 2026-09-12 04:25:07 +00:00
2 changed files with 31 additions and 20 deletions
Showing only changes of commit 7d3e1bd627 - Show all commits

test(tui): keep send-failed visible in crowded status_footer
All checks were successful
ci / test (pull_request) Successful in 3m5s

PR #23 locked the old drop. Flip status_footer_drops_send_failed_when_crowded
to assert the note stays at 80/120/200 with TOR, me:, and ? help.
Sirius DevOps 2026-09-12 00:22:04 -04:00
No known key found for this signature in database

View file

@ -143,9 +143,9 @@ chat/composer is **not** visible in the glyph dump (color-only in `pane_block`).
TOR me:abcdef01… onion:abcdefgh… Tab F2 F3 F4 F5 Ctrl-Q ? help
```
`status_note` was `send failed: peer onion down`. It is not on the frame.
`tests/tui_frames.rs` `status_footer_drops_send_failed_when_crowded` locks this
current behavior so the implementation card can flip it.
`status_note` was `send failed: peer onion down`. The before frame above drops it.
`tests/tui_frames.rs` `status_footer_drops_send_failed_when_crowded` now asserts
the note **is** present at 80, 120, and 200, along with `TOR` / `me:` / `? help`.
### 80x24 — `draw_share` (real)

View file

@ -483,26 +483,37 @@ fn footer_drops_full_onion_at_80_keeps_it_at_120() {
assert!(at_80.contains("? help") && at_120.contains("? help"));
}
/// Current `status_footer` drops fail-closed copy when ident+hints fill the row.
/// Spec: never drop `send failed`. Do not change `src/` on this card.
/// Spec: never drop `send failed`. Keep `TOR` / `me:` / `? help` at 80 and 120.
#[test]
fn status_footer_drops_send_failed_when_crowded() {
let note = "send failed: peer onion down";
let at_80 = status_footer(80, FP, ONION, Some(note), main_footer_hints());
let at_120 = status_footer(120, FP, ONION, Some(note), main_footer_hints());
let at_200 = status_footer(200, FP, ONION, Some(note), main_footer_hints());
assert!(
!at_80.contains("send failed"),
"80 still has room? {at_80:?}"
);
assert!(
!at_120.contains("send failed"),
"120 still has room? {at_120:?}"
);
assert!(
at_200.contains("send failed"),
"200 should keep the note: {at_200:?}"
);
for (w, line) in [
(
80u16,
status_footer(80, FP, ONION, Some(note), main_footer_hints()),
),
(
120,
status_footer(120, FP, ONION, Some(note), main_footer_hints()),
),
(
200,
status_footer(200, FP, ONION, Some(note), main_footer_hints()),
),
] {
assert!(
line.chars().count() <= w as usize,
"{w} footer wider than frame: {} {line:?}",
line.chars().count()
);
assert!(
line.contains("send failed"),
"{w} dropped fail-closed note: {line:?}"
);
assert!(line.contains("TOR"), "{w} missing TOR: {line:?}");
assert!(line.contains("me:"), "{w} missing me:: {line:?}");
assert!(line.contains("? help"), "{w} missing ? help: {line:?}");
}
}
#[test]