fix(tables): re-check the find match at the reveal, not just before paging - #6750
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview This PR centralizes membership in Reviewed by Cursor Bugbot for commit d91a700. Configure here. |
Greptile SummaryThis follow-up closes the remaining race between queueing and applying a table-find reveal.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains in the previously reported table-find reveal race.
|
| Filename | Overview |
|---|---|
| apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx | Adds the final stale-match gate to the deferred reveal effect and conditionally releases cursor state only when that reveal still owns it. |
Reviews (2): Last reviewed commit: "fix(tables): only release the find curso..." | Re-trigger 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 d91a700. Configure here.
Summary
Follow-up to #6733, which merged while the last review round was still in flight — this is the one fix from that round that didn't make it in.
#6733 added a guard in
goToMatchso a match removed while its row was paging isn't revealed. Greptile's next round pointed out one more window: betweengoToMatchqueueing the reveal and the reveal effect running is another commit, and a refetch there can remove the match after the guard has already passed.isStillAMatch(match)and applies it at the reveal too — the one place the selection actually moves.activeMatchRefnulled,cursorIsOnMatchReffalse), so the next step lands on the clamped replacement instead of skipping it.Without this, a row write or SSE update landing in that window selects a cell that no longer matches and marks the cursor as sitting on a result.
Type of Change
Testing
bun run lint:check,bun run check:audits(27 audits), 1313 table tests — all pass on top of currentstaging.goToMatch, and the reveal effect).Checklist