Repository navigation
feat(tui): use spare width before packing columns; drop [*] marker (T18) - #92
Merged
Merged
Conversation
The column width calculator never knew the table width, so Balanced packing squeezed long headers (e.g. data/shapes.csv) to ~1.5x their data width while most of the screen sat empty. The calculator now gets a width budget from update_terminal_size; after mode-based packing, leftover space goes to truncated columns, smallest shortfall first. Tables that already overflow keep the packed layout. The sorted column's header width now includes its arrow suffix. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The marker cost header width the calculator never budgeted for, so it usually rendered as a stray '['. The selected column is already shown by yellow underlined styling. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
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
data/shapes.csv(long names over 1–4 character values) Balanced mode squeezed every header while more than 60% of the screen sat empty.update_terminal_sizenow gives the calculator a width budget. After mode-based packing,expand_into_spare_widthgives leftover space to truncated columns, smallest shortfall first, which completes as many columns as possible. Tables that already overflow keep the packed layout. This replaces the oldcalculate_with_terminal_widthcode, which widened columns to at most 15.↑/↓arrow (SORT_INDICATOR_WIDTH).[*]selected-column marker. It was never budgeted for, so it usually showed as a stray[. The selected column is already yellow and underlined.docs/TUI_FEATURES.md. The unbudgeted📌pin prefix is recorded there as a loose end.Test plan
cargo test: 834 lib and 501 integration tests passdata/shapes.csv🤖 Generated with Claude Code