Skip to content

perf(web): the branch picker compiles without manual memoization - #20557

Merged
juliusmarminge merged 1 commit into
mainfrom
rc2/branch-picker
Oct 17, 2026
Merged

juliusmarminge merged 1 commit into
mainfrom
rc2/branch-picker

Conversation

@juliusmarminge

Copy link
Copy Markdown
Member

BranchPicker wrapped its open, pagination and scroll-fade handlers in manual useCallback, which kept it out of the React Compiler strict bar.

The handlers are now plain functions. The compiler caches them on the same inputs, and the scroll-fade updater stays a constant so the layout effect still only re-runs when the popup opens. The file joins REACT_COMPILED_FILES. No behaviour change.

🤖 Generated with Claude Code (Claude Opus 5.5)

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Oct 17, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 17, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 17, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 9d6c9cd

Macroscope's review found this PR approvable — This is a localized React Compiler cleanup that removes redundant manual memoization while preserving the branch picker's existing handler logic and effect behavior. It introduces no new capability, schema, product default, or sensitive-area change.

Notes:

  • All code in this push has already been reviewed. Approvability was decided on eligibility alone.

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

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: b2a2f565-c5a3-441f-b8bb-0d28ddafeefe
📥 Commits

Reviewing files that changed from the base of the PR and between f635792 and 9d6c9cd.

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: 3fa59f77-6b4b-47c5-b1b3-9c69e95a100e
📥 Commits

Reviewing files that changed from the base of the PR and between 7111501 and f635792.

📒 Files selected for processing: 2
  • apps/web/reactCompiledFiles.ts
  • apps/web/src/components/BranchPicker.tsx

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

📝 Walkthrough

BranchPicker replaces memoized callbacks with ordinary functions. Its existing reset, open-state, pagination, and scroll-fade behavior remains. The component is added to the React Compiler file list.

Changes: BranchPicker callback updates

Layer / File(s) Summary
Update BranchPicker callbacks
apps/web/src/components/BranchPicker.tsx, apps/web/reactCompiledFiles.ts
BranchPicker handlers and scroll helpers no longer use useCallback. Their existing behavior is unchanged. BranchPicker.tsx is added to the React Compiler file list.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Refactor

Suggested reviewers: maria-rcks

Merge Risk: ⚪ Minimal · up to f6357

The callback changes have no established behavior regression, and no merge-blocking risk remains beyond normal checks.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description explains the problem and change, but it omits the required Problem, Change, Scope and approval, and Verification sections. It provides no issue or approval link, focused test results, … Rewrite the description using the required headings. Add the problem and expected behavior, explain the implementation, provide the triaged issue or maintainer approval and scope rationale, and document focused verification with observed re…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: compiling BranchPicker without manual memoization. It is concise and uses the repository's conventional commit format.
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 problem and change, but it omits the required Problem, Change, Scope and approval, and Verification sections. It provides no issue or approval link, focused test results, or UI evidence.

Resolution

Rewrite the description using the required headings. Add the problem and expected behavior, explain the implementation, provide the triaged issue or maintainer approval and scope rationale, and document focused verification with observed results. Add before/after screenshots if the UI changed. State any checks that were not run.

✨ 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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@macroscopeapp
macroscopeapp Bot dismissed their stale review October 17, 2026 04:41

Dismissing prior approval to re-evaluate 9d6c9cd

@juliusmarminge
juliusmarminge merged commit 78c0d7d into main Oct 17, 2026
30 checks passed
@juliusmarminge
juliusmarminge deleted the rc2/branch-picker branch October 17, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:S 10-29 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant