feat(tables): pinned columns#4770
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Users can Pin / Unpin column from the column header and workflow-group context menus (new Pin state is stored in Also removes the header menu’s change column type handler (type changes remain via Edit column / sidebar) and switches the header chevron to the shared emcn icon set. Reviewed by Cursor Bugbot for commit 3dbeeff. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR adds left-side column pinning to the Tables grid, inspired by Clay/Airtable. Pinned columns use
Confidence Score: 5/5Safe to merge — the pinning feature is well-contained, all edge cases in undo/redo are handled, and no regressions to existing column operations were found. The sticky-offset computation is correctly guarded against stale widths via the pinnedWidthsKey fingerprint, the pinned-at-front invariant is enforced in both the drag handler and the undo/redo reorder path, and the metadata persistence mirrors existing patterns. The previously flagged undo issues for delete-column and reorder-columns have been addressed in this PR. No new correctness issues were found. No files require special attention. Important Files Changed
Reviews (9): Last reviewed commit: "fix(tables): re-sort reorder-columns und..." | Re-trigger Greptile |
…e dead handleChangeType
|
@greptile |
|
@cursor review |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6d19730. Configure here.
|
@greptile |
|
@cursor review |
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6526129. Configure here.
|
@greptile |
|
@cursor review |
waleedlatif1
left a comment
There was a problem hiding this comment.
Fixed in 8b40c46. The create-column undo branch now reads current frozen state via getFrozenColumnsRef.current?.(), filters out the undone column name, calls onFrozenColumnsChangeRef.current?.(newFrozen), and batches frozenColumns into the same updateMetadataMutation call alongside columnWidths — consistent with how delete-column redo cleans up frozen state.
|
@cursor review |
|
@greptile |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 8b40c46. Configure here.
|
@greptile |
|
@cursor review |
…mn was not frozen
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 641c031. Configure here.
- rename frozenColumns → pinnedColumns across types, contract, undo actions, grid state/refs/props, and dropdown labels - add Pin / PinOff emcn icons; use them in the column menu in place of Lock / Unlock - pinned body cells render at z-[6], above the cell selection border (z-[5]), so the blue selection border can't draw on top of the sticky-left zone - restrict column drag-reorder to within the pinned or unpinned zone in both handleColumnDragOver and handleScrollDragOver; cross-zone drop indicators are suppressed - on unpin, slide the column to the first unpinned slot so the sticky zone stays contiguous; consolidates pin and unpin into one branch that always re-enforces pinned-at-front Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@greptile review |
- collapse two onPinToggle JSX props that biome wanted on a single line - drop a WHAT comment in handleScrollDragOver; tighten the why-comments in handlePinToggle, handleColumnDragOver, and handleColumnDragEnd so they describe the invariant being protected instead of narrating the recent change Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 23b4466. Configure here.
If the user reordered, then pinned a column, then undid the reorder, the restored snapshot could leave a currently-pinned column in the middle of columnOrder. pinnedOffsets walks displayColumns left→right and assigns sticky `left` from checkboxColWidth — a pinned column in the middle gets a sticky offset as if it were at the front, causing it to jump over its left neighbors on horizontal scroll. Re-sort the restored order with pinned entries pulled to the front before applying. Mirrors the belt-and-suspenders re-sort in handleColumnDragEnd. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
@greptile review |

Summary
position: stickywith computed left offsets stacked after the checkbox columnbox-shadow) on the rightmost frozen column in both header and data rowsTableMetadataviaupdateMetadataMutation; seeded from metadata on loadfrozenColumns?: string[]toTableMetadatatype andtableMetadataSchemaType of Change
Testing
Tested manually
Checklist