Skip to content

feat: replace react-markdown with streamdown for streaming support#172

Open
nickytonline wants to merge 6 commits intomainfrom
replace-react-markdown-with-streamdown
Open

feat: replace react-markdown with streamdown for streaming support#172
nickytonline wants to merge 6 commits intomainfrom
replace-react-markdown-with-streamdown

Conversation

@nickytonline
Copy link
Member

@nickytonline nickytonline commented Jan 27, 2026

Summary

  • Replace react-markdown and remark-gfm dependencies with streamdown
  • Add isAnimating prop to MarkdownContent component
  • Add isStreaming prop to BotMessage component
  • Update component type annotations for better type safety
  • Update test snapshots to reflect component changes

This change enables animated markdown rendering during streaming,
improving the user experience when viewing AI responses.

Hard to show in a screenshot, but you'll no longer see partial markdown. It will always be HTML now.

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

- Replace react-markdown and remark-gfm dependencies with streamdown
- Add isAnimating prop to MarkdownContent component
- Add isStreaming prop to BotMessage component
- Update component type annotations for better type safety
- Update test snapshots to reflect component changes

This change enables animated markdown rendering during streaming,
improving the user experience when viewing AI responses.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 27, 2026 14:59
@netlify
Copy link

netlify bot commented Jan 27, 2026

Deploy Preview for mcp-storybook failed. Why did it fail? →

Name Link
🔨 Latest commit 53ad515
🔍 Latest deploy log https://app.netlify.com/projects/mcp-storybook/deploys/697931ca2405920008d75839

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces react-markdown with streamdown to enable animated markdown rendering during AI response streaming, improving the user experience when viewing real-time AI responses. The change maintains all existing markdown rendering capabilities while adding streaming animation support.

Changes:

  • Replaced react-markdown and remark-gfm dependencies with streamdown package
  • Added isAnimating prop to MarkdownContent component to control streaming animations
  • Added isStreaming prop to BotMessage component and wired it through to trigger animations
  • Updated component type annotations using ComponentProps<T> for better type safety
  • Added Tailwind CSS source directive for streamdown styles
  • Updated test snapshots to reflect new streamdown HTML output with styling attributes

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Removed react-markdown and remark-gfm; added streamdown dependency
package-lock.json Updated lockfile with streamdown and its transitive dependencies including updated tailwind-merge
src/styles.css Added @source directive to scan streamdown JavaScript files for Tailwind classes
src/components/MarkdownContent.tsx Replaced ReactMarkdown with Streamdown component; added isAnimating prop; improved type annotations with ComponentProps
src/components/BotMessage.tsx Added isStreaming prop and passed it as isAnimating to MarkdownContent
src/components/Chat.tsx Added isStreaming prop to BotMessage calls, set to true only for the last message during active streaming
src/components/snapshots/BotMessage.test.tsx.snap Updated snapshot to reflect streamdown's HTML output with additional CSS classes and data attributes

nickytonline and others added 4 commits January 27, 2026 12:25
Adds test case to verify that the isStreaming prop is correctly
passed from BotMessage to MarkdownContent for animation control.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Regenerated lock file to include all platform-specific optional dependencies
for @tailwindcss/oxide. The previous lock file only included Darwin (macOS)
platforms, causing npm ci to fail in Linux CI/CD environments.

Changes:
- Upgraded @tailwindcss packages from 4.1.10 to 4.1.18
- Included all platform-specific optional dependencies (Linux, Windows, etc.)
- Removed @parcel/watcher (no longer needed by dependencies)

This fixes the "Missing from lock file" errors in CI/CD.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@nickytonline
Copy link
Member Author

Fixing the Linux does for the docker build caused all kinds of issues so going to sort this out later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants