Merged
Conversation
Incoming transactions with set-config column updates only touched cell.config.column metadata, leaving the MultiColumn tree unchanged so boundary-anchor transactions never actually reorganized cells across columns on the replica. Sort set-config changes last and dispatch a new rebuildCellColumns action that regroups cells via MultiColumn.fromIdsAndColumns using the reorder-cells flat order.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds proper column-layout synchronization for marimo-pair replicas by ensuring incoming set-config column metadata updates are reflected in the MultiColumn tree (so cells physically move across columns, not just update metadata).
Changes:
- Sort incoming transaction changes so
set-configis applied after structural changes, then trigger a column-tree rebuild when column metadata changed. - Add a
rebuildCellColumnsreducer action that reconstructsMultiColumnfrom the flat order + each cell’sconfig.column. - Add targeted reducer and transaction-application tests covering boundary-anchor column conventions and ordering edge cases.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/core/cells/document-changes.ts | Sorts set-config last during transaction application and dispatches rebuildCellColumns when column metadata changes. |
| frontend/src/core/cells/cells.ts | Introduces rebuildCellColumns reducer action to rebuild the MultiColumn tree from config.column. |
| frontend/src/core/cells/tests/cells.test.ts | Adds reducer-level tests for rebuildCellColumns behavior. |
| frontend/src/core/cells/tests/apply-transaction.test.ts | Adds transaction-level tests verifying column rebuild behavior for boundary-anchor conventions and ordering variants. |
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.
Incoming transactions with set-config column updates only touched
cell.config.column metadata, leaving the MultiColumn tree unchanged
so boundary-anchor transactions never actually reorganized cells
across columns on the replica. Sort set-config changes last and
dispatch a new rebuildCellColumns action that regroups cells via
MultiColumn.fromIdsAndColumns using the reorder-cells flat order.
My smoke test: