Repository navigation
fix(table): ignore extra cells when rendering rows - #1092
Merged
andrinoff merged 1 commit intoNov 18, 2026
Merged
Conversation
Stop rendering at the configured column count so extra cells don't cause a panic. Keep the full row data intact. Add positive, negative, and regression tests for normal rows, preserved data, extra cells, and rows without columns.
andrinoff
approved these changes
Nov 18, 2026
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.
Stop rendering at the configured column count so extra cells don't cause a panic. Keep the full row data intact.
Add positive, negative, and regression tests for normal rows, preserved data, extra cells, and rows without columns.
CONTRIBUTING.md.fix(table): ignore row cells beyond the configured columns
Rendering a row with more cells than columns indexes beyond the columns slice. Stop at the configured column count. Regressions exercise construction and updates through the row/column APIs.
The component tests fail on unpatched main and pass with this fix. The component test and vet checks pass on Go 1.27.4, macOS arm64.
Open #772 and #617 propose broader table replacements; #1003, #1054, #1064 and #1080 address cursor/viewport behavior. This guard only ignores cells beyond the configured columns while rendering, retaining the original row data.
Separate tests cover positive behavior (
TestRenderRowConfiguredColumns), negative controls (TestRenderRowDoesNotDiscardExtraData), and the regression (TestModel_RenderRow_MoreCellsThanColumns). A representative regression fails on unchanged main and passes with the fix. The positive control passes on main; a deliberate break is also caught by the negative test.Validation on owner main
1deada954e6e, Go 1.26.10:-count=1 -cpu=1,4), plus 20 focused race repetitions.Cross-target binaries were compiled rather than executed. These are local results; remote CI remains to be confirmed.
disclosure: i am working on my own harness, i use claude, i found a bunch of these while working on that code. i root caused them with claude, claude wrote the fix (this is very tiny, it'sbasically one line). i reviewed it, i asked codex to review it, and kimi looked cross at me acrossthe kitchen table.please lmkif you have questions, i'm tres responsive on github.