fix: add paragraph spacing to markdown body for visible line breaks#540
Conversation
Tailwind's preflight resets p margins to 0, so consecutive paragraphs
in .markdown-body rendered with no visual spacing. This caused blank
lines in workflow step prompt templates (around {{task_prompt}}) to be
invisible in the chat UI. Add `.markdown-body p + p { margin-top: 0.5em }`
to restore paragraph spacing. TipTap editor is unaffected because its
`.tiptap p { margin: 0 }` rule takes precedence via source order.
Includes E2E test verifying consecutive paragraphs have positive margin.
https://claude.ai/code/session_01Fk9QbebaXKtEcxoD4DRguS
There was a problem hiding this comment.
carlosflorencio has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughCSS rule added to increase vertical spacing between consecutive paragraphs in markdown content by 0.5em. A new end-to-end test validates that the spacing is correctly applied in chat message rendering by inspecting computed DOM styles. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
p { margin: 0 }, causing consecutive paragraphs in.markdown-bodyto render with no visual spacing. This made blank lines in workflow step prompt templates (around{{task_prompt}}) invisible in the chat UI..markdown-body p + p { margin-top: 0.5em }to restore paragraph spacing between consecutive paragraphs. TipTap editor is unaffected (.tiptap p { margin: 0 }takes precedence via source order).Test plan
markdown-paragraph-breaks.spec.tspasses — creates agent message with three paragraphs and assertsmarginTop > 0on consecutive<p>elementsmarkdown-wrapE2E tests still pass (no regression){{task_prompt}}, start a task — chat should show visible paragraph spacinghttps://claude.ai/code/session_01Fk9QbebaXKtEcxoD4DRguS