[PR #6061] [MERGED] feat(roleplay): add paragraph navigation to Visual Novel display (#6044) #7048

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6061
Author: @Promansis
Created: 9/11/2026
Status: ✅ Merged
Merged: 9/12/2026
Merged by: @Promansis

Base: staging ← Head: fix/6044-roleplay-vn-paragraph-progression


📝 Commits (4)

  • d887c27 feat(roleplay): add paragraph navigation to Visual Novel display (#6044)
  • 5fb6783 Merge branch 'staging' into fix/6044-roleplay-vn-paragraph-progression
  • 1196775 fix(roleplay): repair Visual Novel navigation findings (#6044)
  • 27f2be6 Merge remote-tracking branch 'origin/fix/6044-roleplay-vn-paragraph-progression' into fix/6044-roleplay-vn-paragraph-progression

📊 Changes

8 files changed (+361 additions, -41 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
📝 e2e/roleplay-vn.e2e.ts (+74 -1)
📝 packages/client/src/components/chat/ChatArea.tsx (+5 -3)
📝 packages/client/src/components/chat/ChatMessage.tsx (+46 -7)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+194 -24)
📝 packages/client/src/lib/roleplay-vn-paragraphs.ts (+18 -5)
📝 packages/client/src/localization/locales/en.json (+3 -0)
📝 scripts/regressions/roleplay-vn-paragraphs.regression.ts (+18 -1)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #6044

Why this change

In Visual Novel mode, multi-paragraph responses and previous conversation turns could only be seen by expanding the full chat history dropdown. When collapsed, only the single latest paragraph was displayed, cutting off the rest of the message and hiding conversation context.

What changed

  • Added paragraph splitting utility splitRoleplayParagraphs to parse blank-line delimited paragraphs while respecting code fences.
  • Added previous/next paragraph navigation controls and counter in ChatRoleplaySurface for the Visual Novel presentation.
  • Supported stepping backwards across previous messages in the conversation without opening the full history view.
  • Added localization keys (chat.roleplayVn.previousParagraph, chat.roleplayVn.nextParagraph, chat.roleplayVn.paragraphCounter).
  • Updated unit and E2E regression tests to verify paragraph progression across messages and during streaming.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Verified pnpm check (Prettier formatting, ESLint, TypeScript types, build) passes cleanly.
  • Verified regression suite scripts/regressions/roleplay-vn-paragraphs.regression.ts passes.
  • Verified desktop and mobile Chromium Playwright tests in e2e/roleplay-vn.e2e.ts pass cleanly.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

Summary by CodeRabbit

  • New Features

    • Added paragraph-by-paragraph navigation to the Roleplay Visual Novel display.
    • Users can move between previous and next paragraphs, view a paragraph counter, and navigate earlier messages without opening full history.
    • Added paragraph navigation during streaming and support for aligned translations.
  • Bug Fixes

    • Improved loading of earlier messages during Visual Novel paragraph navigation.
    • Preserved source text when translated and source paragraph counts differ.
  • Tests

    • Expanded coverage for navigation, streaming, translations, and paragraph splitting.

🔄 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/6061 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/11/2026 **Status:** ✅ Merged **Merged:** 9/12/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `fix/6044-roleplay-vn-paragraph-progression` --- ### 📝 Commits (4) - [`d887c27`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d887c27e8157a70f79d8602cf35557e568c3bea4) feat(roleplay): add paragraph navigation to Visual Novel display (#6044) - [`5fb6783`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5fb6783e9bb779e84f60d72064a16f44824d2fa4) Merge branch 'staging' into fix/6044-roleplay-vn-paragraph-progression - [`1196775`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1196775141ed3511093d21fd495c0f17bdbfbb75) fix(roleplay): repair Visual Novel navigation findings (#6044) - [`27f2be6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/27f2be628729ac77ff10f4a479ca5a9dd580cbc3) Merge remote-tracking branch 'origin/fix/6044-roleplay-vn-paragraph-progression' into fix/6044-roleplay-vn-paragraph-progression ### 📊 Changes **8 files changed** (+361 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) 📝 `e2e/roleplay-vn.e2e.ts` (+74 -1) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+5 -3) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+46 -7) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+194 -24) 📝 `packages/client/src/lib/roleplay-vn-paragraphs.ts` (+18 -5) 📝 `packages/client/src/localization/locales/en.json` (+3 -0) 📝 `scripts/regressions/roleplay-vn-paragraphs.regression.ts` (+18 -1) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #6044 ## Why this change In Visual Novel mode, multi-paragraph responses and previous conversation turns could only be seen by expanding the full chat history dropdown. When collapsed, only the single latest paragraph was displayed, cutting off the rest of the message and hiding conversation context. ## What changed - Added paragraph splitting utility `splitRoleplayParagraphs` to parse blank-line delimited paragraphs while respecting code fences. - Added previous/next paragraph navigation controls and counter in `ChatRoleplaySurface` for the Visual Novel presentation. - Supported stepping backwards across previous messages in the conversation without opening the full history view. - Added localization keys (`chat.roleplayVn.previousParagraph`, `chat.roleplayVn.nextParagraph`, `chat.roleplayVn.paragraphCounter`). - Updated unit and E2E regression tests to verify paragraph progression across messages and during streaming. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Verified `pnpm check` (Prettier formatting, ESLint, TypeScript types, build) passes cleanly. - Verified regression suite `scripts/regressions/roleplay-vn-paragraphs.regression.ts` passes. - Verified desktop and mobile Chromium Playwright tests in `e2e/roleplay-vn.e2e.ts` pass cleanly. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added paragraph-by-paragraph navigation to the Roleplay Visual Novel display. - Users can move between previous and next paragraphs, view a paragraph counter, and navigate earlier messages without opening full history. - Added paragraph navigation during streaming and support for aligned translations. - **Bug Fixes** - Improved loading of earlier messages during Visual Novel paragraph navigation. - Preserved source text when translated and source paragraph counts differ. - **Tests** - Expanded coverage for navigation, streaming, translations, and paragraph splitting. <!-- 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:16:03 +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#7048
No description provided.