Skip to content

fix(ui): widen arcade stats bar layout chunk to fit both HUD lines - #397

Merged
bug-ops merged 1 commit into
mainfrom
fix/393-arcade-stats-bar-clipped
Aug 9, 2026
Merged

fix(ui): widen arcade stats bar layout chunk to fit both HUD lines#397
bug-ops merged 1 commit into
mainfrom
fix/393-arcade-stats-bar-clipped

Conversation

@bug-ops

@bug-ops bug-ops commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • render_stats_bar builds a bordered Paragraph with 2 content lines (SCORE/LIVES/MULT/grace, and COMBO/STREAK/level/BEST), which needs height 4 (1 top border + 2 content + 1 bottom border). All 3 call sites (render_countdown, render_playing, render_paused in src/ui/render/minigame.rs) allocated only Constraint::Length(3), silently clipping the second HUD line at every terminal size.
  • Widened all 3 to Length(4).
  • Added a regression test per screen, asserting COMBO/STREAK/BEST content is actually present in the rendered buffer (not just "doesn't panic").
  • Live-verified via tmux (130x45, cargo run --no-default-features): both HUD lines now render correctly in Arcade Playing.

Note on layout slack

At the documented 80x24 minimum terminal size, render_playing's fixed chunks now total 13 rows (3+3+3+4), which leaves the key-history popup's visibility check passing with exactly zero margin (previously 1 row of slack) — see the comment added at src/ui/render/minigame.rs:154. Not a regression at 80x24 (verified, and covered by the existing test_render_playing_key_history_popup_does_not_corrupt_target_panel_border test), but this repo has hit this exact boundary before (#292, #385/#388) — flagging so future changes to this layout re-check the math before growing any other fixed chunk in it.

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --all-targets --all-features --workspace -- -D warnings
  • cargo nextest run --workspace --all-features --lib --bins (2220/2220 passed)
  • Live tmux repro re-verified: both HUD lines render, no clipping, no border corruption

Fixes #393

render_stats_bar builds a bordered Paragraph with 2 content lines
(stats_line: SCORE/LIVES/MULT/grace; stats_line2: COMBO/STREAK/level/
BEST), which needs height 4 (1 top border + 2 content + 1 bottom
border). The countdown, playing, and paused screens all allocated
Constraint::Length(3) for that chunk, leaving only 1 usable inner row
and silently clipping stats_line2 at every terminal size.

All 3 call sites now allocate Length(4). Adds a regression test per
screen asserting the second line's content is actually present in the
rendered buffer.

Fixes #393
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation ui User interface components and removed bug Something isn't working labels Aug 9, 2026
@bug-ops
bug-ops enabled auto-merge (squash) August 9, 2026 23:31
@bug-ops
bug-ops merged commit f7bf0fe into main Aug 9, 2026
20 checks passed
@bug-ops
bug-ops deleted the fix/393-arcade-stats-bar-clipped branch August 9, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ui User interface components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Arcade stats bar's second HUD line (STREAK/COMBO/level/BEST) is always clipped and never visible

1 participant