From b998267c91b9dcf02787768f6205cc5aeda494fb Mon Sep 17 00:00:00 2001 From: Diego Imbert <70353967+diegoimbert@users.noreply.github.com> Date: Mon, 31 Aug 2026 18:34:25 +0200 Subject: [PATCH] fix: show a loading indicator while the initial data table migration is generated (#10900) Claude-Session: https://claude.ai/code/session_01R3YQT3BShZ3ivp25yQ6Smd Co-authored-by: Claude Opus 5 (1M context) --- .../workspaceSettings/DataTableMigrationsButton.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/workspaceSettings/DataTableMigrationsButton.svelte b/frontend/src/lib/components/workspaceSettings/DataTableMigrationsButton.svelte index eac0153993..fc9bddcf4e 100644 --- a/frontend/src/lib/components/workspaceSettings/DataTableMigrationsButton.svelte +++ b/frontend/src/lib/components/workspaceSettings/DataTableMigrationsButton.svelte @@ -52,6 +52,8 @@ let loadError = $state(undefined) let loading = $state(false) let busy = $state(false) + // pg_dump can take a while, so the snapshot gets its own flag to spin its button. + let generatingInitial = $state(false) // Only workspace admins and super admins can opt a data table in or out. const canManage = $derived(!!$userStore?.is_admin || !!$superadmin) @@ -280,6 +282,7 @@ }) if (!confirmed) return busy = true + generatingInitial = true try { await WorkspaceService.generateInitialDatatableMigration({ workspace, @@ -291,6 +294,7 @@ sendUserToast(`Failed to generate initial migration: ${e?.body ?? e?.message ?? e}`, true) } finally { busy = false + generatingInitial = false } } @@ -493,12 +497,13 @@
{#if migrations.length === 0}
- No migrations yet + {generatingInitial ? 'Snapshotting current schema…' : 'No migrations yet'}