fix: address last list table column cut off in TUI - #2285
Conversation
|
Claude Security Review: no high-confidence findings. (run) |
There was a problem hiding this comment.
AgentCore Harness Review
Verdict: Looks good
Small, focused fix: reserve a 1-column gutter on the right of DataTable so the rightmost cell doesn't touch the terminal edge (which was causing wraps on some terminals). The implementation is clean — a single TERMINAL_RIGHT_GUTTER_WIDTH constant threaded through columnWidths.ts and applied at the one place that passes width into computeColumnWidths. Math.max(0, terminalWidth - TERMINAL_RIGHT_GUTTER_WIDTH) correctly handles pathological small widths.
Tests are updated coherently:
- New
DataTable.test.tsxcase asserts the divider is exactlyterminalWidth - TERMINAL_RIGHT_GUTTER_WIDTH. PaginatedTablePicker.test.tsxinvariants updated from== width/<= widthto- 1, and the added2026-07-19 01:02assertion is a nice regression guard that the timestamp column stays visible during resize.
No telemetry needed (layout fix, not a user-facing feature), and tests use real ink rendering rather than mocks. Nothing blocking. LGTM.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## refactor #2285 +/- ##
=========================================
Coverage 97.06% 97.06%
=========================================
Files 569 569
Lines 39322 39324 +2
=========================================
+ Hits 38167 38169 +2
Misses 1155 1155 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Currently, the last column of our TUI is cut off across all our list tables. This commonly is UTC timestamp, resulting in
15:4showing as the last updated time instead of15:45, for example. This is caused by our table items using 100% of the width available, meaning the final column will always be just out of view.The solution introduced in this PR reserves the last column as an empty gutter, meaning that our rendered content will end at
width - 1. This guarantees our final column of content will always render on a visible column.Example
agentcore-> latest RC release installed via npmac-dev-> local dev env built off this PRScreen.Recording.2026-09-11.at.1.41.23.PM.mov
Type of Change
Testing
How have you tested the change?
bun run test(3199 pass, 0 fail)npm run test:unitandnpm run test:integnpm run typechecknpm run lintsrc/assets/, I rannpm run test:update-snapshotsand committed the updated snapshotsChecklist
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.