refactor(base): drop unused schema:bumped socket handler

This commit is contained in:
Philipinho
2026-04-18 13:21:39 +01:00
parent 5ae49cab49
commit 6d9107b727
@@ -61,12 +61,6 @@ type BaseViewEvent = {
viewId?: string; viewId?: string;
}; };
type BaseSchemaBumped = {
operation: "base:schema:bumped";
baseId: string;
schemaVersion: number;
};
type BaseInboundEvent = type BaseInboundEvent =
| BaseRowCreated | BaseRowCreated
| BaseRowUpdated | BaseRowUpdated
@@ -74,7 +68,6 @@ type BaseInboundEvent =
| BaseRowReordered | BaseRowReordered
| BasePropertyEvent | BasePropertyEvent
| BaseViewEvent | BaseViewEvent
| BaseSchemaBumped
| { operation: string; baseId: string }; | { operation: string; baseId: string };
/* /*
@@ -210,19 +203,13 @@ export function useBaseSocket(baseId: string | undefined): void {
case "base:view:created": case "base:view:created":
case "base:view:updated": case "base:view:updated":
case "base:view:deleted": { case "base:view:deleted": {
// Schema/metadata events touch `properties` / `views` on the // Schema/metadata events only touch the base's `properties` /
// base, not the cell data. The row cache only gets invalidated // `views`, not the cell data — so we invalidate just
// when a `base:schema:bumped` arrives (i.e. cells actually // `["bases", baseId]` here. Row reconciliation is handled
// migrated) — otherwise a big-base conversion would trigger a // per-event by the row cases above.
// serial refetch of every cached infinite-query page.
queryClient.invalidateQueries({ queryKey: ["bases", baseId] }); queryClient.invalidateQueries({ queryKey: ["bases", baseId] });
break; break;
} }
case "base:schema:bumped": {
queryClient.invalidateQueries({ queryKey: ["bases", baseId] });
queryClient.invalidateQueries({ queryKey: ["base-rows", baseId] });
break;
}
default: default:
break; break;
} }