mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3322] [Issue]: Roleplay wizard 'Use Settings Presets' shortcut never adds the character's first message #1801
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#1801
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?
Originally created by @koolara on GitHub (Jul 7, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3322
Originally assigned to: @SpicyMarinara on GitHub.
What happens
When creating a new Roleplay chat through the setup wizard using the "Use Settings Presets" shortcut (Quick Setup → pick chat preset + persona + characters → Apply & Start), the character's first message (
first_mes) and alternate greetings are never added to the chat. The chat opens containing only the "X has joined the chat" system notice.The regular step-by-step wizard path (Name & Connection → … → Start) works correctly.
Root cause
In
packages/client/src/components/chat/ChatSetupWizard.tsx, the shortcut path finishes viahandleShortcutApply, which only applies the chat-settings preset and callsonFinish(). UnlikefinishWizard, it never callscreateInitialGreetingForCharacterfor the selected characters, so no greeting message is created.Both greeting-injection paths also swallow errors silently (empty
catch {}), so nothing surfaces to the user when this happens.Steps to reproduce
first_mes.Expected
The selected character's
first_mesis posted as the opening assistant message, with alternate greetings available as swipes — same as the full wizard path.Proposed fix
In
handleShortcutApply, after applying the preset, seed greetings for the chat characters the same wayfinishWizarddoes — guarded so it only runs when the chat has no non-system messages yet, because the character-card quick start (use-start-chat-from-character.ts) injects the greeting itself before opening the wizard in shortcut mode (otherwise the greeting would be duplicated).A working patch exists locally (validated with
pnpm check; bug and fix path reproduced via browser automation). PR tostagingto follow.Environment
@SpicyMarinara commented on GitHub (Jul 7, 2026):
Extra comment:
Yes, environment is in the issue (Marinara Engine v2.1.0, Windows 11, local install), but I don't think it's device-specific — it only reproduces on one specific path through the wizard, so you may have tested the other one.
The step-by-step wizard works fine (Name & Connection → … → Start on the last step — that path calls the greeting seeding). The bug is only in the Quick Setup shortcut:
RP tab → New Roleplay
In the wizard click "Use Settings Presets" (the secondary button at the bottom)
Pick a chat preset + a character that has a first_mes
Click "Apply $ Start"
The chat opens with only the "X has joined the chat" system notice, no greeting. Nothing surfaces in the UI because the greeting injection failures are swallowed silently.
Claude:
Cause in code: the shortcut path finishes via handleShortcutApply in packages/client/src/components/chat/ChatSetupWizard.tsx, which applies the preset and calls onFinish() but never calls createInitialGreetingForCharacter, unlike finishWizard. So it reproduces 100% on any machine as long as you exit the wizard through "Apply & Start".
@SpicyMarinara commented on GitHub (Jul 7, 2026):
Codex is picking this up for the v2.1.1 issue sweep in draft PR #3331.
@SpicyMarinara commented on GitHub (Jul 7, 2026):
Fixed in PR #3331 and merged to staging for v2.1.1. Thank you for the report.
@kolacheee commented on GitHub (Jul 8, 2026):
Still reproduces on current
main. The v2.1.1 fix wired upseedInitialGreetingsIfEmpty()inhandleShortcutApply, but its guard checks the total message count (/chats/:id/message-count→countMessages, no role filter), and the chat already has therole: "system""X has joined the chat" notices by then — socount > 0is always true and the greeting is never seeded. The original proposal called for guarding on "no non-system messages"; the implementation used total count. Filed #3392 with the full root cause + suggested fix.