Files
sim/apps
WaleedandClaude Opus 4.7 6a927c9cd3 fix(tables): optimistic updates for column delete/update (#4512)
* fix(tables): optimistic updates for column delete/update

Add onMutate/onError to useDeleteColumn and useUpdateColumn so column
deletes feel instant on large tables (no flash-back during the JSONB
rewrite) and concurrent type changes don't race the in-flight delete's
invalidation.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix(tables): toast on delete-column failure, case-insensitive row cleanup, rename row-data keys

Address greptile review:
- useDeleteColumn now toasts on non-validation errors so users see when
  the column "snaps back" after a server/network failure
- Row data cleanup matches keys case-insensitively in both useDeleteColumn
  and useUpdateColumn so a column stored as "Age" is cleaned even when
  the request uses "age"
- useUpdateColumn now migrates row-data keys when updates.name is set,
  preventing blank cells during the server round-trip on a rename

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 20:01:51 -07:00
..