[PR #6554] [MERGED] fix: Scene participant controls and malformed tracker rows #7225

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

📋 Pull Request Information

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

Base: staging ← Head: codex/sept23-assigned-sweep


📝 Commits (10+)

  • 94f7c8b docs: record assigned Scene and tracker sweep
  • 13e66e9 fix: select Scene participants and guard blank tracker rows
  • 2ad0e23 docs: avoid overlapping contributor release notes
  • 295c0a0 fix: preserve Scene participation across delayed replies and setup changes
  • 81ba7c9 fix: guard Scene availability without suppressing merged replies
  • 4123dc5 fix: limit merged Conversation replies to available participants
  • 43d3414 Merge remote-tracking branch 'origin/staging' into codex/sept23-assigned-sweep
  • ac9c78c fix: enforce merged Scene availability and report blocked replies
  • 4f1aa47 fix: handle ambiguous Scene speakers and late continuations
  • 208fc2d fix: clean Custom Tracker rows after preserving field locks

📊 Changes

19 files changed (+949 additions, -61 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
➕ e2e/scene-participants.e2e.ts (+230 -0)
📝 e2e/scene-tts-preferences.e2e.ts (+3 -0)
📝 packages/client/src/components/chat/RoleplayHUD.tsx (+4 -1)
📝 packages/client/src/components/layout/ModalRenderer.tsx (+2 -0)
📝 packages/client/src/components/modals/ScenePromptPreferencesModal.tsx (+94 -1)
📝 packages/client/src/lib/scene-generation.ts (+16 -3)
📝 packages/client/src/localization/locales/en.json (+6 -0)
📝 packages/server/src/routes/conversation.routes.ts (+3 -2)
📝 packages/server/src/routes/generate.routes.ts (+52 -2)
📝 packages/server/src/routes/generate/conversation-presence-runtime.ts (+30 -3)
📝 packages/server/src/routes/generate/generate-route-utils.ts (+7 -2)
📝 packages/server/src/routes/scene.routes.ts (+96 -42)
📝 packages/server/src/services/generation/scene-context-runtime.ts (+24 -0)
📝 packages/shared/src/types/scene.ts (+5 -0)
📝 packages/shared/src/utils/tracker-updates.ts (+4 -0)
📝 scripts/regressions/agent-runtime.regression.ts (+77 -1)
📝 scripts/regressions/capability-gm-verbs.regression.ts (+7 -4)
➕ scripts/regressions/scene-participants.regression.ts (+286 -0)

📄 Description

Linked issue

Closes #6549
Closes #6542
Closes #6541

Owner: SpicyMarinara, implemented with Codex for the assigned-issue sweep.

Why this change

A nameless Custom Tracker row could crash a Roleplay chat every time it opened. Conversation Scenes also chose their participants automatically and did not reliably keep those characters from replying in the source Conversation.

What changed

  • Reuse Scene Prompt Setup to choose a persona and source Conversation characters before planning. Automatic selection remains the default; explicit choices are validated and honored through creation without changing the original chat or saved setup defaults.
  • Use the active Scene roster for ordinary and autonomous Conversation response eligibility. This also fixes older active Scenes that only marked the initiating character busy. Concurrent Scene creation cannot replace an active Scene; conclude, abandon and convert only release the Scene they belong to. New replies recheck participation after a presence delay, and merged group replies use the same available participants in their response instructions. Recognized unavailable speakers are rejected before saving or executing their bracketed character commands. Blocked replies use the existing offline feedback.
  • Clean nameless Custom Tracker updates after merging field locks, and filter malformed saved custom rows before rendering the HUD. Other tracker row positions and ID-only character updates keep their existing behavior. Named fields with an empty or zero value remain valid.

Validation

  • pnpm check passed: localization, formatting, ESLint, TypeScript, browser-test types and production build.
  • pnpm regression:prompt, agent runtime/capability regressions, chat-branch lineage and the new Scene participant API regression passed.
  • 34 browser cases passed across desktop Chromium, mobile Chromium and mobile WebKit; two pre-existing desktop-only cases were skipped on mobile. Covered light/dark participant selection, unchanged source chat and saved defaults, preset choices and errors, participant loading failures, switching source Conversations, plus opening/reloading legacy blank tracker rows.
  • The Scene API proof uses a local mock provider and real storage: invalid IDs/personas are rejected before a provider call, explicit selections override model output, omitted selections preserve defaults, source responders pause even when a Scene starts during their delay, merged replies exclude unavailable participants (including display names and speaker tags), unlabelled replies belong to an available character, concurrent creation is rejected, malformed metadata cannot crash availability, and older Scene cleanup preserves the current Scene.
  • Tracker regressions cover blank placeholders before locked rows, new fields alongside locked fields, ID-only character rows and zero/empty values.
  • Before/after browser evidence, using synthetic fixtures.
  • Local CodeRabbit reviews completed and valid findings were addressed. The branch includes the separately reviewed TTS merge (#6515). GitHub CI and the final hosted review must pass before merge. The metadata-write boundary audit was updated after three Scene cleanup writes became one shared conditional helper; its existing reserved namespaces still cover every written key.

Human verification:

  • Manually verify participant and persona choices with your real Scene planning provider.
  • Manually verify a Scene participant pauses and returns in a real Conversation.
  • Manually verify an existing chat with a blank custom tracker row opens normally.

Docs and release impact

User-facing changelog entries included. No version bump or new dependency. No translated-doc changes are needed for these code fixes; assigned docs follow-up #6523 was handled separately in #6553 against docs-i18n.

Proof limits

Provider behavior was tested with synthetic responses, not a paid remote model. Mobile checks use browser emulation, not physical hardware. Scene regeneration retains the existing ability to replace a historical reply; new responses respect the busy roster. Explicitly enabled native shared tools retain their existing chat-level permissions; this change does not add per-speaker ownership to them.

Summary by CodeRabbit

  • New Features

    • Scene setup now lets you choose a persona and specific Conversation characters.
    • Selected participants and personas are applied throughout the Scene, while automatic planning remains available.
  • Bug Fixes

    • Characters participating in an active Scene no longer send automatic messages in the source Conversation.
    • Scene availability and cleanup are handled more reliably during concurrent or interrupted actions.
    • Roleplay tracker widgets safely ignore blank or unnamed saved rows.
    • Invalid selections and participant-loading errors are handled safely.

🔄 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/6554 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/22/2026 **Status:** ✅ Merged **Merged:** 9/23/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/sept23-assigned-sweep` --- ### 📝 Commits (10+) - [`94f7c8b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/94f7c8bd1805473a217ac7e472d888e9feb0c62e) docs: record assigned Scene and tracker sweep - [`13e66e9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/13e66e985185e5f79da79d7c4b57010cc458eeee) fix: select Scene participants and guard blank tracker rows - [`2ad0e23`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2ad0e23e550485e342979a2e290b537d5f4c1bdd) docs: avoid overlapping contributor release notes - [`295c0a0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/295c0a0013f79cb95904f83604a5f3a552683ba1) fix: preserve Scene participation across delayed replies and setup changes - [`81ba7c9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/81ba7c9854333a8b5799051b242ee21a6cd607f5) fix: guard Scene availability without suppressing merged replies - [`4123dc5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4123dc5a2ee1eb44de4a4551e7ff7088f33e416c) fix: limit merged Conversation replies to available participants - [`43d3414`](https://github.com/Pasta-Devs/Marinara-Engine/commit/43d341415b507fada769169664709a7cf57b6bc6) Merge remote-tracking branch 'origin/staging' into codex/sept23-assigned-sweep - [`ac9c78c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ac9c78cc31ce12bdfec6eb9ca29f87e0574c3c79) fix: enforce merged Scene availability and report blocked replies - [`4f1aa47`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4f1aa477a7ca57b8ad8170f890fe022b89a5226e) fix: handle ambiguous Scene speakers and late continuations - [`208fc2d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/208fc2d10455f621aceb1fa1c473c48e5a44445e) fix: clean Custom Tracker rows after preserving field locks ### 📊 Changes **19 files changed** (+949 additions, -61 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) ➕ `e2e/scene-participants.e2e.ts` (+230 -0) 📝 `e2e/scene-tts-preferences.e2e.ts` (+3 -0) 📝 `packages/client/src/components/chat/RoleplayHUD.tsx` (+4 -1) 📝 `packages/client/src/components/layout/ModalRenderer.tsx` (+2 -0) 📝 `packages/client/src/components/modals/ScenePromptPreferencesModal.tsx` (+94 -1) 📝 `packages/client/src/lib/scene-generation.ts` (+16 -3) 📝 `packages/client/src/localization/locales/en.json` (+6 -0) 📝 `packages/server/src/routes/conversation.routes.ts` (+3 -2) 📝 `packages/server/src/routes/generate.routes.ts` (+52 -2) 📝 `packages/server/src/routes/generate/conversation-presence-runtime.ts` (+30 -3) 📝 `packages/server/src/routes/generate/generate-route-utils.ts` (+7 -2) 📝 `packages/server/src/routes/scene.routes.ts` (+96 -42) 📝 `packages/server/src/services/generation/scene-context-runtime.ts` (+24 -0) 📝 `packages/shared/src/types/scene.ts` (+5 -0) 📝 `packages/shared/src/utils/tracker-updates.ts` (+4 -0) 📝 `scripts/regressions/agent-runtime.regression.ts` (+77 -1) 📝 `scripts/regressions/capability-gm-verbs.regression.ts` (+7 -4) ➕ `scripts/regressions/scene-participants.regression.ts` (+286 -0) </details> ### 📄 Description ## Linked issue Closes #6549 Closes #6542 Closes #6541 Owner: SpicyMarinara, implemented with Codex for the assigned-issue sweep. ## Why this change A nameless Custom Tracker row could crash a Roleplay chat every time it opened. Conversation Scenes also chose their participants automatically and did not reliably keep those characters from replying in the source Conversation. ## What changed - Reuse Scene Prompt Setup to choose a persona and source Conversation characters before planning. Automatic selection remains the default; explicit choices are validated and honored through creation without changing the original chat or saved setup defaults. - Use the active Scene roster for ordinary and autonomous Conversation response eligibility. This also fixes older active Scenes that only marked the initiating character busy. Concurrent Scene creation cannot replace an active Scene; conclude, abandon and convert only release the Scene they belong to. New replies recheck participation after a presence delay, and merged group replies use the same available participants in their response instructions. Recognized unavailable speakers are rejected before saving or executing their bracketed character commands. Blocked replies use the existing offline feedback. - Clean nameless Custom Tracker updates after merging field locks, and filter malformed saved custom rows before rendering the HUD. Other tracker row positions and ID-only character updates keep their existing behavior. Named fields with an empty or zero value remain valid. ## Validation - `pnpm check` passed: localization, formatting, ESLint, TypeScript, browser-test types and production build. - `pnpm regression:prompt`, agent runtime/capability regressions, chat-branch lineage and the new Scene participant API regression passed. - 34 browser cases passed across desktop Chromium, mobile Chromium and mobile WebKit; two pre-existing desktop-only cases were skipped on mobile. Covered light/dark participant selection, unchanged source chat and saved defaults, preset choices and errors, participant loading failures, switching source Conversations, plus opening/reloading legacy blank tracker rows. - The Scene API proof uses a local mock provider and real storage: invalid IDs/personas are rejected before a provider call, explicit selections override model output, omitted selections preserve defaults, source responders pause even when a Scene starts during their delay, merged replies exclude unavailable participants (including display names and speaker tags), unlabelled replies belong to an available character, concurrent creation is rejected, malformed metadata cannot crash availability, and older Scene cleanup preserves the current Scene. - Tracker regressions cover blank placeholders before locked rows, new fields alongside locked fields, ID-only character rows and zero/empty values. - [Before/after browser evidence](https://gist.github.com/SpicyMarinara/b57b1cc201c46f020284de1e762b2626), using synthetic fixtures. - Local CodeRabbit reviews completed and valid findings were addressed. The branch includes the separately reviewed TTS merge (#6515). GitHub CI and the final hosted review must pass before merge. The metadata-write boundary audit was updated after three Scene cleanup writes became one shared conditional helper; its existing reserved namespaces still cover every written key. Human verification: - [ ] Manually verify participant and persona choices with your real Scene planning provider. - [ ] Manually verify a Scene participant pauses and returns in a real Conversation. - [ ] Manually verify an existing chat with a blank custom tracker row opens normally. ## Docs and release impact User-facing changelog entries included. No version bump or new dependency. No translated-doc changes are needed for these code fixes; assigned docs follow-up #6523 was handled separately in #6553 against docs-i18n. ## Proof limits Provider behavior was tested with synthetic responses, not a paid remote model. Mobile checks use browser emulation, not physical hardware. Scene regeneration retains the existing ability to replace a historical reply; new responses respect the busy roster. Explicitly enabled native shared tools retain their existing chat-level permissions; this change does not add per-speaker ownership to them. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Scene setup now lets you choose a persona and specific Conversation characters. - Selected participants and personas are applied throughout the Scene, while automatic planning remains available. - **Bug Fixes** - Characters participating in an active Scene no longer send automatic messages in the source Conversation. - Scene availability and cleanup are handled more reliably during concurrent or interrupted actions. - Roleplay tracker widgets safely ignore blank or unnamed saved rows. - Invalid selections and participant-loading errors are handled safely. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:17:41 +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#7225
No description provided.