[PR #1975] [MERGED] Fix persona quote formatting on save #5370

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/issue-1963-persona-quote-format


📝 Commits (1)

  • fa476d2 Fix persona quote formatting on save

📊 Changes

3 files changed (+99 additions, -6 deletions)

View changed files

📝 src/features/catalog/personas/components/editor/PersonaEditor.tsx (+8 -6)
➕ src/features/catalog/personas/lib/persona-editor-model.test.ts (+59 -0)
📝 src/features/catalog/personas/lib/persona-editor-model.ts (+32 -0)

📄 Description

Linked issue

Closes #1963

Why this change

  • The refactor persona editor saved persona long-text fields exactly as typed, so the global quote-format setting was not applied before persistence.
  • Legacy persona editing normalized description, personality, scenario, backstory, appearance, and description-extension content through the configured quote formatter.

What changed

  • Added a persona save-payload builder that applies formatTextQuotes to description, personality, scenario, backstory, appearance, and altDescriptions[].content.
  • Updated PersonaEditor to read the global quoteFormat setting and send the formatted payload to useUpdatePersona.
  • Added focused model coverage for typographic formatting, straight-quote normalization, and unchanged metadata fields.

Refactor impact

Primary owner:

  • Catalog personas

Impact areas reviewed:

  • Persona editor save payload
  • Persona description extensions
  • Global UI quote-format setting

Boundary notes:

  • Feature/UI code still calls the existing focused persona update hook.
  • No engine, shared API, Tauri/Rust storage, schema, dependency, auth, import/export, prompt assembly, or release metadata 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 reproduced the raw save path with node scratch\issue-1963-static-repro.mjs before.
  • Codex verified the patched save path with node scratch\issue-1963-static-repro.mjs after.
  • Codex ran pnpm exec vitest run src/features/catalog/personas/lib/persona-editor-model.test.ts: 1 file passed, 3 tests passed.
  • Codex ran pnpm check after rebasing onto current upstream/refactor: passed line endings, architecture, frontend, Rust, docs, discovery, and unused checks.
  • Bunny review gate passed before opening this draft.
  • No human-only verification is currently known; the core claim is covered by static save-path proof plus focused model tests.

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:

  • N/A; this fixes existing persona editor save behavior for an existing setting.

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 save-payload normalization, not a visible layout/rendering change. The behavior is covered by scratch/bugfix-verification.json, the static save-path proof, focused Vitest coverage, and pnpm check.

🔄 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/1975 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/2/2026 **Status:** ✅ Merged **Merged:** 6/2/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-1963-persona-quote-format` --- ### 📝 Commits (1) - [`fa476d2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fa476d24e51db3171c33f303040bba45086f14a9) Fix persona quote formatting on save ### 📊 Changes **3 files changed** (+99 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/features/catalog/personas/components/editor/PersonaEditor.tsx` (+8 -6) ➕ `src/features/catalog/personas/lib/persona-editor-model.test.ts` (+59 -0) 📝 `src/features/catalog/personas/lib/persona-editor-model.ts` (+32 -0) </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 Closes #1963 ## Why this change - The refactor persona editor saved persona long-text fields exactly as typed, so the global quote-format setting was not applied before persistence. - Legacy persona editing normalized description, personality, scenario, backstory, appearance, and description-extension content through the configured quote formatter. ## What changed - Added a persona save-payload builder that applies `formatTextQuotes` to description, personality, scenario, backstory, appearance, and `altDescriptions[].content`. - Updated `PersonaEditor` to read the global `quoteFormat` setting and send the formatted payload to `useUpdatePersona`. - Added focused model coverage for typographic formatting, straight-quote normalization, and unchanged metadata fields. ## Refactor impact Primary owner: - Catalog personas Impact areas reviewed: - Persona editor save payload - Persona description extensions - Global UI quote-format setting Boundary notes: - Feature/UI code still calls the existing focused persona update hook. - No engine, shared API, Tauri/Rust storage, schema, dependency, auth, import/export, prompt assembly, or release metadata changes. Pressure points 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 - Codex reproduced the raw save path with `node scratch\issue-1963-static-repro.mjs before`. - Codex verified the patched save path with `node scratch\issue-1963-static-repro.mjs after`. - Codex ran `pnpm exec vitest run src/features/catalog/personas/lib/persona-editor-model.test.ts`: 1 file passed, 3 tests passed. - Codex ran `pnpm check` after rebasing onto current `upstream/refactor`: passed line endings, architecture, frontend, Rust, docs, discovery, and unused checks. - Bunny review gate passed before opening this draft. - No human-only verification is currently known; the core claim is covered by static save-path proof plus focused model tests. ## 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: - N/A; this fixes existing persona editor save behavior for an existing setting. ## 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 save-payload normalization, not a visible layout/rendering change. The behavior is covered by `scratch/bugfix-verification.json`, the static save-path proof, focused Vitest coverage, and `pnpm check`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:15:40 +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#5370
No description provided.