[GH-ISSUE #3322] [Issue]: Roleplay wizard 'Use Settings Presets' shortcut never adds the character's first message #1801

Closed
opened 2026-10-21 05:42:50 +07:00 by bsakaguchi · 4 comments
Owner

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 via handleShortcutApply, which only applies the chat-settings preset and calls onFinish(). Unlike finishWizard, it never calls createInitialGreetingForCharacter for 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

  1. Sidebar → RP tab → New Roleplay.
  2. In the wizard, click Use Settings Presets.
  3. Pick a chat preset and select a character that has a first_mes.
  4. Click Apply & Start.
  5. The chat opens with no first message (only the join notice).

Expected

The selected character's first_mes is 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 way finishWizard does — 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 to staging to follow.

Environment

  • Marinara Engine v2.1.0, Windows 11, local install.
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 via `handleShortcutApply`, which only applies the chat-settings preset and calls `onFinish()`. Unlike `finishWizard`, it never calls `createInitialGreetingForCharacter` for 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 1. Sidebar → RP tab → **New Roleplay**. 2. In the wizard, click **Use Settings Presets**. 3. Pick a chat preset and select a character that has a `first_mes`. 4. Click **Apply & Start**. 5. The chat opens with no first message (only the join notice). ### Expected The selected character's `first_mes` is 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 way `finishWizard` does — 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 to `staging` to follow. ### Environment - Marinara Engine v2.1.0, Windows 11, local install.
Author
Owner

@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".

<!-- gh-comment-id:4902126958 --> @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".
Author
Owner

@SpicyMarinara commented on GitHub (Jul 7, 2026):

Codex is picking this up for the v2.1.1 issue sweep in draft PR #3331.

<!-- gh-comment-id:4902332754 --> @SpicyMarinara commented on GitHub (Jul 7, 2026): Codex is picking this up for the v2.1.1 issue sweep in draft PR #3331.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 7, 2026):

Fixed in PR #3331 and merged to staging for v2.1.1. Thank you for the report.

<!-- gh-comment-id:4902883915 --> @SpicyMarinara commented on GitHub (Jul 7, 2026): Fixed in PR #3331 and merged to staging for v2.1.1. Thank you for the report.
Author
Owner

@kolacheee commented on GitHub (Jul 8, 2026):

Still reproduces on current main. The v2.1.1 fix wired up seedInitialGreetingsIfEmpty() in handleShortcutApply, but its guard checks the total message count (/chats/:id/message-count → countMessages, no role filter), and the chat already has the role: "system" "X has joined the chat" notices by then — so count > 0 is 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.

<!-- gh-comment-id:4918884315 --> @kolacheee commented on GitHub (Jul 8, 2026): Still reproduces on current `main`. The v2.1.1 fix wired up `seedInitialGreetingsIfEmpty()` in `handleShortcutApply`, but its guard checks the **total** message count (`/chats/:id/message-count` → `countMessages`, no role filter), and the chat already has the `role: "system"` "X has joined the chat" notices by then — so `count > 0` is 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#1801
No description provided.