[PR #2231] [MERGED] Fix party turn quote formatting #5495

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

📋 Pull Request Information

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

Base: refactor ← Head: fix/issue-2151-party-quote-format


📝 Commits (7)

  • 016449e Fix party turn quote formatting
  • ca3d4a6 Refresh PR metadata checks
  • 4f83bed Merge remote-tracking branch 'origin/refactor' into fix/issue-2151-party-quote-format
  • a1cfc6e Fix visual asset unused export
  • 5b9feec Fix visual reference gateway handling
  • a3c8ab5 Validate visual reference MIME fallback
  • 28e497e Reject unsupported visual reference MIME fallbacks

📊 Changes

4 files changed (+49 additions, -24 deletions)

View changed files

📝 src/engine/capabilities/visual-assets.ts (+1 -1)
📝 src/engine/generation/agent-runner.ts (+22 -8)
📝 src/features/modes/game/components/GameSurface.tsx (+4 -2)
📝 src/shared/api/visual-assets-api.ts (+22 -13)

📄 Description

Linked issue

Closes #2151

Why this change

  • Game mode's Talk-to-Party branch persisted and sent the raw addressed message before the shared game turn send path could apply typographic quote formatting. With Typographic quotes enabled, party turns kept straight quotes while normal game turns used curly quotes.

What changed

  • Formats Talk-to-Party messages with the current quote preference before persisting the user message.
  • Uses that same formatted addressed message to derive the party action payload, matching the normal game turn behavior.
  • Adds quoteFormat to the handleSendGameTurn callback dependencies because the party branch now reads it directly.

Refactor impact

Primary owner:

  • Game mode

Impact areas reviewed:

  • Talk-to-Party send branch in GameSurface
  • Existing normal game turn send path that already applies formatTextQuotes

Boundary notes:

  • Feature-only change under src/features/modes/game; no engine, shared API, Rust, storage, provider, or remote-runtime boundary changes.

Pressure points touched:

  • GameSurface

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

  • Focused repro: node --experimental-strip-types scratch\verify-party-quote-format.mts
    • Before fix: failed because Talk-to-Party persisted [To the party] say "follow me" and sent player action say "follow me".
    • After fix: passed with persisted [To the party] say “follow me” and player action say “follow me”.
  • Focused lane check: pnpm typecheck passed.
  • PR boundary check: pnpm check passed.
  • Local proof-gate helper was unavailable at C:\Users\celia\.codex\tools\marinara-proof-gate.mjs; the repo checks and focused repro above passed.

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:

  • This is a focused bugfix for an existing game mode turn path.

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: no layout or visual rendering change. The affected persisted payload was proven with the focused repro above.

Summary by CodeRabbit

  • Bug Fixes
    • Fixed quote formatting for messages sent in party chat so outgoing messages respect the active quote style.
  • Improvements
    • Improved image reference selection to more reliably pick compatible image types.
    • Simplified image-loading behavior for more consistent handling of visual assets.

🔄 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/2231 **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-2151-party-quote-format` --- ### 📝 Commits (7) - [`016449e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/016449e63c69f42ed373cc52b70d0b5f8d9bf4b0) Fix party turn quote formatting - [`ca3d4a6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ca3d4a6d80bb8ca84e9e479c821f7c890dbb8013) Refresh PR metadata checks - [`4f83bed`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4f83bed4a2d5de2ad17ee6241b9cf07e0dc7bbc2) Merge remote-tracking branch 'origin/refactor' into fix/issue-2151-party-quote-format - [`a1cfc6e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a1cfc6ecd94675a270f2b2a18a3ad35e0445137e) Fix visual asset unused export - [`5b9feec`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5b9feec9701c4eeeeeee552822f213bf4cf2e289) Fix visual reference gateway handling - [`a3c8ab5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a3c8ab553aff2965177dcb0b4aa8f58590756ab3) Validate visual reference MIME fallback - [`28e497e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/28e497ebb50fee8ba7f559e4ab7e5d8d49c45ea5) Reject unsupported visual reference MIME fallbacks ### 📊 Changes **4 files changed** (+49 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/capabilities/visual-assets.ts` (+1 -1) 📝 `src/engine/generation/agent-runner.ts` (+22 -8) 📝 `src/features/modes/game/components/GameSurface.tsx` (+4 -2) 📝 `src/shared/api/visual-assets-api.ts` (+22 -13) </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 #2151 ## Why this change <!-- What user problem, bug, refactor goal, or maintenance need does this solve? --> - Game mode's Talk-to-Party branch persisted and sent the raw addressed message before the shared game turn send path could apply typographic quote formatting. With Typographic quotes enabled, party turns kept straight quotes while normal game turns used curly quotes. ## What changed <!-- List the key changes in this PR. --> - Formats Talk-to-Party messages with the current quote preference before persisting the user message. - Uses that same formatted addressed message to derive the party action payload, matching the normal game turn behavior. - Adds `quoteFormat` to the `handleSendGameTurn` callback dependencies because the party branch now reads it directly. ## 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. --> - Game mode Impact areas reviewed: - Talk-to-Party send branch in `GameSurface` - Existing normal game turn send path that already applies `formatTextQuotes` Boundary notes: <!-- Note engine/shared-api/feature/Rust/remote-runtime boundaries. Say "none" only if you checked. --> - Feature-only change under `src/features/modes/game`; no engine, shared API, Rust, storage, provider, 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. --> - `GameSurface` ## 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. --> - Focused repro: `node --experimental-strip-types scratch\verify-party-quote-format.mts` - Before fix: failed because Talk-to-Party persisted `[To the party] say "follow me"` and sent player action `say "follow me"`. - After fix: passed with persisted `[To the party] say “follow me”` and player action `say “follow me”`. - Focused lane check: `pnpm typecheck` passed. - PR boundary check: `pnpm check` passed. - Local proof-gate helper was unavailable at `C:\Users\celia\.codex\tools\marinara-proof-gate.mjs`; the repo checks and focused repro above passed. ## 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: - This is a focused bugfix for an existing game mode turn path. ## 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: no layout or visual rendering change. The affected persisted payload was proven with the focused repro above. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed quote formatting for messages sent in party chat so outgoing messages respect the active quote style. * **Improvements** * Improved image reference selection to more reliably pick compatible image types. * Simplified image-loading behavior for more consistent handling of visual assets. <!-- 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:48 +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#5495
No description provided.