From d71c0dbfacc1cbf0b21bf735d3fd8752ab20178c Mon Sep 17 00:00:00 2001 From: Guilhem Lemouel Date: Wed, 19 Aug 2026 17:13:16 +0200 Subject: [PATCH] fix(frontend): let a run reuse the name of a row it could not take back out `removeRow` reports `kept` when the undo cannot reach the server, so the row this run wrote stays in the workspace config and comes back in `existingNames`. The client-side name check then refused the retry on the run's own name, with no way forward but a rename. The instance database name has carried the same exemption since it was written; this is the data table name catching up. Co-Authored-By: Claude Opus 5 (1M context) --- .../workspaceSettings/AddDataTableWizard.svelte | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/workspaceSettings/AddDataTableWizard.svelte b/frontend/src/lib/components/workspaceSettings/AddDataTableWizard.svelte index 54d1b74ec9..e600730c36 100644 --- a/frontend/src/lib/components/workspaceSettings/AddDataTableWizard.svelte +++ b/frontend/src/lib/components/workspaceSettings/AddDataTableWizard.svelte @@ -184,7 +184,15 @@ return list.length ? `f/${list[0]}` : `u/${$userStore?.username ?? 'admin'}` } - let nameError = $derived(datatableNameError(wiz.review.name, existingNames)) + // A row this run wrote and could not take back out is still its own: `removeRow` reports + // `kept` when the undo cannot reach the server, and counting that name as taken refuses the + // retry on the one name the user has every right to reuse. + let nameError = $derived( + datatableNameError( + wiz.review.name, + existingNames.filter((n) => n !== claimedName) + ) + ) // Every database on the instance, not just the data table ones: the name has to be free // in PostgreSQL, and a collision with a database created for something else still fails. let instanceNameError = $derived(