Skip to content

feat(react): add shared markdown renderer for observer messages#65

Merged
willwashburn merged 10 commits intomainfrom
markdown-fix
Mar 4, 2026
Merged

feat(react): add shared markdown renderer for observer messages#65
willwashburn merged 10 commits intomainfrom
markdown-fix

Conversation

@willwashburn
Copy link
Copy Markdown
Member

@willwashburn willwashburn commented Mar 4, 2026

Summary

  • add a reusable MessageMarkdown component to @relaycast/react using react-markdown with GFM and soft line breaks
  • export the renderer from the React SDK public API
  • switch observer dashboard message and thread rendering to use the shared renderer
  • add unit tests for markdown rendering and secure external-link attributes

Verification

  • npm run -w @relaycast/react test
  • npm run -w @relaycast/react build
  • npm run -w @relaycast/react lint
  • npm run -w @relaycast/observer-dashboard build

Notes

  • no change to agent persona text rendering in this PR

Open with Devin

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 4, 2026

Preview deployed!

Environment URL
API https://pr65-api.relaycast.dev
Health https://pr65-api.relaycast.dev/health
Observer https://pr65-observer.relaycast.dev

This preview shares the staging database and will be cleaned up when the PR is merged or closed.

Run E2E tests

npm run e2e -- https://pr65-api.relaycast.dev --ci

Open observer dashboard

https://pr65-observer.relaycast.dev

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@willwashburn
Copy link
Copy Markdown
Member Author

Addressed review feedback in 9ad8e2b:

  • moved remarkPlugins to a module-level constant (REMARK_PLUGINS)
  • hardened anchor rendering by spreading markdown props before explicit href/target/rel, and stripping node from DOM props
  • expanded test coverage to assert internal links do not receive a rel attribute

I did not change the index.ts export grouping comment since it is stylistic and does not affect behavior or API shape.

This comment was marked as resolved.

This comment was marked as resolved.

@willwashburn willwashburn merged commit 1ebc209 into main Mar 4, 2026
4 checks passed
@willwashburn willwashburn deleted the markdown-fix branch March 4, 2026 06:35
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.

2 participants