Rename UI: superuser Key row and rename dialog for flows and dashboards (live plan with rewritten documents, counts, refusals and warnings, typed confirmation, what the drain waits for and calling it off); applyRename and the socket's renamed remap the live store and refetch at unchanged URLs, editors whose document moved reload so neither undo nor a queued save restores old bindings, a reconnect checks again and its snapshot replaces values; a retry toast for the rename's 503s, autosaves send themselves again; dashboard saves are based on their own versions only; Playwright rename spec, liveStore check, editor and dashboard docs
This commit is contained in:
@@ -21,6 +21,7 @@ import { apiToken, appPath, appRoute, portalConfig } from "./lib/portal"
|
||||
import { safeStorage } from "./lib/safeStorage"
|
||||
import { registerSW } from "./lib/webpush"
|
||||
import { routeTree } from "./routeTree.gen"
|
||||
import { retryLater } from "./utils"
|
||||
|
||||
const portal = portalConfig()
|
||||
|
||||
@@ -92,7 +93,12 @@ const queryClient = new QueryClient({
|
||||
onSuccess: () => connectionStore.setOnline(),
|
||||
}),
|
||||
mutationCache: new MutationCache({
|
||||
onError: handleApiError,
|
||||
// A rename turns changes away for its duration: one card saying so,
|
||||
// whichever mutation met it. An autosave says it sends itself again.
|
||||
onError: (error, _variables, _context, mutation) => {
|
||||
if (retryLater(error, mutation.meta?.autosave === true)) return
|
||||
handleApiError(error)
|
||||
},
|
||||
}),
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
|
||||
Reference in New Issue
Block a user