diff --git a/changelog.d/fixes/12711-batch-delete-click-event.md b/changelog.d/fixes/12711-batch-delete-click-event.md new file mode 100644 index 0000000000..617f97788d --- /dev/null +++ b/changelog.d/fixes/12711-batch-delete-click-event.md @@ -0,0 +1,2 @@ +- **fix(dashboard):** batch-deleting provider keys no longer toasts failure after a successful delete when the confirm button's click event is forwarded as `onAfter` ([#12711](https://github.com/diegosouzapw/OmniRoute/pull/12711)) +- **fix(glm):** drop the extra 16th argument to `createSSETransformStreamWithLogger` that TypeScript rejected (TS2554) and that never reached the TransformStream diff --git a/changelog.d/fixes/reset-aware-model-family.md b/changelog.d/fixes/reset-aware-model-family.md index 75b65e7613..09fa663182 100644 --- a/changelog.d/fixes/reset-aware-model-family.md +++ b/changelog.d/fixes/reset-aware-model-family.md @@ -1 +1 @@ -Keep Antigravity Gemini usable when the same connection's Claude weekly quota is empty; generic quota cache stays per-connection for every other provider. +- Keep Antigravity Gemini usable when the same connection's Claude weekly quota is empty; generic quota cache stays per-connection for every other provider. diff --git a/src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderConnections.ts b/src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderConnections.ts index 8caa9f7aac..6ae2dfe5c8 100644 --- a/src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderConnections.ts +++ b/src/app/(dashboard)/dashboard/providers/[id]/hooks/useProviderConnections.ts @@ -248,7 +248,7 @@ export interface UseProviderConnectionsReturn { export function useProviderConnections( providerId: string, isCompatible: boolean, - isSearchProvider: boolean + _isSearchProvider: boolean ): UseProviderConnectionsReturn { const t = useTranslations("providers"); const notify = useNotificationStore(); @@ -844,7 +844,8 @@ export function useProviderConnections( setSelectedIds(new Set()); await fetchConnections(); notify.success(t("batchDeleteSuccess", { count })); - if (onAfter) await onAfter(); + // ConfirmModal's onClick forwards a MouseEvent; only a real callback runs. + if (typeof onAfter === "function") await onAfter(); } else { const data = await res.json(); notify.error(data.error || providerText(t, "batchDeleteFailed", "Batch delete failed")); diff --git a/src/shared/components/Modal.tsx b/src/shared/components/Modal.tsx index 8ecf9bb87b..3617d7d73f 100644 --- a/src/shared/components/Modal.tsx +++ b/src/shared/components/Modal.tsx @@ -275,7 +275,7 @@ export function ConfirmModal({ - diff --git a/stryker.conf.json b/stryker.conf.json index c8ff964e77..e28a90fa06 100644 --- a/stryker.conf.json +++ b/stryker.conf.json @@ -349,6 +349,7 @@ "tests/unit/repro-antigravity-404-family-cooldown-hijack.test.ts", "tests/unit/repro-combo-persisted-cooldown-preskip.test.ts", "tests/unit/repro-glm-iso-reset-24h-cap.test.ts", + "tests/unit/reset-aware-request-scope-12600.test.ts", "tests/unit/resilience-connections.test.ts", "tests/unit/responses-handler.test.ts", "tests/unit/responses-passthrough-openai-compatible.test.ts", diff --git a/tests/unit/ui/batch-delete-click-event.test.tsx b/tests/unit/ui/batch-delete-click-event.test.tsx new file mode 100644 index 0000000000..d599dbc605 --- /dev/null +++ b/tests/unit/ui/batch-delete-click-event.test.tsx @@ -0,0 +1,159 @@ +// @vitest-environment jsdom +/** + * ConfirmModal wires onConfirm to