refactor(web): chat markdown tables and details live in their own components#22692
ChatMarkdown.tsx was a 3,560-line file that held every markdown renderer. This stack splits it into focused modules so each piece is readable on its own.
MarkdownTable moves to chat/MarkdownTable.tsx, with its clipped-cell measuring and copy menu. The collapsible details block moves to chat/MarkdownDetails.tsx.
This is a pure move. Each renderer was already its own component, so no render boundary changes. Behavior is unchanged.
| Before | After | |
|---|---|---|
ChatMarkdown.tsx lines | 2992 | 2776 |
| New files | chat/MarkdownTable.tsx (167), chat/MarkdownDetails.tsx (65) | |
| Renders | unchanged: no component, subscription or context boundary moved | unchanged |
Renders were not measured for this layer. It changes no render boundaries: the components, their props, and the two contexts stay exactly as they were.
Tests run:
vp test run --project browser src/components/ChatMarkdown.browser.test.tsx src/components/ChatMarkdown.permissions.browser.test.tsx(11 passed)vp test run --project unit src/reactCompilerCoverage.test.tsfor every touched file (0 bailouts)tsc --noEmitfor apps/web, andvp linton changed files
🤖 Generated with Claude Code
Checks
- SuccessfulCodeRabbitGitHub
Review completed
- Skipped
- Skipped
- Skipped
- SuccessfulRemove preview downloadGitHub
- SuccessfulCheckGitHub
- SkippedRelease SmokeGitHub
- Skipped
- SkippedRustGitHub
- SuccessfulTestGitHub
- SuccessfulBuild and TypecheckGitHub
- SuccessfulTest WebGitHub
- SuccessfulLabel PR 22692GitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulTest Server 8GitHub
- SuccessfulTest Server 6GitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 2GitHub
- SuccessfulTest Server 1GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulTest Server 4GitHub
- SuccessfulTest Server 5GitHub
- SuccessfulLintGitHub
- SuccessfulChangesGitHub
- SuccessfulNative fingerprint diffGitHub
- SuccessfulCheckGitHub
- SkippedRelease SmokeGitHub
- Skipped
- SkippedRustGitHub
- SuccessfulTest WebGitHub
- SuccessfulBuild and TypecheckGitHub
- SuccessfulTestGitHub
- SuccessfulTest Server 5GitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 4GitHub
- SuccessfulTest Server 1GitHub
- SuccessfulLintGitHub
- SuccessfulTest Server 8GitHub
- SuccessfulTest Server 6GitHub
- SuccessfulTest Server 2GitHub
- SuccessfulTest Server 3GitHub
- SuccessfulChangesGitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- SuccessfulLabel PR 22692GitHub
- CancelledLabel PR 22692GitHub
- Skipped
- CancelledLabel PR sizeGitHub
- SuccessfulNative fingerprint diffGitHub
- CancelledBuild and TypecheckGitHub
- CancelledRelease SmokeGitHub
- CancelledTestGitHub
- CancelledTest WebGitHub
- Skipped
- Cancelled
- CancelledRustGitHub
- FailedCheckGitHub
- SkippedDeploy web previewGitHub
- SkippedDeploy web previewGitHub
- SkippedEAS PreviewGitHub
- SkippedEAS PreviewGitHub
- CancelledTest Server 5GitHub
- CancelledTest Server 2GitHub
- CancelledTest Server 8GitHub
- CancelledTest Server 6GitHub
- CancelledChangesGitHub
- CancelledNative fingerprint diffGitHub
- CancelledTest Server 1GitHub
- CancelledTest Server 7GitHub
- CancelledTest Server 3GitHub
- CancelledTest Server 4GitHub
- CancelledLintGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulPrepare PR size configGitHub
- Skipped
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
- Skipped
Approvability
Verdict: Approved at deaa444
Macroscope's review found this PR approvable — This PR extracts the existing markdown table and details implementations into dedicated component files without changing their behavior or renderer wiring. It does not alter product defaults or add static-analysis suppressions.
No code changes detected at a29a8ee. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
Important
Review skipped
Review was skipped as selected files did not have any reviewable changes.
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
b496256c-492c-4d41-8aea-3cd8fe480d9f
📥 Commits
Reviewing files that changed from the base of the PR and between deaa44462acc287c5960b75def7307bdc4ef3615 and a29a8ee9b496e3489fa3127b38f26a24acf88a64.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
- 🔍 Trigger review
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Team
- Run ID:
5dcee507-b31a-4a19-a0d2-119f6c20b04e
📥 Commits
Reviewing files that changed from the base of the PR and between 839970877ff9a3c68e52165a4443c776ff5993b7 and deaa44462acc287c5960b75def7307bdc4ef3615.
📒 Files selected for processing: 3
apps/web/src/components/ChatMarkdown.tsxapps/web/src/components/chat/MarkdownDetails.tsxapps/web/src/components/chat/MarkdownTable.tsx
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
📝 Walkthrough
The Markdown table and details renderers moved from
ChatMarkdown.tsxinto dedicated modules. The table module contains clipping measurement, wrapping controls, resize handling, and Markdown/CSV copy actions. The details module contains collapsible rendering and find-result reveal behavior.ChatMarkdownimports both components.Changes: Markdown Renderer Extraction
Layer / File(s) Summary Extract Markdown renderers
apps/web/src/components/chat/MarkdownTable.tsx,apps/web/src/components/chat/MarkdownDetails.tsxMarkdownTablecontains table measurement, wrapping, resize handling, and clipboard actions.MarkdownDetailscontains collapsible rendering and find-result reveal behavior.Wire renderers into ChatMarkdown
apps/web/src/components/ChatMarkdown.tsxChatMarkdownimports both extracted components and removes their local implementations and imports used only by that code.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Refactor
Merge Risk: ⚪ Minimal · up to deaa4
The table and details renderers remain wired into chat Markdown with their inspected behavior intact. No merge-blocking issue was identified.
Pre-merge checks: Passed 3 · Failed 1
Failed Failed checks: 1 warning
Check name Status Explanation Resolution Description check Warning The description explains the refactor, expected behavior, implementation, and verification results. It does not provide the required Scope and approval information, and it does not use the template he… Add the required Problem, Change, Scope and approval, and Verification sections. In Scope and approval, link the triaged issue or maintainer approval, or explain why this focused refactor qualifies for an exemption. State whether UI screens… Passed Passed checks: 3 passed
Check name Status Explanation Title check Passed The title clearly and concisely describes the main change: moving chat Markdown tables and details into dedicated components. Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description explains the refactor, expected behavior, implementation, and verification results. It does not provide the required Scope and approval information, and it does not use the template headings or explain why approval evidence is unnecessary.
Resolution
Add the required Problem, Change, Scope and approval, and Verification sections. In Scope and approval, link the triaged issue or maintainer approval, or explain why this focused refactor qualifies for an exemption. State whether UI screenshots are not applicable because behavior and visuals are unchanged, if that is the repository-approved process. Keep the listed test commands and observed results in Verification.
✨ Finishing Touches
📝 Generate docstrings
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Added 1 commit
- refactor(web): chat markdown tables and details live in their own componentsa29a8ee
Thread transfer impact
⚠️ The latest CI run did not produce a thread transfer result for a29a8ee.
This comment will update automatically after the next completed run.