fix(terminal): use max line width for multiline table cells#1192
fix(terminal): use max line width for multiline table cells#1192zcutlip wants to merge 1 commit into
Conversation
- The Models column used visible_width_sum (sum of all lines) instead of visible_width_max_line (widest single line) - This caused columns with multiline cells to be far wider than necessary - Remove the special-cased column-index-1 logic and use uniform visible_width_max_line for all columns - Remove the now-unused visible_width_sum function from width.rs - Update snapshot to reflect narrower Models column
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThis PR fixes column width calculation in ChangesColumn width calculation for multiline cells
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Addresses #1168
visible_width_sum(sum of all lines) instead ofvisible_width_max_line(widest single line)visible_width_max_linefor all columnsvisible_width_sumfunction fromwidth.rsand incorrect behavior
Summary by cubic
Fixes table column sizing for multiline cells by using the widest line instead of the sum of line widths. This prevents overly wide columns (notably “Models”) and improves readability.
visible_width_max_linefor headers and cells in all columns.visible_width_sumfromwidth.rs.Written for commit 4e4b28b. Summary will update on new commits.
Summary by CodeRabbit
Bug Fixes
Tests