[PR #2201] [MERGED] Fix character advanced quote formatting #5464

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2201
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2128-advanced-quote-formatting


📝 Commits (3)

  • 4823bb3 Fix character advanced quote formatting
  • e14365c Preserve creator note CSS while formatting quotes
  • a00795a Merge refactor into issue 2128 fix

📊 Changes

3 files changed (+112 additions, -30 deletions)

View changed files

📝 scratch/bugfix-verification.json (+34 -29)
➕ src/features/catalog/characters/lib/character-editor-model.test.ts (+44 -0)
📝 src/features/catalog/characters/lib/character-editor-model.ts (+34 -1)

📄 Description

Linked issue

Closes #2128

Why this change

  • The refactor character editor normalized quotes for the main card text fields, but still skipped legacy-covered advanced fields: creator notes, system prompt, post-history instructions, and depth prompt text.

What changed

  • Added the missing top-level advanced character fields to the quote-formatted field set.
  • Added object-aware formatting for extensions.depth_prompt.prompt while preserving depth, role, and unrelated extension metadata.
  • Added a focused formatter-model regression test for the missed fields and depth prompt metadata preservation.

Refactor impact

Primary owner:

Catalog resources / character editor model.

Impact areas reviewed:

  • src/features/catalog/characters/lib/character-editor-model.ts
  • Character editor callers already route field updates through formatCharacterEditorField and extension updates through formatCharacterEditorExtension.

Boundary notes:

  • Feature-lane model fix only. No engine, shared API, Tauri/Rust, storage, import/export, prompt assembly, schema, dependency, or remote-runtime boundary changes.

Pressure points touched:

  • None.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Codex before/after repro: pnpm exec vitest run src\features\catalog\characters\lib\character-editor-model.test.ts failed before the production fix, then passed after it.
  • Codex focused checks: pnpm typecheck passed; git diff --check passed.
  • Codex baseline: pnpm check passed.
  • Codex proof gate: node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed.
  • Bunny review: passed before opening this draft.
  • Human manual validation: not required for the core formatter claim; optional UI smoke is to set typographic quote style, edit the four advanced fields, save, and confirm stored card data has typographic quotes.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix only; it restores existing quote-formatting behavior for already-discoverable character editor fields.

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

UI evidence

N/A; this is a formatter-model regression with no meaningful visible UI state. The proof is the before/after command output recorded above.

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Enhanced quote formatting in the character editor to apply typographic quotes to additional text fields including creator notes, system prompts, and post history instructions.
    • Improved handling to preserve embedded style blocks within creator notes while formatting surrounding text.
  • Tests

    • Added comprehensive test coverage for quote formatting functionality, including edge cases for typographic quotes and style block preservation.

🔄 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/2201 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2128-advanced-quote-formatting` --- ### 📝 Commits (3) - [`4823bb3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4823bb33b3799e899a3ef7c0ce02e60a9176b9fd) Fix character advanced quote formatting - [`e14365c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e14365cbb89e3219bcf3a9d685ab61c2b940025e) Preserve creator note CSS while formatting quotes - [`a00795a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a00795a40f4e57285ea4802b2261061eea5d9428) Merge refactor into issue 2128 fix ### 📊 Changes **3 files changed** (+112 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `scratch/bugfix-verification.json` (+34 -29) ➕ `src/features/catalog/characters/lib/character-editor-model.test.ts` (+44 -0) 📝 `src/features/catalog/characters/lib/character-editor-model.ts` (+34 -1) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue <!-- Every user-facing PR should reference a feature request or issue report when practical. --> Closes #2128 ## Why this change <!-- What user problem, bug, refactor goal, or maintenance need does this solve? --> - The refactor character editor normalized quotes for the main card text fields, but still skipped legacy-covered advanced fields: creator notes, system prompt, post-history instructions, and depth prompt text. ## What changed <!-- List the key changes in this PR. --> - Added the missing top-level advanced character fields to the quote-formatted field set. - Added object-aware formatting for `extensions.depth_prompt.prompt` while preserving `depth`, `role`, and unrelated extension metadata. - Added a focused formatter-model regression test for the missed fields and depth prompt metadata preservation. ## Refactor impact Primary owner: <!-- Examples: app shell, catalog, chat mode, roleplay mode, game mode, runtime generation, world-state, shared API, engine generation, Rust storage, imports, remote runtime. --> Catalog resources / character editor model. Impact areas reviewed: - `src/features/catalog/characters/lib/character-editor-model.ts` - Character editor callers already route field updates through `formatCharacterEditorField` and extension updates through `formatCharacterEditorExtension`. Boundary notes: <!-- Note engine/shared-api/feature/Rust/remote-runtime boundaries. Say "none" only if you checked. --> - Feature-lane model fix only. No engine, shared API, Tauri/Rust, storage, import/export, prompt assembly, schema, dependency, or remote-runtime boundary changes. Pressure points touched: <!-- Mention ModeSurface, GameSurface, shared mode UI, src-tauri/src/lib.rs command registration, or import modules if touched. --> - None. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes <!-- Describe exact commands and manual steps, including typecheck/build/docs/architecture/Rust/browser/remote-runtime checks when they apply. If an AI agent filled this out, verify it yourself before ticking boxes. --> - Codex before/after repro: `pnpm exec vitest run src\features\catalog\characters\lib\character-editor-model.test.ts` failed before the production fix, then passed after it. - Codex focused checks: `pnpm typecheck` passed; `git diff --check` passed. - Codex baseline: `pnpm check` passed. - Codex proof gate: `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed. - Bunny review: passed before opening this draft. - Human manual validation: not required for the core formatter claim; optional UI smoke is to set typographic quote style, edit the four advanced fields, save, and confirm stored card data has typographic quotes. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix only; it restores existing quote-formatting behavior for already-discoverable character editor fields. ## 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 ## UI evidence <!-- Add before/after screenshots or recordings for visible UI changes. --> N/A; this is a formatter-model regression with no meaningful visible UI state. The proof is the before/after command output recorded above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Bug Fixes** * Enhanced quote formatting in the character editor to apply typographic quotes to additional text fields including creator notes, system prompts, and post history instructions. * Improved handling to preserve embedded style blocks within creator notes while formatting surrounding text. * **Tests** * Added comprehensive test coverage for quote formatting functionality, including edge cases for typographic quotes and style block preservation. <!-- 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:16: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#5464
No description provided.