mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #362] [MERGED] fix(connections): clear API key when switching to Claude (Subscription) #4577
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#4577
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/362
Author: @LukaTheHero
Created: 5/3/2026
Status: ✅ Merged
Merged: 5/3/2026
Merged by: @LukaTheHero
Base:
main← Head:fix/claude-subscription-clear-api-key📝 Commits (1)
ddc4795fix(connections): clear API key when switching to Claude (Subscription)📊 Changes
1 file changed (+6 additions, -0 deletions)
View changed files
📝
packages/client/src/components/connections/ConnectionEditor.tsx(+6 -0)📄 Description
Summary
Reported by SILCORE (Discord, v1.5.6, WSL2 Ubuntu 24.04 / Windows 11):
Reproduction
abc123)Root cause
In
ConnectionEditor.tsx, the provider buttononClickalready auto-fills the base URL and clears the model when switching providers, but it never toucheslocalApiKey. The<input>for API key getsdisabledforclaude_subscription, which hides the value visually but the React state still holds whatever was typed. On save,if (localApiKey) payload.apiKey = localApiKeyships the leftover string to the server, and Test Message saves first if dirty — so the stale key is what gets used.Fix
When the switched-to provider is
claude_subscription, also callsetLocalApiKey(""). Matches the reporter's expected behavior: empty the field before locking + hiding it. No server-side changes needed; the existing payload guard skipsapiKeywhen it is falsy.Files changed
packages/client/src/components/connections/ConnectionEditor.tsx— 6 lines, inside the provider buttononClick.Test plan (manual — please verify)
abc123-> switch to Claude (Subscription) -> API Key field shows empty (still locked) -> Send Test Message succeedsSummary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.