refactor(web): sidebar list markers and draft rows live in their own files#22729
This PR continues splitting up Sidebar.tsx. It moves the sortable shelf headers, drag boundaries and placeholders into sidebar/SidebarListMarkers.tsx, and the unsent-draft rows and block into sidebar/SidebarDraftBlock.tsx. The code is moved as-is, with no behavior change. The draft block already subscribes to the composer draft store on its own, so it keeps re-rendering without the sidebar body, as it did before.
| before | after | |
|---|---|---|
Sidebar.tsx | 3,483 lines | 3,140 lines |
sidebar/SidebarListMarkers.tsx | — | 135 lines |
sidebar/SidebarDraftBlock.tsx | — | 222 lines |
Tests run:
- React Compiler coverage for the sidebar files (0 bailouts)
tscfor apps/web- oxlint on the changed files
Claude Opus 5.5 in Claude Code.
🤖 Generated with Claude Code
Checks
- SuccessfulCodeRabbitGitHub
Review completed
- Successful
Skipped - Not affected
- Skipped
- Skipped
- Skipped
- SuccessfulRemove preview downloadGitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- SuccessfulLabel PR 22729GitHub
- Successful
- Successful
- Successful
- SuccessfulPrepare PR size configGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulCheckGitHub
- SkippedRelease SmokeGitHub
- Skipped
- SkippedRustGitHub
- SuccessfulTestGitHub
- SuccessfulBuild and TypecheckGitHub
- SuccessfulTest WebGitHub
- SuccessfulLabel PR 22729GitHub
- Skipped
- SuccessfulLabel PR sizeGitHub
- SuccessfulTest Server 3GitHub
- SuccessfulTest Server 2GitHub
- SuccessfulTest Server 5GitHub
- SuccessfulTest Server 4GitHub
- SkippedEAS PreviewGitHub
- SuccessfulLintGitHub
- SuccessfulTest Server 6GitHub
- SuccessfulTest Server 1GitHub
- SuccessfulTest Server 7GitHub
- SuccessfulTest Server 8GitHub
- SuccessfulChangesGitHub
- SuccessfulCollect PR targetsGitHub
- SuccessfulPrepare PR size configGitHub
- SuccessfulNative fingerprint diffGitHub
Added 1 commit
- refactor(web): sidebar list markers and draft rows live in their own filesaf638e8
Approvability
Verdict: Approved at af638e8
Macroscope's review found this PR approvable — This PR reorganizes existing sidebar draft and drag-marker code into dedicated files while preserving the same logic and call sites. It does not introduce new behavior, schema changes, defaults, or static-analysis overrides.
You can add or adjust custom eligibility rules. Learn more.
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:
6e1499b2-0a83-4b4a-ad14-abb69d84f592
📥 Commits
Reviewing files that changed from the base of the PR and between 12757e8bc5e470d60bc1dc0eac747a9a1293cb87 and af638e8f4df7d5e2928f1996fd5f3a3c5f158e93.
📒 Files selected for processing: 3
apps/web/src/components/Sidebar.tsxapps/web/src/components/sidebar/SidebarDraftBlock.tsxapps/web/src/components/sidebar/SidebarListMarkers.tsx
Limit details: You’ve used all 10 included reviews currently available.
📝 Walkthrough
Sidebar draft rows and sortable section markers now live in dedicated modules.
Sidebar.tsximports these components and removes their former in-file implementations.Changes: Sidebar Component Extraction
Layer / File(s) Summary Sortable section markers
apps/web/src/components/sidebar/SidebarListMarkers.tsxAdds sortable markers, section placeholders, drag boundaries, and collapsible section headers with drop-target and drag styling. Draft rows and selection
apps/web/src/components/sidebar/SidebarDraftBlock.tsxAdds draft row rendering and logic to filter, scope, and sort drafts. Rows support navigation, context menus, and discard actions. Sidebar module integration
apps/web/src/components/Sidebar.tsxImports the dedicated components and removes their local implementations and unused imports. Priority: ⬇️ Low
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Refactor
Merge Risk: ⚪ Minimal · up to af638
This refactor moves sidebar markers and draft rows into separate files without intended behavior changes. No concrete merge-blocking risk 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 and lists verification commands, but it does not provide the required scope and approval details. It also does not clearly separate the problem and change section… Add the required Problem, Change, and Scope and approval sections. Link the triaged issue or maintainer approval, or explain why this focused refactor qualifies for an exemption. Expand Verification with observed results and state any check… Passed Passed checks: 3 passed
Check name Status Explanation Title check Passed The title clearly and concisely describes the primary change: moving sidebar list markers and draft rows into separate files. 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 and lists verification commands, but it does not provide the required scope and approval details. It also does not clearly separate the problem and change sections or report complete verification results.
Resolution
Add the required Problem, Change, and Scope and approval sections. Link the triaged issue or maintainer approval, or explain why this focused refactor qualifies for an exemption. Expand Verification with observed results and state any checks that could not be completed.
✨ 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
Usage-based review receipt
- Mode: Continue automatically
- Reviewed files: 3
- Charged: $0.75
- View usage details
Note
This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
Comment @coderabbitai help to get the list of available commands.