refactor(web): the pull requests column lives in its own component#22671

merged1
main
refactor/split-pull-requests
opened3d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 3d ago

routes/_chat.pull-requests.tsx was 2,502 lines: the route, the page's state, and the column's header, search and filter chrome all in one file.

This moves PullRequestsColumn (with its expandable search and refresh control) into components/pullRequest/PullRequestsColumn.tsx, CompactFilterMenu into PullRequestCompactFilterMenu.tsx, and the state/involvement/sort option lists into pullRequestListOptions.ts. No behavior change; the column was already its own component, so render boundaries are unchanged.

FileBeforeAfter
routes/_chat.pull-requests.tsx2,5022,100
PullRequestsColumn.tsx-293
PullRequestCompactFilterMenu.tsx-93
pullRequestListOptions.ts-40

Part of the pull request page split stack: #22671 → #22672 → #22702 → #22703 → #22704 → #22705 → #22706.

Measured with the rc-init render counter against a dev server seeded from real data (136 pull requests listed), fresh browser per side, main 6a6c84f990 vs the stack top. Opening a PR detail: 6482 / 947 / 1249 renders on main vs 6331 / 1187 / 956 on the stack (noise, the first open includes data arriving). Switching Summary/Timeline/Code: 2-13 renders per switch on both sides. Holding Shift 3 times on the list: 14952 vs 14937 renders; the page and column no longer re-render (6 + 6 before, 0 after), the rows still do because their speed-mode prop really changes.

Tests run on this layer: tsc --noEmit for apps/web, vp lint on the changed files, vp test run src/reactCompilerCoverage.test.ts -t pullRequest (every new file compiles with 0 bailouts), vp test run src/components/pullRequest/pullRequestsRouteSearch.test.ts.

🤖 Generated with Claude Code

Checks

All checks passed

Added 1 commit

  • refactor(web): the pull requests column lives in its own component0f7b1fa
Synced from GitHub

Approvability

Verdict: Approved at 0f7b1fa

Macroscope's review found this PR approvable — This refactor extracts the existing pull-request column, compact filter menu, and option constants into dedicated modules without changing their behavior or introducing new runtime capability. The production route still uses the same component structure, callbacks, filtering, search, refresh, and layout logic.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Review in Change Stack →

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: c9c22aa5-7fd6-4158-99b8-7a7e77767df6
📥 Commits

Reviewing files that changed from the base of the PR and between 6a6c84f9906cbdfa7f533fecfc39ce18c2f4c273 and 0f7b1fa34cfd384b42d234f9485a91dbb2d8d188.

📒 Files selected for processing: 4
  • apps/web/src/components/pullRequest/PullRequestCompactFilterMenu.tsx
  • apps/web/src/components/pullRequest/PullRequestsColumn.tsx
  • apps/web/src/components/pullRequest/pullRequestListOptions.ts
  • apps/web/src/routes/_chat.pull-requests.tsx

Limit details: You’ve used all 10 included reviews currently available.

📝 Walkthrough

The pull-request route now uses shared filter options and components. The compact filter menu handles option selection and unavailable options. The pull-request column provides responsive filters, search, refresh controls, and scroll-driven header condensation.

Changes: Pull-request list

Layer / File(s)Summary
Shared filter options and menu
apps/web/src/components/pullRequest/PullRequestCompactFilterMenu.tsx, apps/web/src/components/pullRequest/pullRequestListOptions.ts, apps/web/src/routes/_chat.pull-requests.tsx
Shared involvement, state, and sort options are defined and used by the compact filter menu. The route uses the shared menu for sorting.
Responsive column and route migration
apps/web/src/components/pullRequest/PullRequestsColumn.tsx, apps/web/src/routes/_chat.pull-requests.tsx
The column provides responsive filters, search, refresh controls, and scroll-driven header condensation. The route removes its local implementations and uses shared components.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Refactor

Suggested reviewers: maria-rcks

Merge Risk: ⚪ Minimal · up to 0f7b1

This refactor moves the pull requests column, compact filter menu, and option lists into separate files without intended behavior change. No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 4
Check nameStatusExplanation
Title checkPassedThe title clearly identifies the main change: extracting the pull requests column into its own component. It is concise and specific.
Description checkPassedThe description explains the original problem, the extracted components, the scope, the related pull request stack, measured behavior, and focused validation commands. It does not use the template hea…
Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the original problem, the extracted components, the scope, the related pull request stack, measured behavior, and focused validation commands. It does not use the template headings and does not include the required before/after UI screenshots or explicit maintainer approval details, but it is otherwise sufficiently complete and relevant.

✨ 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

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.