fix(tables): stop remote cell selections painting over the row gutter - #6310
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Two overlay layers replace a single Reviewed by Cursor Bugbot for commit 1bfc501. Configure here. |
Greptile SummaryThe PR fixes remote table-selection overlays painting over the frozen row gutter and pinned columns.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the current endpoint classification requires both endpoints to resolve as pinned, with unresolved cases falling to the occluded scrolling layer.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/remote-selection-overlay.tsx | Classifies both endpoints with a rendered-column fallback, separates frozen and scrolling overlays, and updates hover and label boundaries; the previously reported partial-virtualization misclassification is fixed. |
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/data-row.tsx | Exposes each rendered cell’s pinned state through a data attribute used by overlay classification. |
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx | Passes the computed frozen-zone edge to the remote-selection overlay. |
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/constants.ts | Documents the frozen checkbox cell’s z-index relationship with the overlay layers. |
Reviews (3): Last reviewed commit: "fix(tables): classify an off-window sele..." | Re-trigger Greptile
fed4689 to
f6826ef
Compare
|
@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 f6826ef. Configure here.
f6826ef to
1bfc501
Compare
|
Pushed 1bfc501 — follow-up on the P1 fix. Requiring both endpoints to resolve was too blunt: rows are virtualized (@tanstack/react-virtual), so a wholly-pinned range whose other endpoint is scrolled out of the window was falling to the scrolling layer and getting occluded by the very pinned column it sits on — visible on staging, hidden after my first fix. Endpoint classification now falls back to the column when the cell itself isn't rendered, since pinning is a per-column property: function endpointIsPinned(scrollEl, cell, columnIndex) {
if (cell !== null) return cell.hasAttribute('data-pinned')
if (columnIndex === undefined) return false
return scrollEl.querySelector(`[data-col="${columnIndex}"][data-pinned]`) !== null
}Full matrix now: both pinned → frozen layer; straddling → scrolling layer (no bleed, your original finding); pinned with an off-window endpoint → frozen layer (visible again); column hidden locally so it can't be classified → scrolling layer (safe direction). The fallback query only runs on the rare unresolved-endpoint path, so the common case costs nothing. |
|
@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 1bfc501. Configure here.
Summary
z-[8], above thez-[6]opaque frozen cellsz-[5](below the frozen cells, so paint order hides them, exactly like the local selection already does), and wholly-pinned ones atz-[8](above, or the pinned cell's own background swallows them)data-pinnedattribute; a range straddling the boundary defers to the frozen zone rather than bleeding over the gutterType of Change
Testing
Typecheck, lint, and the tables test suite pass. Not yet verified in-browser — reproducing needs two live clients.
Checklist