[PR #1203] [MERGED] Port registered prompt override editor #4977

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

📋 Pull Request Information

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

Base: refactor ← Head: feature/port-registered-prompt-overrides


📝 Commits (6)

  • 4fd23b9 Port registered prompt override editor
  • 7096881 Address prompt override review feedback
  • 4ef472a Harden prompt override placeholder validation
  • 5b8191a Address prompt override post-rebase review
  • 89946b3 Address prompt override review feedback
  • 70829c9 Keep Marinara import module under structure limit

📊 Changes

11 files changed (+1358 additions, -17 deletions)

View changed files

📝 src-tauri/src/commands/storage/imports/marinara.rs (+1 -4)
📝 src-tauri/src/commands/storage/profile.rs (+110 -0)
📝 src-tauri/src/commands/storage/profile/legacy.rs (+60 -1)
📝 src/engine/generation/connected-commands.ts (+44 -11)
➕ src/engine/generation/prompt-overrides.test.ts (+271 -0)
➕ src/engine/generation/prompt-overrides.ts (+226 -0)
➕ src/features/shell/settings/api/prompt-overrides-api.ts (+130 -0)
📝 src/features/shell/settings/components/ProfileImportSection.tsx (+18 -1)
📝 src/features/shell/settings/components/SettingsPanel.tsx (+3 -0)
➕ src/features/shell/settings/components/settings/PromptOverridesEditor.tsx (+402 -0)
➕ src/features/shell/settings/hooks/use-prompt-overrides.ts (+93 -0)

📄 Description

Linked issue

No linked issue currently attached.

Why this change

  • Restores a registered Prompt Overrides editor in the refactor Settings surface so supported prompt-builder templates can be customized through the app.
  • Adds a registered conversation.selfie override path with storage-backed global overrides and chat-scoped prompt precedence.
  • Keeps profile export/import and legacy Marinara import honest by importing supported prompt override rows and reporting unsupported legacy keys instead of storing unusable rows.

What changed

  • Added an engine-owned prompt override registry/resolver with template validation and tests.
  • Wired conversation selfie generation through the registered override path, including ${selfieTagsBlock} support and required selfie tag handling.
  • Added the Advanced Settings Prompt Overrides editor, settings API wrapper, and React Query hook for loading, saving, enabling, disabling, and resetting registered overrides.
  • Included supported prompt overrides in native profile export/import and legacy import normalization.
  • Updated profile import status copy to distinguish imported data from skipped unsupported prompt override rows.

Refactor impact

Primary owner:

Engine generation, with feature Settings UI and Rust storage/profile integration at their owning boundaries.

Impact areas reviewed:

  • Engine generation prompt override registry, rendering, validation, and connected-command selfie flow.
  • Advanced Settings UI, React Query state, save/reset behavior, and dirty-state handling.
  • Settings feature API composition for storage-backed prompt overrides.
  • Native profile export/import and legacy Marinara import normalization.
  • Architecture boundaries for engine, feature, shared API, and Rust storage ownership.

Boundary notes:

  • Prompt override definitions, validation, and rendering live in src/engine/generation.
  • React editor and hooks stay under src/features/shell/settings.
  • The settings feature uses a focused API wrapper instead of importing raw Tauri calls into components.
  • Profile persistence/import/export behavior stays in src-tauri.
  • Engine code does not import React, Zustand stores, Tauri APIs, or feature internals.

Pressure points touched:

  • Advanced Settings via SettingsPanel.
  • Connected-command conversation selfie generation.
  • Native profile export/import and legacy import normalization.
  • No ModeSurface, GameSurface, shared mode UI, src-tauri/src/lib.rs command registration, or remote-runtime path changes.

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

  • Automated validation recorded for this branch:
    • pnpm test -- src/engine/generation/prompt-overrides.test.ts
    • cargo test --manifest-path src-tauri/Cargo.toml legacy_prompt_overrides_import_only_supported_registered_keys
    • pnpm typecheck
    • pnpm check:architecture
    • cargo check --manifest-path src-tauri/Cargo.toml
    • pnpm build
    • git diff --check
  • Native Tauri UI QA has not been run yet; the Prompt Overrides editor still needs hands-on Settings flow verification in the app.
  • No remote runtime path changed.

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

  • Changelog: relevant user-facing Settings/import behavior changed, but this branch has no CHANGELOG.md, so no changelog entry was added.

  • No repo docs, repo skills, or AGENTS.md changes were made.

UI evidence

Not added yet. Native app or screenshot evidence is still needed for the Prompt Overrides editor path.


🔄 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/1203 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/25/2026 **Status:** ✅ Merged **Merged:** 5/26/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `feature/port-registered-prompt-overrides` --- ### 📝 Commits (6) - [`4fd23b9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4fd23b9d4dc26fd9f916e88f83a509778e8c8e35) Port registered prompt override editor - [`7096881`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7096881ddb1ba58d6afc8e076dbab64ca6f9cc09) Address prompt override review feedback - [`4ef472a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4ef472a9eba0851574f30c05228b35ecc6418be0) Harden prompt override placeholder validation - [`5b8191a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5b8191ad6da3fb84a608dbabee2ec4cc05ad9ce1) Address prompt override post-rebase review - [`89946b3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/89946b387f9c6fa422024ceeb39ad0ffc69ce022) Address prompt override review feedback - [`70829c9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/70829c9ad29d98dad9506658749325148d665936) Keep Marinara import module under structure limit ### 📊 Changes **11 files changed** (+1358 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/imports/marinara.rs` (+1 -4) 📝 `src-tauri/src/commands/storage/profile.rs` (+110 -0) 📝 `src-tauri/src/commands/storage/profile/legacy.rs` (+60 -1) 📝 `src/engine/generation/connected-commands.ts` (+44 -11) ➕ `src/engine/generation/prompt-overrides.test.ts` (+271 -0) ➕ `src/engine/generation/prompt-overrides.ts` (+226 -0) ➕ `src/features/shell/settings/api/prompt-overrides-api.ts` (+130 -0) 📝 `src/features/shell/settings/components/ProfileImportSection.tsx` (+18 -1) 📝 `src/features/shell/settings/components/SettingsPanel.tsx` (+3 -0) ➕ `src/features/shell/settings/components/settings/PromptOverridesEditor.tsx` (+402 -0) ➕ `src/features/shell/settings/hooks/use-prompt-overrides.ts` (+93 -0) </details> ### 📄 Description ## Linked issue No linked issue currently attached. ## Why this change - Restores a registered Prompt Overrides editor in the refactor Settings surface so supported prompt-builder templates can be customized through the app. - Adds a registered `conversation.selfie` override path with storage-backed global overrides and chat-scoped prompt precedence. - Keeps profile export/import and legacy Marinara import honest by importing supported prompt override rows and reporting unsupported legacy keys instead of storing unusable rows. ## What changed - Added an engine-owned prompt override registry/resolver with template validation and tests. - Wired conversation selfie generation through the registered override path, including `${selfieTagsBlock}` support and required selfie tag handling. - Added the Advanced Settings Prompt Overrides editor, settings API wrapper, and React Query hook for loading, saving, enabling, disabling, and resetting registered overrides. - Included supported prompt overrides in native profile export/import and legacy import normalization. - Updated profile import status copy to distinguish imported data from skipped unsupported prompt override rows. ## Refactor impact Primary owner: Engine generation, with feature Settings UI and Rust storage/profile integration at their owning boundaries. Impact areas reviewed: - Engine generation prompt override registry, rendering, validation, and connected-command selfie flow. - Advanced Settings UI, React Query state, save/reset behavior, and dirty-state handling. - Settings feature API composition for storage-backed prompt overrides. - Native profile export/import and legacy Marinara import normalization. - Architecture boundaries for engine, feature, shared API, and Rust storage ownership. Boundary notes: - Prompt override definitions, validation, and rendering live in `src/engine/generation`. - React editor and hooks stay under `src/features/shell/settings`. - The settings feature uses a focused API wrapper instead of importing raw Tauri calls into components. - Profile persistence/import/export behavior stays in `src-tauri`. - Engine code does not import React, Zustand stores, Tauri APIs, or feature internals. Pressure points touched: - Advanced Settings via `SettingsPanel`. - Connected-command conversation selfie generation. - Native profile export/import and legacy import normalization. - No `ModeSurface`, `GameSurface`, shared mode UI, `src-tauri/src/lib.rs` command registration, or remote-runtime path changes. ## 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 - [x] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [x] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [x] Remote runtime smoke checked when relevant ### Manual verification notes - Automated validation recorded for this branch: - `pnpm test -- src/engine/generation/prompt-overrides.test.ts` - `cargo test --manifest-path src-tauri/Cargo.toml legacy_prompt_overrides_import_only_supported_registered_keys` - `pnpm typecheck` - `pnpm check:architecture` - `cargo check --manifest-path src-tauri/Cargo.toml` - `pnpm build` - `git diff --check` - Native Tauri UI QA has not been run yet; the Prompt Overrides editor still needs hands-on Settings flow verification in the app. - No remote runtime path changed. ## Docs and release impact - [x] 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 - Changelog: relevant user-facing Settings/import behavior changed, but this branch has no `CHANGELOG.md`, so no changelog entry was added. - No repo docs, repo skills, or `AGENTS.md` changes were made. ## UI evidence Not added yet. Native app or screenshot evidence is still needed for the Prompt Overrides editor path. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:11 +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#4977
No description provided.