[PR #6171] [MERGED] fix: align Markdown block styling with Chroma and paragraph spacing #7074

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

📋 Pull Request Information

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

Base: staging ← Head: fix/markdown-block-chroma-spacing


📝 Commits (7)

  • c33e973 chore: track Markdown block styling follow-up
  • 2039b68 Merge branch 'staging' into fix/markdown-block-chroma-spacing
  • cf62e34 fix: align Markdown block colors and boundary spacing
  • e61b4b9 Merge remote-tracking branch 'origin/staging' into fix/markdown-block-chroma-spacing
  • 08abf8e Merge remote-tracking branch 'origin/fix/markdown-block-chroma-spacing' into fix/markdown-block-chroma-spacing
  • 8142c0e fix: preserve literal code and adjacent Markdown blocks
  • 6353437 fix: retain heading boundaries beside Markdown blocks

📊 Changes

5 files changed (+235 additions, -38 deletions)

View changed files

📝 CHANGELOG.md (+2 -0)
➕ e2e/markdown-blocks.e2e.ts (+174 -0)
📝 packages/client/src/components/chat/ChatMessage.tsx (+1 -7)
📝 packages/client/src/lib/markdown.tsx (+56 -29)
📝 packages/client/src/styles/globals.css (+2 -2)

📄 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 #6170

Why this change

Blockquotes keep a pink/purple border despite the selected Chroma accent, and Markdown quotes/dividers have larger lower gaps than upper gaps. This follow-up preserves readable, balanced Roleplay prose on mobile.

What changed

  • Use the selected Chroma accent for quote borders and their light tint.
  • Remove the duplicate boundary line after quotes and ---/*** rules in shared plain Markdown and Roleplay mixed HTML, preserving deliberate extra blank lines.
  • Keep literal code opaque through inline formatting; preserve emphasis around inline code and adjacent quote/rule/heading/caption boundaries.
  • Reuse the existing renderer and conversions. No dependency, localization copy, or version change.

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

Automated validation

  • pnpm check passes on final source 6353437fbd25335ec96ae52d3ca1663cf9f0b7f4.
  • Six focused browser cases pass across desktop Chromium, mobile Chromium, and mobile WebKit, testing plain Markdown and mixed HTML in light and dark themes.
  • Before the fix, quotes and both rule syntaxes had an extra 24 CSS-pixel lower gap. After the fix, upper/lower gaps match within 1 CSS pixel.
  • Controls cover ordinary soft/paragraph breaks, deliberate extra blank lines, quoted paragraphs, exact literal fenced/raw/inline code, mixed-case code tags, adjacent blocks, emphasis spanning inline code, and unchanged authored HTML breaks. Independent source review passes.
  • The follow-up for the later bare-empty-quote review finding is tracked in #6172.

Manual verification still needed

  • Manually inspect a personal Roleplay chat on iPhone and desktop with a non-default Chroma accent, comparing quote and both divider syntaxes in light/dark themes.

Browser proof uses emulated mobile viewports; supplied private chat content was not uploaded.

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)

UI evidence

Verified before/after screenshot gallery includes mobile WebKit dark/light, mixed HTML, and desktop light. Originals were inspected and verified from GitHub as byte-identical PNGs.

Before After
Purple border and extra lower gaps Chroma border and balanced spacing

Summary by CodeRabbit

  • Improvements
    • Improved Markdown rendering for blockquotes and horizontal dividers.
    • Balanced spacing around block elements, reducing unintended blank lines.
    • Preserved Markdown-like text inside code blocks without interpreting it as formatting.
    • Updated blockquote borders and backgrounds to use the selected app accent color.
  • Tests
    • Added end-to-end coverage for Markdown blocks, mixed HTML, formatting, spacing, code isolation, and theme styling.

🔄 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/6171 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/13/2026 **Status:** ✅ Merged **Merged:** 9/13/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/markdown-block-chroma-spacing` --- ### 📝 Commits (7) - [`c33e973`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c33e973f5b65022a3a8d23f6bff2a695bad885fc) chore: track Markdown block styling follow-up - [`2039b68`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2039b685736aece3a1734e4d32ef9a6ba1810192) Merge branch 'staging' into fix/markdown-block-chroma-spacing - [`cf62e34`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cf62e343f189334766c341d64f97f6c4a1324686) fix: align Markdown block colors and boundary spacing - [`e61b4b9`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e61b4b94a8b915a6215daec3521a6c0b4f820fc1) Merge remote-tracking branch 'origin/staging' into fix/markdown-block-chroma-spacing - [`08abf8e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/08abf8ed09d43e809f4807275e5f41335c59aa84) Merge remote-tracking branch 'origin/fix/markdown-block-chroma-spacing' into fix/markdown-block-chroma-spacing - [`8142c0e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8142c0e1bbbe6796a1f6cabf28b3a50c80c086aa) fix: preserve literal code and adjacent Markdown blocks - [`6353437`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6353437fbd25335ec96ae52d3ca1663cf9f0b7f4) fix: retain heading boundaries beside Markdown blocks ### 📊 Changes **5 files changed** (+235 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) ➕ `e2e/markdown-blocks.e2e.ts` (+174 -0) 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+1 -7) 📝 `packages/client/src/lib/markdown.tsx` (+56 -29) 📝 `packages/client/src/styles/globals.css` (+2 -2) </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`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #6170 ## Why this change Blockquotes keep a pink/purple border despite the selected Chroma accent, and Markdown quotes/dividers have larger lower gaps than upper gaps. This follow-up preserves readable, balanced Roleplay prose on mobile. ## What changed - Use the selected Chroma accent for quote borders and their light tint. - Remove the duplicate boundary line after quotes and `---`/`***` rules in shared plain Markdown and Roleplay mixed HTML, preserving deliberate extra blank lines. - Keep literal code opaque through inline formatting; preserve emphasis around inline code and adjacent quote/rule/heading/caption boundaries. - Reuse the existing renderer and conversions. No dependency, localization copy, or version change. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `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` ### Automated validation - `pnpm check` passes on final source `6353437fbd25335ec96ae52d3ca1663cf9f0b7f4`. - Six focused browser cases pass across desktop Chromium, mobile Chromium, and mobile WebKit, testing plain Markdown and mixed HTML in light and dark themes. - Before the fix, quotes and both rule syntaxes had an extra 24 CSS-pixel lower gap. After the fix, upper/lower gaps match within 1 CSS pixel. - Controls cover ordinary soft/paragraph breaks, deliberate extra blank lines, quoted paragraphs, exact literal fenced/raw/inline code, mixed-case code tags, adjacent blocks, emphasis spanning inline code, and unchanged authored HTML breaks. Independent source review passes. - The follow-up for the later bare-empty-quote review finding is tracked in #6172. ### Manual verification still needed - [ ] Manually inspect a personal Roleplay chat on iPhone and desktop with a non-default Chroma accent, comparing quote and both divider syntaxes in light/dark themes. Browser proof uses emulated mobile viewports; supplied private chat content was not uploaded. ## 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) ## UI evidence [Verified before/after screenshot gallery](https://gist.github.com/SpicyMarinara/d0b27721c5bbc0652c985ed23852d0da) includes mobile WebKit dark/light, mixed HTML, and desktop light. Originals were inspected and verified from GitHub as byte-identical PNGs. | Before | After | | --- | --- | | ![Purple border and extra lower gaps](https://gist.githubusercontent.com/SpicyMarinara/d0b27721c5bbc0652c985ed23852d0da/raw/01-before-mobile-webkit-dark.png) | ![Chroma border and balanced spacing](https://gist.githubusercontent.com/SpicyMarinara/d0b27721c5bbc0652c985ed23852d0da/raw/02-after-mobile-webkit-dark.png) | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * Improved Markdown rendering for blockquotes and horizontal dividers. * Balanced spacing around block elements, reducing unintended blank lines. * Preserved Markdown-like text inside code blocks without interpreting it as formatting. * Updated blockquote borders and backgrounds to use the selected app accent color. * **Tests** * Added end-to-end coverage for Markdown blocks, mixed HTML, formatting, spacing, code isolation, and theme styling. <!-- 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:18 +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#7074
No description provided.