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) <noreply@anthropic.com>
This commit is contained in:
Guilhem Lemouel
2026-08-19 17:13:16 +02:00
parent 0375c36ca2
commit d71c0dbfac
@@ -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(