feat: add markdown rendering and fix synthesis repetition#8
Merged
Conversation
- Add react-markdown library to frontend for proper markdown rendering - Update CouncilMemberCard to render model responses as markdown - Update SynthesisPanel to render consensus, debates, and synthesis as markdown - Fix backend synthesis parsing to extract only SYNTHESIS section text - Remove repetition of consensus/debates in chairman's synthesis display - Preserve markdown formatting in all council member responses This improves the UI by properly formatting model responses that include markdown (lists, bold, code blocks, etc.) and eliminates the redundancy where the synthesis section was displaying consensus and debates twice.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds markdown rendering support to the frontend and fixes synthesis repetition by extracting only the SYNTHESIS section text in the backend. The changes improve UI formatting for model responses that include markdown elements while eliminating redundant display of consensus and debates in the chairman's synthesis.
Key Changes:
- Added react-markdown library (v10.1.0) for proper markdown rendering
- Updated frontend components to render all text content as markdown with appropriate styling
- Modified backend parsing to extract and return only the SYNTHESIS section text, not the full response
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/components/SynthesisPanel.jsx | Wrapped consensus items, debate topics/positions, and synthesis text in ReactMarkdown components with prose styling |
| frontend/src/components/CouncilMemberCard.jsx | Wrapped model response text in ReactMarkdown component with prose styling |
| frontend/package.json | Added react-markdown v10.1.0 dependency |
| frontend/package-lock.json | Lockfile updated with react-markdown and its transitive dependencies |
| backend/services/synthesis.py | Updated parsing logic to extract only SYNTHESIS section, renamed variables for clarity, and return synthesis-only text instead of full response |
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rmatting Remove the line_stripped check when collecting synthesis section lines to ensure blank lines are preserved. This is critical for markdown paragraph separation in the chairman's synthesis output. Addresses Copilot review suggestion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This improves the UI by properly formatting model responses that include
markdown (lists, bold, code blocks, etc.) and eliminates the redundancy
where the synthesis section was displaying consensus and debates twice.