You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e308b6d
Browse filesBrowse the repository at this point in the historyBrowse files
fix(modal): hold a dialog from the input that starts its work
A confirm that fired a mutation and returned `false` relied on the mutation's
`isPending` to hold the dialog, but query-core delivers that on a setTimeout(0).
The confirm's own `pending` had already ended by then, so for several
milliseconds the dialog read idle: an Escape right behind the click dismissed a
running ban, Cancel and Confirm were live, and focus jumped back to the field.
Every dialog passing `pending` to a confirm that starts work now returns that
work's promise, which holds it from the click's own commit.
A refused ban, role change or unban also read as success: better-auth's client
resolves with `{ error }` rather than throwing, so the mutation succeeded and
closed the dialog. They now throw, as impersonation already did.
The e2e check presses Escape right behind the click, past the point Chromium
closes natively, and on the refused ban. It replaces the jsdom test, which stubbed
showModal and close and so proved nothing about the browser.
Copy file name to clipboardExpand all lines: apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/use-connector-actions.ts
+11-6Lines changed: 11 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -121,13 +121,18 @@ export function useConnectorActions({
121
121
pending: remove.isPending,
122
122
disabled: actionsDisabled,
123
123
error: remove.error,
124
-
onConfirm: ()=>{
124
+
/** Settles with the removal, for a dialog to hold on. A refusal stays on `removal.error`. */
0 commit comments