mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #4167] [MERGED] fix(chat): prefill default connection on new chats + label wizard connection select #6265
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#6265
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/4167
Author: @Gunterlie
Created: 7/27/2026
Status: ✅ Merged
Merged: 7/27/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/new-chat-default-connection📝 Commits (5)
2145c67fix(chat): seed default connection on new chats and label wizard connection select91c18a0Merge branch 'staging' into fix/new-chat-default-connection9299cbffix(chat): associate roleplay wizard connection label with its select967bf33Merge branch 'fix/new-chat-default-connection' of https://github.com/Gunterlie/Marinara-Engine into fix/new-chat-default-connection1144eb9Merge branch 'staging' into fix/new-chat-default-connection📊 Changes
3 files changed (+31 additions, -16 deletions)
View changed files
📝
packages/client/src/components/chat/ChatSetupWizard.tsx(+21 -14)📝
packages/client/src/components/chat/NewChatConnectionGate.tsx(+4 -2)📝
packages/server/src/routes/chats.routes.ts(+6 -0)📄 Description
Why
With a Main Default and a Fallback connection configured in the Connections tab, clicking New Chat (from either the Characters or Chats menu) opens the setup wizard with the Connection field empty. The dropdown also had no field label, unlike every other field in that step.
It looked like a config mistake but it isn't:
connectionIdonly from a starred chat preset —useStartChatFromCharacter(use-start-chat-from-character.ts:48),ChatSidebar.tsx:622,HomeNewChatLauncher.tsx:38. With no starred preset,connectionIdisundefined.chat.connectionIdstayednulland the wizard rendered "None".connections.getDefault()at request time (chats.routes.ts:1165). The fallback connection is only for post-failure retry, so it was never going to appear here.NewChatConnectionGatedid prefill, but withconnectionRows[0]— first in the list, not the user's default. A third inconsistency.What changed
packages/server/src/routes/chats.routes.ts—POST /chatsseedsconnectionIdfromconnections.getDefault()when the client omits it. Fixing it here means all four callers agree instead of patching each one.packages/client/src/components/chat/ChatSetupWizard.tsx— added the missing<label>wrapper on the roleplay step's connection<select>(the conversation step already had one). Also an a11y gap: the control had no accessible name.packages/client/src/components/chat/NewChatConnectionGate.tsx— prefill the default connection rather than the first row. NoteisDefaultarrives as the string"true"/"false"over the wire, so this compares explicitly instead of testing truthiness.No schema change, no migration. Existing chats are untouched — this only affects newly created ones.
Validation
pnpm checkpnpm version:check(not expected to be relevant — no version-bearing files touched)Test plan
NewChatConnectionGatestill shows the "No connections found" empty state and that creating a chat after adding one works.POST /chats) and manually verify an imported chat's connection is not unexpectedly overwritten.Notes
There is no linked issue for this — one should be opened before this PR leaves draft, per
CONTRIBUTING.md § Before You Open a Pull Request.No user-facing docs under
docs/changed, so nodocs-i18nfollow-up is needed. The one new UI string reuses the existingui.chat.conversationquicksetup.connectionkey, so no new locale entries.Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.