Conversation
## Summary When a table has more columns than `max_columns` (default 50), column clamping would exclude the `_marimo_row_id` column from the data sent to the frontend. Without this column, the frontend falls back to positional indices for row identification, which breaks selection after filtering — selecting a row returns data from the wrong row. ## Fix Always include `_marimo_row_id` in the selected columns when clamping, so the frontend can use stable row IDs for correct selection regardless of column count.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a critical bug where selecting rows in a filtered table with more than 50 columns would return data from the wrong rows. The root cause was that column clamping excluded the _marimo_row_id column, forcing the frontend to fall back to positional indices which broke after filtering.
Changes:
- Always include
_marimo_row_idin clamped column selection when the table has stable row IDs - Update existing tests to expect
max_columns + 1columns (accounting for_marimo_row_id) - Add comprehensive regression test that verifies selection works correctly with clamped columns and filtering
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| marimo/_plugins/ui/_impl/table.py | Modified column clamping logic to always include _marimo_row_id when present, ensuring frontend can use stable row IDs for selection |
| tests/_plugins/ui/_impl/test_table.py | Updated existing column clamping tests to account for _marimo_row_id column and added regression test verifying selection works correctly with clamped columns and filtering |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Light2Dark
approved these changes
Jan 29, 2026
|
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.19.7-dev40 |
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.
Closes #8029
When a table has more columns than
max_columns(default 50), columnclamping would exclude the
_marimo_row_idcolumn from the data sentto the frontend. Without this column, the frontend falls back to
positional indices for row identification, which breaks selection after
filtering — selecting a row returns data from the wrong row.
Fix
Always include
_marimo_row_idin the selected columns when clamping,so the frontend can use stable row IDs for correct selection regardless
of column count.