feat: AddColumns(TableColumn[]) overload, remove Shrink toggle, fix Grow column rendering#14
Merged
Merged
Conversation
**Bug:** When terminal was narrower than fixed columns + grow column natural width, Grow columns were being forced to MinWidth (default 4) instead of keeping their natural width. This caused branch names like "Cramer-2025-12-22-dev" to truncate to "C..." when they should display full content. **Fix:** 1. Removed forced MinWidth assignment when availableForGrow <= 0 2. Excluded Grow columns from general shrink logic - they keep natural width 3. Added regression test Should_keep_grow_column_natural_width_when_no_remaining_space **Testing:** - All 8 Grow column tests pass - All 23 test suites pass (207+ tests) 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai>
The Shrink property and builder method are removed because shrinking to fit terminal width is the only sensible default. Allowing overflow caused visual corruption and had no legitimate use case. Grow columns now correctly collapse to zero width when fixed columns exhaust all available space. Also adds AddColumns() convenience method to avoid repetitive AddColumn() chains. 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai>
🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai>
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
AddColumns(params TableColumn[])overload toTableBuilderand internalTable— allows passing a pre-configuredTableColumn[]array directly instead of calling.AddColumn()per elementShrinktoggle from public API — shrinking to fit terminal width is now always-on behavior;Shrink(false)never had a useful interactive use case (overflow just wraps uglily)