fix(ui): widen arcade stats bar layout chunk to fit both HUD lines - #397
Merged
Conversation
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
bug-ops
enabled auto-merge (squash)
August 9, 2026 23:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
render_stats_barbuilds a borderedParagraphwith 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_pausedinsrc/ui/render/minigame.rs) allocated onlyConstraint::Length(3), silently clipping the second HUD line at every terminal size.Length(4).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 atsrc/ui/render/minigame.rs:154. Not a regression at 80x24 (verified, and covered by the existingtest_render_playing_key_history_popup_does_not_corrupt_target_panel_bordertest), 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 --checkcargo clippy --all-targets --all-features --workspace -- -D warningscargo nextest run --workspace --all-features --lib --bins(2220/2220 passed)Fixes #393