[PR #4356] [MERGED] Make chat-mode settings ownership explicit #6346

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4356
Author: @Xelvanis
Created: 7/31/2026
Status: ✅ Merged
Merged: 7/31/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/chat-mode-capability-ownership


📝 Commits (2)

  • d34d2fe fix: make chat mode settings ownership explicit
  • ac45a3c fix: normalize legacy agent allowlists

📊 Changes

7 files changed (+210 additions, -234 deletions)

View changed files

📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+9 -11)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+0 -2)
➕ packages/client/src/components/chat/chat-settings-surfaces.ts (+31 -0)
➕ packages/shared/src/constants/chat-mode-agent-policy.ts (+36 -0)
➖ packages/shared/src/constants/chat-mode-capabilities.ts (+0 -213)
📝 packages/shared/src/index.ts (+1 -1)
📝 scripts/regressions/open-issues.regression.ts (+133 -7)

📄 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 #4355

Why this change

The shared chat-mode capability matrix claimed ownership of the complete settings UI even though production consumed only a few fields and retained separate mode gates. That made the public contract misleading and allowed the drawer and matrix to drift.

What changed

  • Replaced the broad shared capability matrix with a narrow client-owned contract for settings profiles, prompt surfaces, Agents surfaces, and group controls.
  • Made both Conversation Agents and Roleplay/Game generation Agents consume the explicit Agents-surface policy.
  • Preserved legacy Visual Novel behavior by normalizing it to Roleplay.
  • Kept shared agent availability policy in the shared package and removed the obsolete public capability export.
  • Updated the repository regression script to cover every mode-to-surface row and the production wiring.

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

Manual verification notes

  • pnpm --filter @marinara-engine/client exec tsc -p tsconfig.json --noEmit
  • pnpm --filter @marinara-engine/client exec eslint src/components/chat/ChatSettingsDrawer.tsx src/components/chat/chat-settings-surfaces.ts
  • pnpm exec prettier --check packages/client/src/components/chat/chat-settings-surfaces.ts packages/client/src/components/chat/ChatSettingsDrawer.tsx scripts/regressions/open-issues.regression.ts
  • git diff --check
  • Exercised Conversation, Roleplay, legacy Visual Novel, and Game Chat Settings with Playwright. Verified the correct prompt editor, settings-profile visibility, Agents implementation, and two-character Grouped/Individual controls.
  • The relevant open-issues.regression.ts assertions passed before that broader script later stopped on the unrelated environment-dependent browser-notification assertion: Browser notifications require HTTPS or localhost.
  • pnpm check was not run.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) 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)

No user-facing behavior, installation flow, release metadata, or documentation contract changes.

UI evidence (if applicable)

This is a behavior-preserving ownership cleanup, so there is no intended visual before/after difference. The four-mode Playwright walkthrough is recorded in the validation notes above.

Summary by CodeRabbit

  • Improvements

    • Chat settings now display mode-appropriate profiles, prompts, agent options, and group-chat controls.
    • Visual Novel chats consistently use Roleplay settings and supported agents.
    • Agent selection now reflects each chat mode’s availability rules, including support for downloadable and explicitly restricted agents.
  • Bug Fixes

    • Removed outdated visibility behavior that could show unsupported settings or agents during chat setup and configuration.

🔄 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/4356 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 7/31/2026 **Status:** ✅ Merged **Merged:** 7/31/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/chat-mode-capability-ownership` --- ### 📝 Commits (2) - [`d34d2fe`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d34d2fed8987ecac6452f0f3207df44fb94746e8) fix: make chat mode settings ownership explicit - [`ac45a3c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ac45a3ccfafcb993e81ba39cd1f3fcf81330a3fa) fix: normalize legacy agent allowlists ### 📊 Changes **7 files changed** (+210 additions, -234 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+9 -11) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+0 -2) ➕ `packages/client/src/components/chat/chat-settings-surfaces.ts` (+31 -0) ➕ `packages/shared/src/constants/chat-mode-agent-policy.ts` (+36 -0) ➖ `packages/shared/src/constants/chat-mode-capabilities.ts` (+0 -213) 📝 `packages/shared/src/index.ts` (+1 -1) 📝 `scripts/regressions/open-issues.regression.ts` (+133 -7) </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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Closes #4355 ## Why this change The shared chat-mode capability matrix claimed ownership of the complete settings UI even though production consumed only a few fields and retained separate mode gates. That made the public contract misleading and allowed the drawer and matrix to drift. ## What changed - Replaced the broad shared capability matrix with a narrow client-owned contract for settings profiles, prompt surfaces, Agents surfaces, and group controls. - Made both Conversation Agents and Roleplay/Game generation Agents consume the explicit Agents-surface policy. - Preserved legacy Visual Novel behavior by normalizing it to Roleplay. - Kept shared agent availability policy in the shared package and removed the obsolete public capability export. - Updated the repository regression script to cover every mode-to-surface row and the production wiring. ## Validation - [x] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - `pnpm --filter @marinara-engine/client exec tsc -p tsconfig.json --noEmit` - `pnpm --filter @marinara-engine/client exec eslint src/components/chat/ChatSettingsDrawer.tsx src/components/chat/chat-settings-surfaces.ts` - `pnpm exec prettier --check packages/client/src/components/chat/chat-settings-surfaces.ts packages/client/src/components/chat/ChatSettingsDrawer.tsx scripts/regressions/open-issues.regression.ts` - `git diff --check` - Exercised Conversation, Roleplay, legacy Visual Novel, and Game Chat Settings with Playwright. Verified the correct prompt editor, settings-profile visibility, Agents implementation, and two-character Grouped/Individual controls. - The relevant `open-issues.regression.ts` assertions passed before that broader script later stopped on the unrelated environment-dependent browser-notification assertion: `Browser notifications require HTTPS or localhost`. - `pnpm check` was not run. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) 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) No user-facing behavior, installation flow, release metadata, or documentation contract changes. ## UI evidence (if applicable) This is a behavior-preserving ownership cleanup, so there is no intended visual before/after difference. The four-mode Playwright walkthrough is recorded in the validation notes above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Improvements** - Chat settings now display mode-appropriate profiles, prompts, agent options, and group-chat controls. - Visual Novel chats consistently use Roleplay settings and supported agents. - Agent selection now reflects each chat mode’s availability rules, including support for downloadable and explicitly restricted agents. - **Bug Fixes** - Removed outdated visibility behavior that could show unsupported settings or agents during chat setup and configuration. <!-- 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:09:33 +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#6346
No description provided.