mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #936] [MERGED] fix(chat): allow clearing translation connection via placeholder option #4847
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#4847
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/936
Author: @Romuromylus
Created: 5/17/2026
Status: ✅ Merged
Merged: 5/17/2026
Merged by: @Romuromylus
Base:
staging← Head:fix/935-translation-connection-clear📝 Commits (1)
d45fb9afix(chat): allow clearing translation connection via placeholder option📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+1 -1)📄 Description
Linked issue
Closes #935
Why this change
|| undefined→JSON.stringify-drops-key → server-side spread merge chain that #934 fixed. The translation Connection<select>dispatchedtranslationConnectionId: e.target.value || undefined, so an empty value becameundefined, dropped out of the PATCH body entirely, and the server's{ ...existing, ...incoming }atpackages/server/src/routes/chats.routes.ts:369preserved the old value.What changed
packages/client/src/components/chat/ChatSettingsDrawer.tsx:5000— drop the|| undefined. The<select>'s placeholder option hasvalue="", and the empty string now flows through verbatim. JSON.stringify keeps the key, the server merge overwrites the prior connection, and the cleared state persists.packages/server/src/routes/translate.routes.ts:59(if (!input.connectionId)) treats empty string the same as undefined, so AI translation behavior with no connection bound is identical to before.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
afterSet.translationConnectionId === <connId>).JSON.stringify({translationConnectionId: undefined})which serialized to"{}"and the server PATCH returned 200 but kept the old value (afterClear.translationConnectionId === <connId>still).{"translationConnectionId":""}, the server merge writes"", and a re-fetch confirms the value is cleared (afterClear.translationConnectionId === "").onChange:t=>o.mutate({id:r.id,translationConnectionId:t.target.value})— no||void 0remains.Things I'd appreciate the maintainers double-checking, on the normal install:
Connection ID is required for AI translation) instead of silently using the cleared connection.Docs and release impact
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.