fix(multiselect): clear wrapped rows when redrawing - #192
Conversation
|
Warning Review limit reached
Next review available in: 54 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR makes MultiSelect redraws account for physical terminal rows.
Confidence Score: 5/5The PR appears safe to merge, with no actionable defects identified in the changed redraw or test-helper behavior. MultiSelect now clears the previously measured physical frame before rendering, matching sibling widget behavior, while the shared replay helper preserves the existing Unix TTY newline model. Important Files Changed
Reviews (1): Last reviewed commit: "fix(multiselect): clear wrapped rows whe..." | Re-trigger Greptile |
Summary
MultiSelect's logical-line repositioning with physical-row-aware clear-and-redraw behaviorrendered_heightcalculation introduced for the other prompt widgetsRoot cause
MultiSelectcountedoutput.lines()and repositioned/cleared one row per logical line. When an option or help footer exceeded the terminal width, it occupied multiple physical rows. Subsequent keypresses left those extra rows behind and drew the next frame below them, stacking repeated copies of the prompt.This is the
MultiSelectcounterpart to #190, which deliberately left this widget for a follow-up because its line-by-line redraw path needed separate handling. It was reported through jdx/mise discussion #11326 inmise up --interactive.User impact
Interactive multi-select prompts remain stable in narrow terminals and with long option labels. Filtering or otherwise shrinking the frame also clears rows previously occupied by wrapped content.
Validation
cargo fmt --checkcargo test --lib(41 passed)cargo clippy --all-targets -- -D warningsThis PR was generated by an AI coding assistant.
Note
Low Risk
Terminal UI redraw logic only; behavior aligns with existing Select/height helpers and is covered by vt100 regression tests.
Overview
MultiSelect no longer redraws by moving the cursor up one row per logical line. Each keypress now clears the previous frame using physical terminal height (via shared
rendered_height), then writes the new output—matching Select and fixing stacked duplicate prompts when options wrap in narrow terminals.The old
reposition_and_writepath andlast_line_counttracking are removed in favor ofredraw+height. Unix terminal tests use a sharedreplayhelper so vt100 replay applies ONLCR (\n→\r\n), and regression coverage adds wrapped-option and shrinking-frame cases for MultiSelect.Reviewed by Cursor Bugbot for commit 19c0848. Bugbot is set up for automated code reviews on this repo. Configure here.