From 7da695157337f21030db7e0b235061db3b6e0067 Mon Sep 17 00:00:00 2001 From: Jan Leon Date: Tue, 29 Sep 2026 21:22:22 +0200 Subject: [PATCH 01/10] feat: send manual account test messages and fit quota actions --- .../[id]/components/ConnectionRow.tsx | 6 + .../dashboard/settings/ai/page.tsx | 2 + .../components/ConnectionTestSettings.tsx | 93 ++++++++ .../components/ProviderLimits/QuotaCard.tsx | 1 + .../parts/QuotaCardExpanded.tsx | 77 ++++--- .../ProviderLimits/parts/QuotaCardHeader.tsx | 9 + .../api/providers/[id]/test-message/route.ts | 120 ++++++++++ src/i18n/messages/de.json | 22 +- src/i18n/messages/en.json | 22 +- src/lib/api/modelTestRunner.ts | 16 ++ .../components/ConnectionTestButton.tsx | 217 ++++++++++++++++++ src/shared/constants/connectionTest.ts | 3 + src/shared/validation/settingsSchemas.ts | 2 + tests/helpers/assertQuotaCardLayout.cjs | 61 +++++ tests/unit/connection-test-message.test.ts | 213 +++++++++++++++++ .../unit/ui/connection-test-message.test.tsx | 200 ++++++++++++++++ 16 files changed, 1025 insertions(+), 39 deletions(-) create mode 100644 src/app/(dashboard)/dashboard/settings/components/ConnectionTestSettings.tsx create mode 100644 src/app/api/providers/[id]/test-message/route.ts create mode 100644 src/shared/components/ConnectionTestButton.tsx create mode 100644 src/shared/constants/connectionTest.ts create mode 100644 tests/helpers/assertQuotaCardLayout.cjs create mode 100644 tests/unit/connection-test-message.test.ts create mode 100644 tests/unit/ui/connection-test-message.test.tsx diff --git a/src/app/(dashboard)/dashboard/providers/[id]/components/ConnectionRow.tsx b/src/app/(dashboard)/dashboard/providers/[id]/components/ConnectionRow.tsx index a6e6f3ec31e9..181f8533c958 100644 --- a/src/app/(dashboard)/dashboard/providers/[id]/components/ConnectionRow.tsx +++ b/src/app/(dashboard)/dashboard/providers/[id]/components/ConnectionRow.tsx @@ -1,5 +1,7 @@ "use client"; +import ConnectionTestButton from "@/shared/components/ConnectionTestButton"; + // Phase 1d extraction — Issue #3501 // ConnectionRow (and its local helpers CooldownTimer, inferErrorType, // getStatusPresentation) moved out of ProviderDetailPageClient.tsx. @@ -850,6 +852,10 @@ export default function ConnectionRow({
+