feat(scraps): Markdown component#115025
Merged
Merged
Conversation
Contributor
📊 Type Coverage Diff
🔍 13 new type safety issues introduced
Type assertions (
This is informational only and does not block the PR. |
TkDodo
reviewed
May 7, 2026
6d3d3ba to
93e05aa
Compare
93e05aa to
00b83cd
Compare
3 tasks
natemoo-re
added a commit
that referenced
this pull request
May 21, 2026
Deep refactor of Seer Agent chat components. - Replaces `MarkedText` renderer with the new `Markdown` component (see #115025), unblocks streaming animation, component customizatin - Fixes table overflow state - Adds copy button to code blocks - Consolidates state management, localize derived state from new `BlockContext`. - Splits the `blockComponents.tsx` into focused per-role modules (`chat/assistant.tsx`, `chat/toolUse.tsx`, `chat/user.tsx`) that match the actual data shapes from the backend - Moves issue short-ID linkification from `postProcessLLMMarkdown` into the `Markdown` Text component override - Replaces `todosToMarkdown` in favor of a direct `TodoList` component - Removes both `styled(MarkedText)` wrappers - Removes bubbled onClick handler—interaction can now be handled by `<Markdown component={{ }} />` overrides - Removes `onMouseEnter`, `onMouseExit` callbacks—action buttons are toggled via CSS and now support `:focus-within` --------- Co-authored-by: Claude Opus 4 <noreply@anthropic.com> Co-authored-by: Priscila Oliveira <priscila.oliveira@sentry.io> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
priscilawebdev
added a commit
that referenced
this pull request
May 22, 2026
Replace the local `StyledMarkedText` wrapper (built on the legacy `sentry/utils/marked` `MarkedText` component) with the new `<Markdown />` primitive from `@sentry/scraps/markdown` introduced in #115025. This is the autofix surface rendered in the issue details sidebar and the Seer drawer — the Solution card ("Plan"), Root Cause card, and the streaming loading details. The `v3/styled.tsx` wrapper is no longer needed and is removed. No behavior change is intended. The new primitive renders each markdown block via Scraps `Text`/`Heading`/`InlineCode`/etc. instead of `dangerouslySetInnerHTML`, so visual rendering of the one-line summaries and lists in `RootCauseCard` / `SolutionCard` may shift slightly — please eyeball the cards in the sidebar and drawer during review. Refs #115025
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.
Introduces a new
<Markdown />primitive that extends our existingmarkedpipeline with a declarative interface that supports static text and optionally enables animations withvariant="streaming".The goal is to replace the imperative
sentry/utils/markeduses throughout the app with this new primitive and upgrade agentic interactions to support streaming.See Deploy Preview
Basic Usage
markdown-stream.mov