Skip to content

Split reviews-sidebar.tsx into focused sibling components - #839

Merged
selfcontained merged 1 commit into
mainfrom
agt_093db8328081/job-componentizer-90e20391
Jul 27, 2026
Merged

Split reviews-sidebar.tsx into focused sibling components#839
selfcontained merged 1 commit into
mainfrom
agt_093db8328081/job-componentizer-90e20391

Conversation

@selfcontained

Copy link
Copy Markdown
Owner

What

Pure structural refactor of apps/web/src/components/app/reviews-sidebar.tsx (685 lines), the largest unworked candidate on the componentizer backlog. No behavior, markup, or styling changes — components moved whole with their hooks, so mount lifetimes are unchanged.

New file structure

  • reviews-sidebar.tsx (685 → 100 lines) — now just the ReviewsSidebarContent shell: review list query, expandReview URL state, diff-file-path set, and empty/loading states. Public API unchanged (media-sidebar.tsx and the test file keep their imports).
  • reviews-sidebar-row.tsx (270 lines, new) — ReviewRow with its sticky-header pinning + scroll-into-view effects, plus the REVIEW_STATUS_STYLES constants.
  • reviews-feedback-item.tsx (326 lines, new) — FeedbackItemRow (expand/reply/resolution state) with private ThreadMessage and the formatFilePath/compactFilePath/feedbackState helpers, which only it used.

Why it was a candidate

835 lines at last audit (685 after PRs #836/#837 extracted the shared feedback-card parts) — four components plus helpers in one file, well over the ~300-line guideline.

Validation

  • pnpm run finalize:web green; reviews-sidebar.test.tsx (6 tests) green; pnpm run test:e2e green (170 passed).
  • Playwright visual pass on a seeded review: expanded review row, feedback item, thread message, reply button, and resolution footer all render identically.

Queued next

diff-annotations.tsx (741 lines) — compound-component split, one file per exported annotation component.

🤖 Generated with Claude Code

Pure structural refactor: reviews-sidebar.tsx (685 lines) becomes a thin
ReviewsSidebarContent shell (100 lines), with ReviewRow + status styles
moved to reviews-sidebar-row.tsx (270) and FeedbackItemRow + ThreadMessage
+ path helpers moved to reviews-feedback-item.tsx (326). No behavior change.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@selfcontained
selfcontained merged commit c8e4ea1 into mainJul 27, 2026
1 check passed
@selfcontained
selfcontained deleted the agt_093db8328081/job-componentizer-90e20391 branch July 27, 2026 08:11
Sign up for freeto 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.

1 participant

@selfcontained