[PR #8696] [MERGED] fix(chat): keep the setup wizard open when an editor or stray click interrupts it #8752

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

📋 Pull Request Information

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

Base: staging ← Head: fix/8690-setup-wizard-survives-editors


📝 Commits (3)

  • 7334708 Keep the chat setup wizard open while an editor covers the chat
  • 5826927 Reset to the pre-defaults chat after the wizard remounts
  • 7b8a286 Clear the open setup wizard on chat store reset

📊 Changes

4 files changed (+62 additions, -11 deletions)

View changed files

📝 packages/client/src/components/chat/ChatArea.tsx (+10 -4)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+17 -7)
📝 packages/client/src/stores/chat.store.ts (+7 -0)
➕ scripts/regressions/setup-wizard-survives-editor.regression.ts (+28 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #8690

Why this change

During RP chat setup, opening a model's settings from the model step (or opening any other editor, such as a character or Agents) closed the setup wizard for good. Users landed on the chat settings page, and because the wizard never finished, the card's opening message often did not appear. A stray click on the dimmed area around the wizard did the same thing.

Cause: on desktop, AppShell unmounts ChatArea while an editor is open, and ChatArea kept the wizard's open flag in local state. When the editor closed, the flag was gone. The backdrop click called the wizard's dismiss path, which for a non-blank chat opens chat settings.

What changed

  • The chat store holds setupWizardChatId. ChatArea reads the wizard's open state from it, so the wizard comes back when the editor closes. Switching to another chat and a store reset still close it.
  • A remounted wizard does not apply saved setup defaults again over picks made since, and Reset defaults still goes back to the chat as it was before defaults were applied.
  • A click on the wizard backdrop no longer cancels setup. The X button and Skip still close it. The loading screen (no X) still closes on a backdrop click.
  • New source regression: scripts/regressions/setup-wizard-survives-editor.regression.ts.

Known limit: when the wizard comes back, it starts again at its first step. Most RP picks are saved to the chat immediately, so they are kept; unsaved local toggles (for example the conversation automation step) start from their defaults. Keeping the wizard mounted outside ChatArea would avoid this but is a larger change.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Agent-run checks (not the boxes above): client tsc --noEmit clean, ESLint on the changed files (no new warnings), Prettier check, and the new regression. Full pnpm check and a browser run were not done. Local review: one Claude review pass (one finding about Reset defaults after a remount — fixed) and CodeRabbit (store reset finding — fixed; "restore wizard step after remount" — not fixed, see Known limit).

Manual verification notes

  • Manually verify on desktop: start an RP chat from a character card, open a model's settings (sliders icon) at the model step, close the editor, and confirm the wizard is still open.
  • Manually verify: open a character or Agents editor from the sidebar mid-setup, return, and confirm the wizard is still open.
  • Manually verify: click the dimmed area around the wizard and confirm it stays open; the X still closes it.
  • Manually verify: finish the wizard and confirm the card's opening message appears.
  • Manually verify with saved setup defaults: open an editor mid-setup, return, and confirm your picks are kept and Reset defaults restores the blank chat.
  • Manually verify: switching to another chat mid-setup still closes the wizard; mobile behavior is unchanged.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

No visual change; behavior only.


🔄 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/8696 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/8690-setup-wizard-survives-editors` --- ### 📝 Commits (3) - [`7334708`](https://github.com/Pasta-Devs/Marinara-Engine/commit/733470851a2af3a6b36f1032b88fb32c2ce4c109) Keep the chat setup wizard open while an editor covers the chat - [`5826927`](https://github.com/Pasta-Devs/Marinara-Engine/commit/582692732322b6edbafe8d0c4bd7761ddf4afca9) Reset to the pre-defaults chat after the wizard remounts - [`7b8a286`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7b8a28603c5464726c5c5e46ee08b1c8718c9e3a) Clear the open setup wizard on chat store reset ### 📊 Changes **4 files changed** (+62 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatArea.tsx` (+10 -4) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+17 -7) 📝 `packages/client/src/stores/chat.store.ts` (+7 -0) ➕ `scripts/regressions/setup-wizard-survives-editor.regression.ts` (+28 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #8690 ## Why this change During RP chat setup, opening a model's settings from the model step (or opening any other editor, such as a character or Agents) closed the setup wizard for good. Users landed on the chat settings page, and because the wizard never finished, the card's opening message often did not appear. A stray click on the dimmed area around the wizard did the same thing. Cause: on desktop, `AppShell` unmounts `ChatArea` while an editor is open, and `ChatArea` kept the wizard's open flag in local state. When the editor closed, the flag was gone. The backdrop click called the wizard's dismiss path, which for a non-blank chat opens chat settings. ## What changed - The chat store holds `setupWizardChatId`. `ChatArea` reads the wizard's open state from it, so the wizard comes back when the editor closes. Switching to another chat and a store reset still close it. - A remounted wizard does not apply saved setup defaults again over picks made since, and **Reset defaults** still goes back to the chat as it was before defaults were applied. - A click on the wizard backdrop no longer cancels setup. The X button and Skip still close it. The loading screen (no X) still closes on a backdrop click. - New source regression: `scripts/regressions/setup-wizard-survives-editor.regression.ts`. Known limit: when the wizard comes back, it starts again at its first step. Most RP picks are saved to the chat immediately, so they are kept; unsaved local toggles (for example the conversation automation step) start from their defaults. Keeping the wizard mounted outside `ChatArea` would avoid this but is a larger change. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Agent-run checks (not the boxes above): client `tsc --noEmit` clean, ESLint on the changed files (no new warnings), Prettier check, and the new regression. Full `pnpm check` and a browser run were not done. Local review: one Claude review pass (one finding about Reset defaults after a remount — fixed) and CodeRabbit (store reset finding — fixed; "restore wizard step after remount" — not fixed, see Known limit). ### Manual verification notes - Manually verify on desktop: start an RP chat from a character card, open a model's settings (sliders icon) at the model step, close the editor, and confirm the wizard is still open. - Manually verify: open a character or Agents editor from the sidebar mid-setup, return, and confirm the wizard is still open. - Manually verify: click the dimmed area around the wizard and confirm it stays open; the X still closes it. - Manually verify: finish the wizard and confirm the card's opening message appears. - Manually verify with saved setup defaults: open an editor mid-setup, return, and confirm your picks are kept and **Reset defaults** restores the blank chat. - Manually verify: switching to another chat mid-setup still closes the wizard; mobile behavior is unchanged. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) No visual change; behavior only. --- <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:27 +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#8752
No description provided.