# refactor\(web\): the pull request header's actions live in their own components · PR \#22702 · pingdotgg/t3code

[View on GitCafe](https://git.cafe/pingdotgg/t3code/pull/22702)

Repository: [pingdotgg/t3code](https://git.cafe/pingdotgg/t3code)

Visibility: public

State: merged

Source repository: pingdotgg/t3code

Source branch: refactor/split-pull-requests-detail-actions

Target branch: refactor/split-pull-requests-detail-header

Head commit: 4207420d8e84e7f4937474921a1295c4675601de

[Discussion and reviews](https://git.cafe/pingdotgg/t3code/pull/22702)

[Commits](https://git.cafe/pingdotgg/t3code/pull/22702/commits?format=markdown)

[Files changed](https://git.cafe/pingdotgg/t3code/pull/22702/diffs?format=markdown)

## Description

---

The header's controls (checkout menu, resolve-conflicts button, primary merge/ready/auto-merge control, approve-workflows button and the overflow menu) were ~600 lines of JSX inside the panel.

- `PullRequestDetailActions.tsx`: checkout menu, resolve conflicts, primary action, approve workflows, environment picker.
- `PullRequestActionsMenu.tsx`: the overflow menu; it reads keybindings itself.

Each control now owns its own inline-confirm state, so arming "Confirm merge?" re-renders that control instead of the panel. Disarm behavior is unchanged: any pointerdown outside the armed element, Escape, blur or the 3 s timeout still clears it.

| File | Before | After |
|---|---|---|
| PullRequestDetailPanel.tsx | 2,545 | 1,985 |
| PullRequestDetailActions.tsx | - | 443 |
| PullRequestActionsMenu.tsx | - | 371 |

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](https://claude.com/claude-code)

