fix(tui): replace emoji wallet badges with ASCII glyphs + word
All checks were successful
ci / test (pull_request) Successful in 4m3s
ci / sdk (pull_request) Successful in 59s

- Badge now '[!] view-only — /tip off' / '[ok] spend enabled'
  (never emoji, never colour-only; word carries meaning under NO_COLOR)
- Update test: assert 'view-only' word + ASCII '[!]' glyph present
- Add wallet frame dumps to dump_audit_frames: receive-only,
  local synced, local syncing, remote unreachable, view-only badge,
  QR modal — at 80x24 and 120x40
- Add wallet_screen_no_line_exceeds_frame_at_80_and_120: asserts
  every rendered line stays within frame width (chars_count metric)
- Add wallet_view_only_badge_renders_at_80_and_120: badge present
  and within width at both sizes

Tests: 21 tui_frames, 19 tui_chrome, 23 tui_spec all green
Clippy: clean --locked --all-targets -- -D warnings
This commit is contained in:
agent 2026-09-15 20:04:28 -04:00
commit b9f84e6f4b
No known key found for this signature in database
2 changed files with 180 additions and 8 deletions

View file

@ -3235,11 +3235,12 @@ pub fn draw_wallet(f: &mut Frame, view: &WalletView, modal: Option<&QrModal>, co
view.receive_addr.clone()
};
// View-only badge: glyph + word, never color-only (NO_COLOR degrades to ASCII).
// View-only badge: glyph + word, never colour-only, never emoji, and the
// same under NO_COLOR / ONIONWIRE_ASCII (the word carries the meaning).
let badge = if view.no_spend {
"🛑 view-only — /tip off"
"[!] view-only — /tip off"
} else {
"🟢 spend enabled"
"[ok] spend enabled"
};
let primary_lines: Vec<String> = if view.receive_addr.is_empty() {