Skip to content

fix(tui): render a single over-wide column instead of a blank table#82

Merged
balwierz merged 1 commit into
mainfrom
fix/wide-column-blank-table
Jul 10, 2026
Merged

fix(tui): render a single over-wide column instead of a blank table#82
balwierz merged 1 commit into
mainfrom
fix/wide-column-blank-table

Conversation

@balwierz

Copy link
Copy Markdown
Owner

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

  • New 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.
  • Proven end-to-end: blank before the fix (frame-nonblank: False), populated after (True).
  • Suite 375; CI (incl. the ASan/UBSan gate) should stay green.

🤖 Generated with Claude Code

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>
@balwierz
balwierz merged commit 171b02f into main Jul 10, 2026
3 checks passed
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