Skip to content

fix(ui/tree): no fingerer-ring bleed at the bottom of the modal#29

Merged
flipbit03 merged 1 commit into
mainfrom
fix/tree-modal-bleed
May 16, 2026
Merged

fix(ui/tree): no fingerer-ring bleed at the bottom of the modal#29
flipbit03 merged 1 commit into
mainfrom
fix/tree-modal-bleed

Conversation

@flipbit03
Copy link
Copy Markdown
Owner

Summary

The tree modal hardcoded HELP_BAR_HEIGHT = 2 and shrunk its own rect to area.height - 2, but the help bar actually uses wrapped_height(help_text, …) which is 1 on wide-enough terminals where the help text fits in a single row. When that happens, the modal stops 2 rows from the bottom but the help bar only paints the last 1 — leaving a one-row strip where the biscuit + orbiting fingerers underneath show through.

Fix: pass the live help_height from ui::mod.rs into tree::draw so the modal hugs exactly the row above the actual help bar. The hardcoded constant goes away.

Reproduction (pre-fix)

Run at a wide terminal (≥ ~145 columns wide) where the help text fits on one line, with many owned fingerers so the orbital ring extends to the bottom of the play area. Open the tree (t). The bottom row of the orbit (Index Finger >>, Whole Hand [], Latex Glove <> glyphs etc.) is visible just above the help bar.

Test plan

  • Open tree at 220x40 with ~40 owned of every tier — no fingerer glyphs visible between the info pane and the help bar.
  • Open tree at 160x50 (narrower, help wraps to 2 rows) — no regression, same coverage as before.
  • All previous tests still pass: cargo test, cargo clippy --all-targets -- -D warnings, cargo fmt --check.

The tree modal subtracted a hardcoded `HELP_BAR_HEIGHT = 2` from the
frame height, but `ui::mod.rs` reserves `wrapped_height(help_text, …)`
rows for the help bar — which is `1` on wide-enough terminals. When
help fit in a single row, the modal stopped 2 rows from the bottom and
the bottom-most row of the biscuit (its surrounding fingerers) showed
through underneath the modal.

Pass the live `help_height` from `ui::mod.rs` down to `tree::draw` so
the modal hugs exactly the row above the help bar. The hardcoded
constant goes away.
@flipbit03 flipbit03 merged commit 8ac441a into main May 16, 2026
14 checks passed
@flipbit03 flipbit03 deleted the fix/tree-modal-bleed branch May 16, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant