mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8764] [MERGED] feat(connections): live address and key checks, one structure for the account modals #8789
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8789
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8764
Author: @Gunterlie
Created: 11/3/2026
Status: ✅ Merged
Merged: 11/3/2026
Merged by: @Gunterlie
Base:
staging← Head:feat/connection-live-checks📝 Commits (5)
24986bdfeat(connections): live address and key checks in the account modals85dcadffix(connections): live check says when the server refuses an address, and stops waiting after 10 sc613290fix(i18n): sort the new check key1fd87b4fix(connections): live check review fixes (stale debounce, busy provider, custom key, timeout scope, log level)d359d2efix(connections): trust a model list as a key check only at the provider's default address📊 Changes
9 files changed (+781 additions, -290 deletions)
View changed files
➕
packages/client/src/components/connections/AccessCheck.tsx(+117 -0)📝
packages/client/src/components/connections/ConnectionAccountEditor.tsx(+204 -111)📝
packages/client/src/components/connections/ConnectionBalance.tsx(+39 -32)📝
packages/client/src/components/modals/create-connection/AccessStep.tsx(+125 -90)📝
packages/client/src/components/modals/create-connection/CreateConnectionModalContent.tsx(+64 -32)📝
packages/client/src/components/ui/Modal.tsx(+4 -1)📝
packages/client/src/hooks/use-connections.ts(+58 -0)📝
packages/client/src/localization/locales/en.json(+18 -0)📝
packages/server/src/routes/connections.routes.ts(+152 -24)📄 Description
Linked issue
None. This is planned Connections work agreed with a maintainer from a mockup, so no issue was opened.
Why this change
When you add or edit an account today, you get no feedback until you press Connect or Test. A wrong address or a key with one missing character shows up only after a save or as a big error box. In Edit, Test stays off until the account has a model, and Save sits below the fold.
The two modals also had different structures. The key, address and name were in a different order in each, and the Add modal had two header bars.
What changed
POST /api/connections/checkroute runs model discovery without saving anything. For OpenRouter and NanoGPT, whose model lists are public, it also calls their key endpoint. Unsupported providers (media, subscription sign-in) keep the old manual Test row.accountId, never to the client) only against the saved or default address. A changed address is checked without the key, so a half-typed address never receives it. The route has the Test rate limit and the same SSRF policy as Test.unreachablein the discovery error body), so the check no longer says "The server answered 502" when nothing answered. Only 401 or 403 from a key endpoint counts as a rejected key.Modalgets an optionaltitleSlot.en.json.Validation
pnpm checkpassed locally.tsc --noEmit, ESLint on the changed client files andpnpm localization:checkpassed.http://that Save adds.Object.hasOwn. These three fixes are type-checked; they were not run against a live server.--warning/--destructiveandemerald-500. Red and green carry the meaning of the check here, and about 36 client files already useemerald-500for success. It also noted that model discovery builds its key headers inline; that code is unchanged fromstaging.Manual verification
localhost:1234/v1withouthttp://passes the check.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)No files under
docs/changed.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.