Skip to content

ref(seer): simplify block component states#115589

Draft
natemoo-re wants to merge 6 commits into
masterfrom
nm/seer/ref-components
Draft

ref(seer): simplify block component states#115589
natemoo-re wants to merge 6 commits into
masterfrom
nm/seer/ref-components

Conversation

@natemoo-re
Copy link
Copy Markdown
Member

Complete overhaul of the static/app/views/seerExplorer/components/blockComponents.tsx file that

  • consolidates state management, localize derived state
  • normalizes derived state with simplified enums and exhaustive switch/case
  • adopt new Markdown component (feat(scraps): Markdown component #115025), enable streaming animation
  • drop dead util code that is no longer needed

natemoo-re and others added 4 commits May 14, 2026 11:53
Replace the legacy MarkedText (dangerouslySetInnerHTML-based) renderer
with the new token-based Markdown component from @sentry/scraps. This
enables streaming decode animations for active assistant blocks and
component-level customization via the components prop.

- Swap MarkedText for Markdown across all block content (assistant,
  thinking, disclosure, and todo list)
- Remove the onClick link handler from AssistantBlock since Markdown's
  DefaultLink already handles internal/external routing
- Move issue short ID linkification from string preprocessing
  (postProcessLLMMarkdown) to a Markdown Text component override,
  which naturally excludes code blocks, links, and URLs via tokenization
- Delete postProcessLLMMarkdown, linkifyIssueShortIds, and their tests
- Remove useBlockContent hook (inlined into AssistantBlock)
- Set variant="streaming" on the active assistant block's Markdown

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Remove MarkdownContent and TodoListContent styled wrappers that were
leftover from the MarkedText migration. The Markdown component's
default components already handle inline code, tables, lists, and
horizontal rules.

- Add overflowWrap: break-word to core Markdown component
- Export MarkdownProps from the core markdown barrel
- Add SeerMarkdown passthrough with custom Heading (size="lg" for
  all levels) and IssueIdText overrides
- Replace TodoListContent styled wrapper with Text primitive

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Replace todosToMarkdown string serialization with a TodoList component
that renders TodoItem[] directly as React elements. This avoids
converting structured data to markdown just to parse it back into
the same component tree.

Uses Checkbox, Flex, and Stack primitives matching the core Markdown
DefaultTaskList/DefaultTaskListItem patterns.

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
@natemoo-re natemoo-re requested a review from JonasBa May 14, 2026 18:29
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 14, 2026

📊 Type Coverage Diff

Metric Before After Delta
Coverage 93.52% 93.52% ±0%
Typed 135,643 135,611 🔴 -32
Untyped 9,395 9,394 🟢 -1
🔍 2 new type safety issues introduced

any-typed symbols (2 new)

File Line Detail
static/app/views/seerExplorer/components/blockComponents.tsx 266 toolLinkByCallId (var(binding))
static/app/views/seerExplorer/components/blockComponents.tsx 554 toolLinkParams (param)

This is informational only and does not block the PR.

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

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants