From e1f862967ae5c87a9b0e47ed83e939805e71a071 Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Sun, 24 May 2026 02:27:37 +0100 Subject: [PATCH] feat(base): wire type field through UpdatePropertyInput + restore row invalidation --- .../src/features/base/queries/base-property-query.ts | 10 ++++++++++ apps/client/src/features/base/types/base.types.ts | 1 + 2 files changed, 11 insertions(+) diff --git a/apps/client/src/features/base/queries/base-property-query.ts b/apps/client/src/features/base/queries/base-property-query.ts index ec89396be..39c95731f 100644 --- a/apps/client/src/features/base/queries/base-property-query.ts +++ b/apps/client/src/features/base/queries/base-property-query.ts @@ -62,6 +62,16 @@ export function useUpdatePropertyMutation() { }; }, ); + + // Path 1 (no rewrite) and Path 2 (inline rewrite): the HTTP + // response is the "cells migrated" signal — refetch row pages now. + // Path 3 sets `jobId`; we wait for the `base:schema:bumped` socket + // event instead so we don't churn pages with mid-conversion data. + if (variables.type && !result.jobId) { + queryClient.invalidateQueries({ + queryKey: ["base-rows", variables.pageId], + }); + } }, onError: () => { notifications.show({ diff --git a/apps/client/src/features/base/types/base.types.ts b/apps/client/src/features/base/types/base.types.ts index f351e9f1e..6dc86024a 100644 --- a/apps/client/src/features/base/types/base.types.ts +++ b/apps/client/src/features/base/types/base.types.ts @@ -222,6 +222,7 @@ export type UpdatePropertyInput = { propertyId: string; pageId: string; name?: string; + type?: BasePropertyType; typeOptions?: TypeOptions; requestId?: string; };