[PR #1465] [MERGED] Fix roleplay settings parameter inheritance #5105

Closed
opened 2026-10-22 04:13:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1465
Author: @Xelvanis
Created: 5/28/2026
Status: ✅ Merged
Merged: 5/28/2026
Merged by: @Xelvanis

Base: refactor ← Head: fix/roleplay-settings-parameters


📝 Commits (5)

  • 850dfda Fix roleplay chat parameter overrides
  • e7a1207 Harden roleplay parameter inheritance
  • fabec9b Address roleplay settings review feedback
  • d31c74b Keep preset parameters out of connection defaults
  • 8abe7c4 Merge origin/refactor into roleplay settings parameters

📊 Changes

7 files changed (+200522 additions, -199832 deletions)

View changed files

📝 graphify-out/.graphify_labels.json (+7 -1)
📝 graphify-out/GRAPH_REPORT.md (+675 -653)
📝 graphify-out/graph.json (+196132 -195717)
📝 graphify-out/manifest.json (+3427 -3422)
📝 src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx (+108 -34)
➕ src/shared/components/ui/GenerationParametersEditor.test.ts (+82 -0)
📝 src/shared/components/ui/GenerationParametersEditor.tsx (+91 -5)

📄 Description

Linked issue

None.

Why this change

  • Roleplay Chat Settings advanced generation parameters were not matching the runtime inheritance path. Saving or resetting settings could persist inherited connection/prompt-preset defaults as chat-specific overrides, and nested custom provider parameters could lose connection defaults when prompt preset parameters were present.

What changed

  • Advanced Parameters now builds inherited defaults from mode defaults, connection defaults, and the active roleplay prompt preset chain.
  • Chat-level saves now persist only editable overrides and preserve non-editable existing generation metadata.
  • Reset now clears editable chat-level overrides back to inherited defaults instead of writing the whole default object into chat metadata.
  • Custom provider parameters now deep-merge across inherited layers.
  • Added focused tests for inherited override omission, custom parameter comparison, and parameter-record parsing.
  • Refreshed Graphify output after the code change.

Refactor impact

Primary owner:

  • Shared mode chat UI and shared generation parameter editor.

Impact areas reviewed:

  • Roleplay Chat Settings advanced generation parameters.
  • Runtime generation parameter source ordering from connection defaults, prompt preset parameters, and chat overrides.
  • Game-mode boundary so prompt-preset generation parameter inheritance is not applied there.

Boundary notes:

  • No engine, shared API, Rust, or remote-runtime contract changes.
  • Feature UI stays inside shared mode UI and uses existing catalog hooks plus shared editor helpers.

Pressure points touched:

  • Shared mode UI: src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

  • Agent-run validation: pnpm exec vitest run src/shared/components/ui/GenerationParametersEditor.test.ts passed.
  • Agent-run validation: pnpm typecheck passed.
  • Agent-run validation: pnpm check:architecture passed.
  • Agent-run validation: pnpm build passed.
  • Agent-run validation: git diff --check origin/refactor...HEAD passed.
  • Agent-run validation: merge-tree conflict scan against origin/refactor returned no conflicts.
  • Native Tauri/manual UI behavior was not exercised in this pass.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs were changed; this is a focused roleplay settings bugfix and does not alter contributor workflow, architecture docs, or release claims.

UI evidence

Not added. This pass did not include a native Tauri/manual UI screenshot or recording.

Summary by CodeRabbit

  • New Features

    • Chat settings now inherit generation parameters from the active connection's preset
    • Added loading indicator while inherited parameters are being fetched
    • Reset button now restores to inherited parameter defaults instead of full computed defaults
  • Tests

    • Added test coverage for generation parameter parsing and comparison logic

Review Change Stack


🔄 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/1465 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/28/2026 **Status:** ✅ Merged **Merged:** 5/28/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `fix/roleplay-settings-parameters` --- ### 📝 Commits (5) - [`850dfda`](https://github.com/Pasta-Devs/Marinara-Engine/commit/850dfda15e5802a9c80d3383f5f1091cc68584cb) Fix roleplay chat parameter overrides - [`e7a1207`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e7a120791365740dbcd655cd489b2a88aa311868) Harden roleplay parameter inheritance - [`fabec9b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fabec9b0a727ffe650eb076742f2958183a8bf75) Address roleplay settings review feedback - [`d31c74b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d31c74be03859d325c0022c76880edcfa2954740) Keep preset parameters out of connection defaults - [`8abe7c4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8abe7c45c9a31c4d77b6941e51d5625cd26576c0) Merge origin/refactor into roleplay settings parameters ### 📊 Changes **7 files changed** (+200522 additions, -199832 deletions) <details> <summary>View changed files</summary> 📝 `graphify-out/.graphify_labels.json` (+7 -1) 📝 `graphify-out/GRAPH_REPORT.md` (+675 -653) 📝 `graphify-out/graph.json` (+196132 -195717) 📝 `graphify-out/manifest.json` (+3427 -3422) 📝 `src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx` (+108 -34) ➕ `src/shared/components/ui/GenerationParametersEditor.test.ts` (+82 -0) 📝 `src/shared/components/ui/GenerationParametersEditor.tsx` (+91 -5) </details> ### 📄 Description ## Linked issue None. ## Why this change - Roleplay Chat Settings advanced generation parameters were not matching the runtime inheritance path. Saving or resetting settings could persist inherited connection/prompt-preset defaults as chat-specific overrides, and nested custom provider parameters could lose connection defaults when prompt preset parameters were present. ## What changed - Advanced Parameters now builds inherited defaults from mode defaults, connection defaults, and the active roleplay prompt preset chain. - Chat-level saves now persist only editable overrides and preserve non-editable existing generation metadata. - Reset now clears editable chat-level overrides back to inherited defaults instead of writing the whole default object into chat metadata. - Custom provider parameters now deep-merge across inherited layers. - Added focused tests for inherited override omission, custom parameter comparison, and parameter-record parsing. - Refreshed Graphify output after the code change. ## Refactor impact Primary owner: - Shared mode chat UI and shared generation parameter editor. Impact areas reviewed: - Roleplay Chat Settings advanced generation parameters. - Runtime generation parameter source ordering from connection defaults, prompt preset parameters, and chat overrides. - Game-mode boundary so prompt-preset generation parameter inheritance is not applied there. Boundary notes: - No engine, shared API, Rust, or remote-runtime contract changes. - Feature UI stays inside shared mode UI and uses existing catalog hooks plus shared editor helpers. Pressure points touched: - Shared mode UI: `src/features/modes/shared/chat-ui/components/ChatSettingsDrawer.tsx`. ## Validation - [x] `pnpm check` passes locally - [x] `pnpm typecheck` passes locally - [x] `pnpm build` passes locally - [x] `pnpm check:architecture` passes locally - [x] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes - Agent-run validation: `pnpm exec vitest run src/shared/components/ui/GenerationParametersEditor.test.ts` passed. - Agent-run validation: `pnpm typecheck` passed. - Agent-run validation: `pnpm check:architecture` passed. - Agent-run validation: `pnpm build` passed. - Agent-run validation: `git diff --check origin/refactor...HEAD` passed. - Agent-run validation: merge-tree conflict scan against `origin/refactor` returned no conflicts. - Native Tauri/manual UI behavior was not exercised in this pass. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims No docs were changed; this is a focused roleplay settings bugfix and does not alter contributor workflow, architecture docs, or release claims. ## UI evidence Not added. This pass did not include a native Tauri/manual UI screenshot or recording. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Chat settings now inherit generation parameters from the active connection's preset * Added loading indicator while inherited parameters are being fetched * Reset button now restores to inherited parameter defaults instead of full computed defaults * **Tests** * Added test coverage for generation parameter parsing and comparison logic <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1465?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- 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-22 04:13:19 +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#5105
No description provided.