[PR #4920] [MERGED] Fix preset Markdown, Mari drafts, and chat formatting #6543

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4920
Author: @SpicyMarinara
Created: 8/11/2026
Status: ✅ Merged
Merged: 8/11/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/assigned-issues-aug11-round3


📝 Commits (4)

📊 Changes

10 files changed (+144 additions, -18 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 packages/client/src/components/chat/HomeProfessorMariChat.tsx (+13 -4)
📝 packages/client/src/components/game/AnimatedText.tsx (+2 -2)
📝 packages/client/src/components/game/GameNarration.tsx (+6 -1)
📝 packages/client/src/components/game/GameReadableDisplay.tsx (+6 -1)
📝 packages/client/src/components/presets/PresetEditor.tsx (+3 -0)
📝 packages/client/src/lib/inline-markdown-regex.ts (+3 -0)
📝 packages/client/src/lib/markdown.tsx (+28 -6)
📝 packages/client/src/styles/globals.css (+13 -0)
📝 scripts/regressions/assigned-issue-sweep.regression.ts (+67 -4)

📄 Description

What

  • Add Markdown previews to Conversation, Game, and section content in the preset editor by reusing the existing safe MacroTextarea preview.
  • Persist the Home Professor Mari composer in the existing local draft store, so unsent text survives editor navigation and app restarts and still clears after a successful send or explicit restart.
  • Render Discord-style __underline__ and -# subtext through the shared React/HTML Markdown paths and the Game narration/readable paths.

Why

Preset authors could not preview formatting where they write it, Home Professor Mari kept her draft only in component state and lost it when the view unmounted, and double underscores/subtext behaved differently from Discord despite the chat renderer already supporting adjacent Markdown syntax.

Closes #4914
Closes #4915
Closes #4916

Validation

  • Run pnpm check (automated run passed locally).
  • Run pnpm localization:check (automated run passed locally; no new user-facing strings).
  • Run pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/assigned-issue-sweep.regression.ts (passed locally).
  • Manually verify preset previews, Home Professor Mari draft restoration, and underline/subtext in Conversation, Roleplay, and Game.

Validation notes

  • pnpm smoke:ui was attempted. The broad suite entered failures in pre-existing test/environment paths, including stale selectors for HomeProfessorMariChat.MariPanel and Open Characters Library; the current Home page remained visible in captured output. This is not claimed as passing proof for this patch.
  • pnpm regression:issues reached and passed this sweep regression, then stopped in the existing granular-preset fixture because preset.create omits the now-required systemKey column.
  • The in-app browser controller could not attach because its bootstrap failed with Cannot redefine property: process, so affected browser paths remain listed for manual verification.

Validation boxes remain unchecked for human verification, per repository policy.

Summary by CodeRabbit

  • New Features

    • Added Markdown previews to preset editor fields.
    • Added Discord-style underlined text and muted subtext formatting across readable content, narration, and chat.
    • Improved styling for underlined text and subtext in rendered content.
  • Bug Fixes

    • Preserved unsent Professor Mari messages when navigating away or restarting the app.
    • Improved consistency of Markdown formatting across supported content views.

🔄 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/4920 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/11/2026 **Status:** ✅ Merged **Merged:** 8/11/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/assigned-issues-aug11-round3` --- ### 📝 Commits (4) - [`5c8f0dd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5c8f0dd249cd9f4dc25931635926d9ba6073e349) Start assigned issue sweep (#4914 #4915 #4916) - [`7891776`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7891776b69e1bdfc1381d0c7945f26fb76249119) Fix assigned editor and Markdown issues (#4914 #4915 #4916) - [`3a75f8e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3a75f8e674ef2567b4e6fa068fba30035d665e81) Handle empty Discord subtext consistently - [`82c2136`](https://github.com/Pasta-Devs/Marinara-Engine/commit/82c2136c1f82b701466009095de36db66333b9ef) Strengthen bare subtext regression ### 📊 Changes **10 files changed** (+144 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `packages/client/src/components/chat/HomeProfessorMariChat.tsx` (+13 -4) 📝 `packages/client/src/components/game/AnimatedText.tsx` (+2 -2) 📝 `packages/client/src/components/game/GameNarration.tsx` (+6 -1) 📝 `packages/client/src/components/game/GameReadableDisplay.tsx` (+6 -1) 📝 `packages/client/src/components/presets/PresetEditor.tsx` (+3 -0) 📝 `packages/client/src/lib/inline-markdown-regex.ts` (+3 -0) 📝 `packages/client/src/lib/markdown.tsx` (+28 -6) 📝 `packages/client/src/styles/globals.css` (+13 -0) 📝 `scripts/regressions/assigned-issue-sweep.regression.ts` (+67 -4) </details> ### 📄 Description ## What - Add Markdown previews to Conversation, Game, and section content in the preset editor by reusing the existing safe `MacroTextarea` preview. - Persist the Home Professor Mari composer in the existing local draft store, so unsent text survives editor navigation and app restarts and still clears after a successful send or explicit restart. - Render Discord-style `__underline__` and `-# subtext` through the shared React/HTML Markdown paths and the Game narration/readable paths. ## Why Preset authors could not preview formatting where they write it, Home Professor Mari kept her draft only in component state and lost it when the view unmounted, and double underscores/subtext behaved differently from Discord despite the chat renderer already supporting adjacent Markdown syntax. Closes #4914 Closes #4915 Closes #4916 ## Validation - [ ] Run `pnpm check` (automated run passed locally). - [ ] Run `pnpm localization:check` (automated run passed locally; no new user-facing strings). - [ ] Run `pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/assigned-issue-sweep.regression.ts` (passed locally). - [ ] Manually verify preset previews, Home Professor Mari draft restoration, and underline/subtext in Conversation, Roleplay, and Game. ## Validation notes - `pnpm smoke:ui` was attempted. The broad suite entered failures in pre-existing test/environment paths, including stale selectors for `HomeProfessorMariChat.MariPanel` and `Open Characters Library`; the current Home page remained visible in captured output. This is not claimed as passing proof for this patch. - `pnpm regression:issues` reached and passed this sweep regression, then stopped in the existing granular-preset fixture because `preset.create` omits the now-required `systemKey` column. - The in-app browser controller could not attach because its bootstrap failed with `Cannot redefine property: process`, so affected browser paths remain listed for manual verification. > Validation boxes remain unchecked for human verification, per repository policy. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added Markdown previews to preset editor fields. * Added Discord-style underlined text and muted subtext formatting across readable content, narration, and chat. * Improved styling for underlined text and subtext in rendered content. * **Bug Fixes** * Preserved unsent Professor Mari messages when navigating away or restarting the app. * Improved consistency of Markdown formatting across supported content views. <!-- 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-23 04:11:25 +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#6543
No description provided.