Repository navigation
perf(server): command palette status rows skip the Changes totals they never show - #32351
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Passive status rows skip unused Changes totals while full subscriptions and direct reads retain them. The change is limited to read-only status computation and in-memory caching, with no persistent-data or product-default changes. You can add or adjust custom eligibility rules. Learn more. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
juliusmarminge
left a comment
There was a problem hiding this comment.
Thanks @Yuruzuu for the careful performance work! #32947 (0d809db501) now avoids full status reads for the main sidebar branch labels. Could you cut this PR down to the remaining ThreadRowLeadingStatus / command-palette status consumer, which still requests full local status, and retain the coverage needed for that path?
…y never show Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e1dd022 to
c3a534c
Compare
|
Thanks @juliusmarminge. Rebased onto #32947 and cut down to the |
# Conflicts: # apps/server/src/vcs/VcsStatusBroadcaster.ts
# Conflicts: # apps/server/src/vcs/VcsStatusBroadcaster.test.ts # apps/server/src/vcs/VcsStatusBroadcaster.ts
|
@juliusmarminge Ready for another look. As described above, this is cut down to the |
# Conflicts: # apps/server/src/vcs/VcsStatusBroadcaster.ts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nch-totals Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ef40392 to
3910b3a
Compare
EvidenceOn the same Windows Server 2025 machine, seed ten Replay threads in separate sparse worktrees retaining a real 30-commit branch difference, one modified README.md and one untracked file. Restart the real app per trial, open General settings, press Ctrl+K and search
Delivery improves 57.4%. The 2,860 ms median improvement exceeds both full run ranges (1,024 ms and 464 ms); the ranges do not overlap. All sixteen normalized branch/dirty/working-tree results match. Displayed Completed labels and branch names are unchanged. This measures status delivery, not palette first-paint latency. Seed/start/stop driver · Browser measurement script · Capture renderer · All samples · Summary · Reproduction notes Not shown:
|


Problem
The command palette's thread rows (
ThreadRowLeadingStatus) subscribe to local git status withincludeRemote: falseto show each thread's PR state. Every one of those subscriptions also paid for the branch-wide Changes totals, which only the thread header shows. Opening the palette over many threads ran 16 git processes per row instead of 3, competing for CPU and disk with whatever the user was waiting on, including the turn-end checkpoint capture.#32947 moved the sidebar's branch labels to a branch-only stream, so this PR now covers only the palette rows.
Change
branchChangesis already optional in the contract, soincludeRemote: falsesubscribers can go without it.GitManager.localStatustakes{ includeBranchChanges?: boolean }, defaulting totrue. Reads with and without totals use separate cache entries, so a light result is never served to a caller that shows totals. Invalidation clears both.VcsStatusBroadcastercounts, per cwd, who needs totals: full subscribers plus in-flightgetStatusandrefreshStatuscalls. Status reads, including the detailed path ofrefreshBranchStatus, compute totals only while that count is above zero.Callers that don't pass the option, including turn start, MCP, and auto-pull, keep the full read. No client or contract changes.
Scope and approval
Cut down at a maintainer's request in review. It stops computing data the requesting client never displays, without changing what any client shows, product defaults, or contracts.
Verification
vp test runon theVcsStatusBroadcaster,GitManager, andGitWorkflowServicetests: all pass apart from 2 skips that also skip onmain.main, because the light snapshot carriesbranchChanges.Measured before the rebase, with the real
GitVcsDriverandVcsProcesson Windows 11: a 31,771-file clone, N concurrent light statuses on one cwd plus one checkpoint capture, medians. The harness calls the git driver directly and leaves out GitManager's 1 s result cache.Not checked: a run in a real client.
Made with Claude Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code