fix(tables): eliminate checkbox flicker on rapid cell toggle#4592
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
PR SummaryMedium Risk Overview Row update hooks now use a dedicated Row data invalidation in both Reviewed by Cursor Bugbot for commit 944d7dd. Configure here. |
5bc1350 to
10ec81d
Compare
Greptile SummaryThis PR fixes checkbox flicker on rapid cell toggles by switching from blanket query invalidation on every mutation settlement to a targeted cache-patch strategy. It introduces a shared
Confidence Score: 5/5Safe to merge — the change correctly narrows cache invalidation and adds server-confirmed patching without breaking the rollback or reconciliation paths. The await cancelQueries fix prevents in-flight refetches from clobbering optimistic updates. The onSuccess merge only touches the keys that were mutated in the request, so concurrent optimistic updates are preserved. The shared mutationKey plus isMutating === 1 guard correctly defers the reconciliation refetch until the burst completes, and onSettled still fires on error so rollback plus eventual refetch both work. No files require special attention; the only file changed is apps/sim/hooks/queries/tables.ts. Important Files Changed
Reviews (4): Last reviewed commit: "fix(tables): merge only mutated keys in ..." | Re-trigger Greptile |
|
@greptile |
|
@cursor review |
|
@greptile |
|
@cursor review |
…ent optimistic patches
|
@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 944d7dd. Configure here.
Summary
useUpdateTableRowinstead of blanket-invalidating, so rapid keyboard toggles no longer get clobbered by a stale refetchuseBatchUpdateTableRowsinvalidation withisMutating({ mutationKey }) === 1so only the final mutation in a burst refetchestableKeys.rowWritesmutation key +await cancelQueriesinonMutateType of Change
Testing
Tested manually — rapid Enter+ArrowUp toggling no longer flashes previously-checked rows.
Checklist