fix(tui): render a single over-wide column instead of a blank table#82
Merged
Conversation
When the first (or only) visible column was wider than the terminal, the column-fitting loop in visible_cols() broke on its first candidate, leaving the visible set empty — so the TUI drew nothing for a perfectly valid file. If nothing fits, force-emit the first visible column clamped to the remaining width, so there is always content on screen (the cells/header render truncated, as they already do for any column narrower than its content). pty regression test tui_wide_column_check.py drives the TUI at 20 columns on a 40-char-wide single column and asserts the frame carries the column's data; verified it is blank before the fix and populated after. Suite 375. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
A Tier-3 correctness fix from the audit. When the first (or only) visible column was wider than the terminal,
visible_cols()'s fitting loop broke on its first candidate (x + w + 2 > scr_c_), leaving the visible set empty — so the interactive TUI drew nothing for a perfectly valid file (e.g. one column with a long name, or a wide cell under a large-w, in a narrow terminal).Now, if nothing fits, vv force-emits the first visible column clamped to the remaining width, so there's always content — the header/cells render truncated, exactly as they already do for any column narrower than its content.
Verification
tui_wide_column_check.pydrives the TUI at 20 columns on a 40-char-wide single column and asserts the frame carries the column's data.frame-nonblank: False), populated after (True).🤖 Generated with Claude Code