From 6d9107b7270af9e39dd4dd8ba29fed414f09a7d5 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:21:39 +0100 Subject: [PATCH] refactor(base): drop unused schema:bumped socket handler --- .../features/base/hooks/use-base-socket.ts | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/apps/client/src/features/base/hooks/use-base-socket.ts b/apps/client/src/features/base/hooks/use-base-socket.ts index 8813a4c4..fa036a41 100644 --- a/apps/client/src/features/base/hooks/use-base-socket.ts +++ b/apps/client/src/features/base/hooks/use-base-socket.ts @@ -61,12 +61,6 @@ type BaseViewEvent = { viewId?: string; }; -type BaseSchemaBumped = { - operation: "base:schema:bumped"; - baseId: string; - schemaVersion: number; -}; - type BaseInboundEvent = | BaseRowCreated | BaseRowUpdated @@ -74,7 +68,6 @@ type BaseInboundEvent = | BaseRowReordered | BasePropertyEvent | BaseViewEvent - | BaseSchemaBumped | { operation: string; baseId: string }; /* @@ -210,19 +203,13 @@ export function useBaseSocket(baseId: string | undefined): void { case "base:view:created": case "base:view:updated": case "base:view:deleted": { - // Schema/metadata events touch `properties` / `views` on the - // base, not the cell data. The row cache only gets invalidated - // when a `base:schema:bumped` arrives (i.e. cells actually - // migrated) — otherwise a big-base conversion would trigger a - // serial refetch of every cached infinite-query page. + // Schema/metadata events only touch the base's `properties` / + // `views`, not the cell data — so we invalidate just + // `["bases", baseId]` here. Row reconciliation is handled + // per-event by the row cases above. queryClient.invalidateQueries({ queryKey: ["bases", baseId] }); break; } - case "base:schema:bumped": { - queryClient.invalidateQueries({ queryKey: ["bases", baseId] }); - queryClient.invalidateQueries({ queryKey: ["base-rows", baseId] }); - break; - } default: break; }