[PR #6031] [MERGED] Fix Roleplay documents, Visual Novel layout, and Illustrator cadence #7034

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6031
Author: @SpicyMarinara
Created: 9/10/2026
Status: ✅ Merged
Merged: 9/10/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/roleplay-document-styles-20260910


📝 Commits (4)

  • e4cbf25 Track built-in Roleplay document styling
  • f8268d2 Style Roleplay documents and preserve extra Illustrator requests
  • e31005b Align Illustrator regression with additive commands
  • 7eb98a5 Apply document stylesheet review formatting

📊 Changes

14 files changed (+474 additions, -123 deletions)

View changed files

📝 CHANGELOG.md (+4 -1)
📝 e2e/roleplay-commands.e2e.ts (+172 -6)
📝 e2e/roleplay-vn.e2e.ts (+14 -2)
📝 packages/client/src/components/chat/ChatMessage.tsx (+12 -8)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+4 -10)
📝 packages/client/src/components/chat/RoleplayCommandResults.tsx (+94 -82)
➕ packages/client/src/components/chat/RoleplayDocument.tsx (+37 -0)
📝 packages/client/src/localization/locales/en.json (+9 -2)
➕ packages/client/src/styles/roleplay-documents.css (+117 -0)
📝 packages/server/src/routes/generate.routes.ts (+4 -5)
📝 packages/server/src/services/agents/agent-pipeline.ts (+1 -4)
📝 packages/server/src/services/generation/roleplay-commands.ts (+1 -1)
📝 scripts/regressions/assigned-chat-sweep.regression.ts (+2 -2)
📝 scripts/regressions/roleplay-commands.regression.ts (+3 -0)

📄 Description

Linked issue

Closes #6030
Closes #6032
Closes #6020

Why this change

Roleplay documents only showed plain attached text inside a command notice, despite offering document kinds. The Visual Novel history footer still enclosed its collapse arrow and its empty-scene instruction ignored chat chroma. Illustrator's command path could suppress scheduled output, while the general agent cadence gate could remove Illustrator before an off-interval character request.

What changed

  • Render documents directly in Classic and Visual Novel messages with built-in note, letter, journal, report, poster, and terminal styles. Reuse the existing saved-command reader and edit/delete controls. Unknown kinds use the generic document style; titles and content remain escaped plain text. The command prompt now requests plain text and explains that the Engine supplies formatting.
  • End the expanded Visual Novel history frame above its attached collapse arrow. Use the selected chat chroma for the empty-scene instruction.
  • Apply Illustrator's existing automatic cadence gate without removing its command capability. Keep automatic output when a character also requests an image, and wait for every image attachment before closing the stream. Correct the setting description to explain that character requests add extra images.
  • Make the existing privacy regression wait for persisted deletion, since its notice updates optimistically before the server save finishes.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Manually verify each document style, long content, and edit/delete in Classic and Visual Novel
  • Manually verify desktop/mobile layouts, light/dark themes, newest-history scrolling, and the attached arrow
  • Manually verify Illustrator interval 3 alongside extra character requests, including the same turn
  • Read and followed CONTRIBUTING.md

Automated evidence

  • pnpm check passed, including localization, TypeScript, ESLint, formatting, and app build. The existing ChatArea translation-effect dependency warning remains; no new lint errors.
  • pnpm smoke:ui e2e/roleplay-commands.e2e.ts e2e/roleplay-vn.e2e.ts: 51 passed across desktop Chromium, mobile Chromium, and mobile WebKit.
  • After rebasing onto the merged Marinara Gradient, the 15 targeted document/Illustrator/VN cases passed. The two mobile projects share a local backend, so the agent fixture was rerun in WebKit alone after simultaneous global agent setup interfered; CI runs each browser project in an isolated job.
  • pnpm regression:prompt passed. Roleplay commands, Illustrator manual cadence, Roleplay swipe media, VN paragraph, assigned-chat sweep, and agent runtime Node regressions passed.
  • Built and booted the production Docker image. Health endpoint reported the expected build. Production browser checks passed in desktop Chromium and iPhone WebKit emulation, in both themes, with no page errors. Visually inspected all document templates and layout screenshots. Production evidence uses e31005b7b; the subsequent 7eb98a5d0 commit only adjusts CSS whitespace, keyword casing, and optional font-family quoting, and passes Prettier.

Claim boundaries

Documents were checked through current command activity and legacy saved documents, including unknown kinds, literal HTML, long unbroken text, edits/deletions after reload, private-state isolation, swipes, and branches. The generated document stays editable and its original command remains available in the disclosure. No new storage schema or model-authored HTML/CSS rendering was added.

A deterministic local image provider verified automatic interval 3, off-interval character requests, both automatic and requested images on one turn, persistence of both attachments when the automatic image finishes last, and interval 0 manual-only behavior. Agent package definitions were unchanged; these are Engine rendering and orchestration fixes.

Manual verification notes

Physical phones, Android WebView, and live paid image providers remain for maintainer verification. Browser mobile evidence uses emulation. Long documents use the existing transcript or VN paragraph scrollbar.

Docs and release impact

  • Updated canonical English UI copy, command guidance, and Unreleased changelog. No version bump, dependencies, or user-guide changes.
  • Manually review localized copy, command guidance, and changelog

UI evidence

Before/after screenshots and all six document templates, captured from isolated synthetic chats.

Summary by CodeRabbit

  • New Features

    • Added styled roleplay documents, including notes, letters, journals, reports, posters, and terminals, rendered directly in chat.
    • Document displays now support editable and removable saved documents.
    • Roleplay command results are now visible in Visual Novel mode.
  • Improvements

    • Character-requested illustrations can now be generated alongside scheduled automatic illustrations.
    • Visual Novel history borders, controls, and empty-scene text now better reflect configured colors and styling.
  • Documentation

    • Updated in-app guidance for document formats and Illustrator behavior.

🔄 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/6031 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/10/2026 **Status:** ✅ Merged **Merged:** 9/10/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/roleplay-document-styles-20260910` --- ### 📝 Commits (4) - [`e4cbf25`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e4cbf25953ee010fc31395d1a0601b449c6b1ce8) Track built-in Roleplay document styling - [`f8268d2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f8268d25b162a8fa0b3e32fe1ab9a28d6b331863) Style Roleplay documents and preserve extra Illustrator requests - [`e31005b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e31005b7bd8d673f8171f2c58a766793e051f4fe) Align Illustrator regression with additive commands - [`7eb98a5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7eb98a5d03c55d553360c31139070000e9d3235d) Apply document stylesheet review formatting ### 📊 Changes **14 files changed** (+474 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -1) 📝 `e2e/roleplay-commands.e2e.ts` (+172 -6) 📝 `e2e/roleplay-vn.e2e.ts` (+14 -2) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+12 -8) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+4 -10) 📝 `packages/client/src/components/chat/RoleplayCommandResults.tsx` (+94 -82) ➕ `packages/client/src/components/chat/RoleplayDocument.tsx` (+37 -0) 📝 `packages/client/src/localization/locales/en.json` (+9 -2) ➕ `packages/client/src/styles/roleplay-documents.css` (+117 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+4 -5) 📝 `packages/server/src/services/agents/agent-pipeline.ts` (+1 -4) 📝 `packages/server/src/services/generation/roleplay-commands.ts` (+1 -1) 📝 `scripts/regressions/assigned-chat-sweep.regression.ts` (+2 -2) 📝 `scripts/regressions/roleplay-commands.regression.ts` (+3 -0) </details> ### 📄 Description ## Linked issue Closes #6030 Closes #6032 Closes #6020 ## Why this change Roleplay documents only showed plain attached text inside a command notice, despite offering document kinds. The Visual Novel history footer still enclosed its collapse arrow and its empty-scene instruction ignored chat chroma. Illustrator's command path could suppress scheduled output, while the general agent cadence gate could remove Illustrator before an off-interval character request. ## What changed - Render documents directly in Classic and Visual Novel messages with built-in note, letter, journal, report, poster, and terminal styles. Reuse the existing saved-command reader and edit/delete controls. Unknown kinds use the generic document style; titles and content remain escaped plain text. The command prompt now requests plain text and explains that the Engine supplies formatting. - End the expanded Visual Novel history frame above its attached collapse arrow. Use the selected chat chroma for the empty-scene instruction. - Apply Illustrator's existing automatic cadence gate without removing its command capability. Keep automatic output when a character also requests an image, and wait for every image attachment before closing the stream. Correct the setting description to explain that character requests add extra images. - Make the existing privacy regression wait for persisted deletion, since its notice updates optimistically before the server save finishes. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Manually verify each document style, long content, and edit/delete in Classic and Visual Novel - [ ] Manually verify desktop/mobile layouts, light/dark themes, newest-history scrolling, and the attached arrow - [ ] Manually verify Illustrator interval 3 alongside extra character requests, including the same turn - [ ] Read and followed `CONTRIBUTING.md` ### Automated evidence - `pnpm check` passed, including localization, TypeScript, ESLint, formatting, and app build. The existing ChatArea translation-effect dependency warning remains; no new lint errors. - `pnpm smoke:ui e2e/roleplay-commands.e2e.ts e2e/roleplay-vn.e2e.ts`: **51 passed** across desktop Chromium, mobile Chromium, and mobile WebKit. - After rebasing onto the merged Marinara Gradient, the 15 targeted document/Illustrator/VN cases passed. The two mobile projects share a local backend, so the agent fixture was rerun in WebKit alone after simultaneous global agent setup interfered; CI runs each browser project in an isolated job. - `pnpm regression:prompt` passed. Roleplay commands, Illustrator manual cadence, Roleplay swipe media, VN paragraph, assigned-chat sweep, and agent runtime Node regressions passed. - Built and booted the production Docker image. Health endpoint reported the expected build. Production browser checks passed in desktop Chromium and iPhone WebKit emulation, in both themes, with no page errors. Visually inspected all document templates and layout screenshots. Production evidence uses e31005b7b; the subsequent 7eb98a5d0 commit only adjusts CSS whitespace, keyword casing, and optional font-family quoting, and passes Prettier. ### Claim boundaries Documents were checked through current command activity and legacy saved documents, including unknown kinds, literal HTML, long unbroken text, edits/deletions after reload, private-state isolation, swipes, and branches. The generated document stays editable and its original command remains available in the disclosure. No new storage schema or model-authored HTML/CSS rendering was added. A deterministic local image provider verified automatic interval 3, off-interval character requests, both automatic and requested images on one turn, persistence of both attachments when the automatic image finishes last, and interval 0 manual-only behavior. Agent package definitions were unchanged; these are Engine rendering and orchestration fixes. ### Manual verification notes Physical phones, Android WebView, and live paid image providers remain for maintainer verification. Browser mobile evidence uses emulation. Long documents use the existing transcript or VN paragraph scrollbar. ## Docs and release impact - Updated canonical English UI copy, command guidance, and Unreleased changelog. No version bump, dependencies, or user-guide changes. - [ ] Manually review localized copy, command guidance, and changelog ## UI evidence [Before/after screenshots and all six document templates](https://gist.github.com/SpicyMarinara/e54d4c7c05340e7584ad5ec5ee577b25), captured from isolated synthetic chats. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added styled roleplay documents, including notes, letters, journals, reports, posters, and terminals, rendered directly in chat. - Document displays now support editable and removable saved documents. - Roleplay command results are now visible in Visual Novel mode. - **Improvements** - Character-requested illustrations can now be generated alongside scheduled automatic illustrations. - Visual Novel history borders, controls, and empty-scene text now better reflect configured colors and styling. - **Documentation** - Updated in-app guidance for document formats and Illustrator behavior. <!-- 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:15:55 +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#7034
No description provided.