[PR #5996] [MERGED] Fix Roleplay command settings responsiveness and access #7021

Closed
opened 2026-10-23 04:15:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5996
Author: @SpicyMarinara
Created: 9/9/2026
Status: ✅ Merged
Merged: 9/9/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/roleplay-command-settings-followup


📝 Commits (2)

  • 96ae4df test: reproduce roleplay command settings regressions
  • 027e203 fix: keep roleplay command settings responsive and enforce access

📊 Changes

9 files changed (+347 additions, -23 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
📝 e2e/roleplay-commands.e2e.ts (+280 -0)
📝 packages/client/src/components/chat/RoleplayCommandsSettings.tsx (+14 -11)
📝 packages/client/src/hooks/use-chats.ts (+3 -3)
📝 packages/client/src/localization/locales/en.json (+3 -0)
📝 packages/server/src/routes/generate.routes.ts (+1 -1)
📝 packages/shared/src/types/chat.ts (+1 -0)
📝 packages/shared/src/types/roleplay-command.ts (+5 -3)
📝 scripts/regressions/roleplay-commands.regression.ts (+38 -5)

📄 Description

Linked issue

Closes #5995

Why this change

Every command edit disabled the entire Roleplay Commands section until the save completed, making slow connections feel frozen. Soundtrack could also be offered without Music DJ active in the chat, Documents lacked narrator-only access, and the Combat prerequisite did not name its agent.

What changed

  • Keep command controls interactive using the existing optimistic metadata updates; opt these saves into the existing per-chat queue so rapid edits persist in order and failed saves reconcile correctly.
  • Require Music DJ to be available, attached, and agents enabled for Soundtrack in both the UI and the shared prompt/execution gate. Keep the existing Spotify/YouTube/custom routing.
  • Reuse the All/Narrator selector and shared authorization check for Documents.
  • Name the Combat agent in its prerequisite and add semantic English localization keys.

Validation

  • The new WebKit slow-save check failed on staging because Documents stayed disabled while the first PATCH was held open. The new narrator-only Documents regression also failed before the fix.
  • pnpm check, pnpm check:e2e-types, and pnpm regression:prompt passed.
  • Focused slow-save checks passed on desktop Chromium, mobile Chromium, and mobile WebKit; queued failures recover and preserve later successful edits.
  • A real generation API fixture verifies rejected unavailable/narrator-only commands, all three Music DJ provider prompts, and corresponding playback event types. Synthetic output requests action: none, so this checks routing without claiming live playback.
  • Docker image built and a disposable container returned a healthy /api/health response, then was stopped.
  • pnpm smoke:ui e2e/roleplay-commands.e2e.ts: all 21 checks passed across desktop Chromium, mobile Chromium, and mobile WebKit.
  • The hosted complete Node regression lane passed. The clean local macOS run was 240/242: mari-guard-sibling-paths (symlink canonical target assertion) and storage-writer-lock (boot-ID fixture) also fail identically in a separate untouched staging worktree at a03e362f; these are pre-existing local platform failures. A previous run was discarded after a concurrent build removed shared output during testing.

Manual verification

  • Manually verify rapid command toggles and selectors on a physical iPhone with a slow connection.
  • Manually verify authenticated Spotify/YouTube playback and custom music playback.
  • Manually verify Documents All/Narrator, missing narrator guidance, and Combat prerequisite copy.
  • Manually verify light and dark appearance on desktop and mobile.

Docs and release impact

Unreleased changelog entry and canonical English UI strings updated. No English docs or release metadata changed, so no docs-i18n follow-up is needed.

UI evidence

Before/after screenshots and proof boundaries: https://gist.github.com/SpicyMarinara/7cecae2fee6d05f456a5b3312448af4f

Claim boundaries

Touches optimistic settings persistence and command authorization/routing. The tests exercise rapid edits, repeated toggles, failed queued saves, reload persistence, All/Narrator with missing/ambiguous callers, unavailable agents, and Spotify/YouTube/custom command execution. Existing DM defaults and legacy command extras remain covered by the Roleplay regression suite. Physical-device feel and authenticated music playback remain manual checks.


🔄 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/5996 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/9/2026 **Status:** ✅ Merged **Merged:** 9/9/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/roleplay-command-settings-followup` --- ### 📝 Commits (2) - [`96ae4df`](https://github.com/Pasta-Devs/Marinara-Engine/commit/96ae4df36f99eaa4af0b3f83ad9878d3f3d4d69a) test: reproduce roleplay command settings regressions - [`027e203`](https://github.com/Pasta-Devs/Marinara-Engine/commit/027e203e07a13af3bbbb1987ff5fc15d012bf8e9) fix: keep roleplay command settings responsive and enforce access ### 📊 Changes **9 files changed** (+347 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) 📝 `e2e/roleplay-commands.e2e.ts` (+280 -0) 📝 `packages/client/src/components/chat/RoleplayCommandsSettings.tsx` (+14 -11) 📝 `packages/client/src/hooks/use-chats.ts` (+3 -3) 📝 `packages/client/src/localization/locales/en.json` (+3 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+1 -1) 📝 `packages/shared/src/types/chat.ts` (+1 -0) 📝 `packages/shared/src/types/roleplay-command.ts` (+5 -3) 📝 `scripts/regressions/roleplay-commands.regression.ts` (+38 -5) </details> ### 📄 Description ## Linked issue Closes #5995 ## Why this change Every command edit disabled the entire Roleplay Commands section until the save completed, making slow connections feel frozen. Soundtrack could also be offered without Music DJ active in the chat, Documents lacked narrator-only access, and the Combat prerequisite did not name its agent. ## What changed - Keep command controls interactive using the existing optimistic metadata updates; opt these saves into the existing per-chat queue so rapid edits persist in order and failed saves reconcile correctly. - Require Music DJ to be available, attached, and agents enabled for Soundtrack in both the UI and the shared prompt/execution gate. Keep the existing Spotify/YouTube/custom routing. - Reuse the All/Narrator selector and shared authorization check for Documents. - Name the Combat agent in its prerequisite and add semantic English localization keys. ## Validation - The new WebKit slow-save check failed on staging because Documents stayed disabled while the first PATCH was held open. The new narrator-only Documents regression also failed before the fix. - `pnpm check`, `pnpm check:e2e-types`, and `pnpm regression:prompt` passed. - Focused slow-save checks passed on desktop Chromium, mobile Chromium, and mobile WebKit; queued failures recover and preserve later successful edits. - A real generation API fixture verifies rejected unavailable/narrator-only commands, all three Music DJ provider prompts, and corresponding playback event types. Synthetic output requests `action: none`, so this checks routing without claiming live playback. - Docker image built and a disposable container returned a healthy `/api/health` response, then was stopped. - `pnpm smoke:ui e2e/roleplay-commands.e2e.ts`: all 21 checks passed across desktop Chromium, mobile Chromium, and mobile WebKit. - The hosted complete Node regression lane passed. The clean local macOS run was 240/242: `mari-guard-sibling-paths` (symlink canonical target assertion) and `storage-writer-lock` (boot-ID fixture) also fail identically in a separate untouched staging worktree at `a03e362f`; these are pre-existing local platform failures. A previous run was discarded after a concurrent build removed shared output during testing. ### Manual verification - [ ] Manually verify rapid command toggles and selectors on a physical iPhone with a slow connection. - [ ] Manually verify authenticated Spotify/YouTube playback and custom music playback. - [ ] Manually verify Documents All/Narrator, missing narrator guidance, and Combat prerequisite copy. - [ ] Manually verify light and dark appearance on desktop and mobile. ## Docs and release impact Unreleased changelog entry and canonical English UI strings updated. No English docs or release metadata changed, so no docs-i18n follow-up is needed. ## UI evidence Before/after screenshots and proof boundaries: https://gist.github.com/SpicyMarinara/7cecae2fee6d05f456a5b3312448af4f ## Claim boundaries Touches optimistic settings persistence and command authorization/routing. The tests exercise rapid edits, repeated toggles, failed queued saves, reload persistence, All/Narrator with missing/ambiguous callers, unavailable agents, and Spotify/YouTube/custom command execution. Existing DM defaults and legacy command extras remain covered by the Roleplay regression suite. Physical-device feel and authenticated music playback remain manual checks. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:15:49 +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#7021
No description provided.