[PR #8673] [MERGED] feat(chat): scenario entry points instead of a wizard step (scenario setup) #8739

Closed
opened 2026-11-07 17:39:21 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8673
Author: @Gunterlie
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @Gunterlie

Base: scenarios-for-hoes ← Head: scenarios/04-entry-points


📝 Commits (2)

  • 5bc70e3 feat(chat): scenario entry points instead of a wizard step
  • 35053ea fix(chat): scenario entry point review fixes

📊 Changes

5 files changed (+341 additions, -182 deletions)

View changed files

📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+5 -0)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+285 -181)
📝 packages/client/src/components/chat/ConversationView.tsx (+2 -0)
➕ packages/client/src/components/chat/ScenarioSetupButton.tsx (+47 -0)
📝 packages/client/src/localization/locales/en.json (+2 -1)

📄 Description

Why

Parts 2 and 3 added the scenario as an extra last step in the chat setup wizard. That gave every new chat one more screen, also for users who never want a scenario. Users who start from "Use a Profile" never saw the feature at all, and chats that were already empty had no way to start one.

Decision: the scenario is optional and out of the way. Plain Start must be exactly the flow from before the feature.

This is the entry-points part of the scenario setup feature; it merges into the feature branch scenarios-for-hoes. Planned work, no linked issue.

What changed

  1. Wizard (roleplay and conversation): the scenario step is gone; steps and dots are as before. The last step has a secondary "Set up a scenario" button next to Start (not for multiplayer). It opens the scenario view (idea → premise / story direction / opening → "Start with this scenario"); Back returns to the last step. Plain Start = pre-feature flow (checked against staging).
  2. "Use a Profile": the profile view has "Set up a scenario". It applies the profile without greetings and opens the scenario view. If the profile cannot be applied, a toast shows and the wizard stays. The pending new-chat setup is cleared as soon as the profile applies.
  3. Empty chat: an empty roleplay or conversation chat (not game, not multiplayer, with characters) shows a "Set up a scenario" button. It opens the same scenario view in a Modal; Start writes the opening, then saves the scenario text, keeping other metadata. The Modal cannot close while Start runs. If the chat already has a scenario, the dialog says it will be replaced. The button hides when the chat has a message or the messages failed to load.
  • Start logic is now one hook, useScenarioStart (opener check, double-submit guard, opening-once, locked-opening path), used by all three entry points.
  • New: ScenarioSetupButton.tsx; mounted in ChatRoleplaySurface.tsx and ConversationView.tsx. The dialog loads lazily.
  • Localization: chat.wizard.scenario.replacesExisting, chat.settingsProfile.wizard.applyFailed added; unused chat.wizard.scenario.skip removed (en.json only).

Validation

  • pnpm check passed; client tsc passed; ESLint clean on changed files; pnpm localization:check passed.
  • Browser proof with the draft route mocked: plain Start (5 steps, stock greetings, no scenario saved); wizard "Set up a scenario" (1 opening, 0 greetings, scenario saved); profile "Set up a scenario" (profile kept, 1 opening, scenario saved); empty-chat button (dialog, 1 opening, scenario saved, button gone); forced profile-apply failure (toast, wizard stays, 0 messages); Escape during a slow save (ignored, save completes). Screenshots at 390/1440, light and dark.
  • Opus review: no blockers; fixed the closable dialog during Start, pending-setup cleanup on the profile path and the empty check on a failed load.
  • Local CodeRabbit: 1 finding (silent fallback when the profile apply fails), fixed.

Manual verification

  • New roleplay chat, press only Start; check it is the same as before (steps, greetings).
  • New chat, "Set up a scenario" on the last step, against a real model; check the opening and the scenario.
  • "Use a Profile" → "Set up a scenario"; check the profile settings are applied and the opening is written.
  • Open an empty chat; press "Set up a scenario"; check the button disappears after Start.
  • Check the empty-chat button on a phone in a conversation chat.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/8673 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `scenarios-for-hoes` ← **Head:** `scenarios/04-entry-points` --- ### 📝 Commits (2) - [`5bc70e3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5bc70e3491f83a0609151b9ed2f10d67f8b5f183) feat(chat): scenario entry points instead of a wizard step - [`35053ea`](https://github.com/Pasta-Devs/Marinara-Engine/commit/35053eab43ad1c652dc78318f2162f9802c7c98f) fix(chat): scenario entry point review fixes ### 📊 Changes **5 files changed** (+341 additions, -182 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+5 -0) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+285 -181) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+2 -0) ➕ `packages/client/src/components/chat/ScenarioSetupButton.tsx` (+47 -0) 📝 `packages/client/src/localization/locales/en.json` (+2 -1) </details> ### 📄 Description ## Why Parts 2 and 3 added the scenario as an extra last step in the chat setup wizard. That gave every new chat one more screen, also for users who never want a scenario. Users who start from "Use a Profile" never saw the feature at all, and chats that were already empty had no way to start one. Decision: the scenario is optional and out of the way. Plain Start must be exactly the flow from before the feature. This is the **entry-points part** of the scenario setup feature; it merges into the feature branch `scenarios-for-hoes`. Planned work, no linked issue. ## What changed 1. **Wizard (roleplay and conversation):** the scenario step is gone; steps and dots are as before. The last step has a secondary "Set up a scenario" button next to Start (not for multiplayer). It opens the scenario view (idea → premise / story direction / opening → "Start with this scenario"); Back returns to the last step. Plain Start = pre-feature flow (checked against `staging`). 2. **"Use a Profile":** the profile view has "Set up a scenario". It applies the profile without greetings and opens the scenario view. If the profile cannot be applied, a toast shows and the wizard stays. The pending new-chat setup is cleared as soon as the profile applies. 3. **Empty chat:** an empty roleplay or conversation chat (not game, not multiplayer, with characters) shows a "Set up a scenario" button. It opens the same scenario view in a Modal; Start writes the opening, then saves the scenario text, keeping other metadata. The Modal cannot close while Start runs. If the chat already has a scenario, the dialog says it will be replaced. The button hides when the chat has a message or the messages failed to load. - Start logic is now one hook, `useScenarioStart` (opener check, double-submit guard, opening-once, locked-opening path), used by all three entry points. - New: `ScenarioSetupButton.tsx`; mounted in `ChatRoleplaySurface.tsx` and `ConversationView.tsx`. The dialog loads lazily. - Localization: `chat.wizard.scenario.replacesExisting`, `chat.settingsProfile.wizard.applyFailed` added; unused `chat.wizard.scenario.skip` removed (`en.json` only). ## Validation - `pnpm check` passed; client `tsc` passed; ESLint clean on changed files; `pnpm localization:check` passed. - Browser proof with the draft route mocked: plain Start (5 steps, stock greetings, no scenario saved); wizard "Set up a scenario" (1 opening, 0 greetings, scenario saved); profile "Set up a scenario" (profile kept, 1 opening, scenario saved); empty-chat button (dialog, 1 opening, scenario saved, button gone); forced profile-apply failure (toast, wizard stays, 0 messages); Escape during a slow save (ignored, save completes). Screenshots at 390/1440, light and dark. - Opus review: no blockers; fixed the closable dialog during Start, pending-setup cleanup on the profile path and the empty check on a failed load. - Local CodeRabbit: 1 finding (silent fallback when the profile apply fails), fixed. ## Manual verification - [ ] New roleplay chat, press only Start; check it is the same as before (steps, greetings). - [ ] New chat, "Set up a scenario" on the last step, against a real model; check the opening and the scenario. - [ ] "Use a Profile" → "Set up a scenario"; check the profile settings are applied and the opening is written. - [ ] Open an empty chat; press "Set up a scenario"; check the button disappears after Start. - [ ] Check the empty-chat button on a phone in a conversation chat. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 17:39:21 +07:00
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#8739
No description provided.