fix(agent-manager): batch worktree diff details - #13449
Merged
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous Review Summary (commit 44395d3)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 44395d3)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
Files Reviewed (27 files)
Reviewed by grok-4.6 · Input: 116.2K · Output: 11.4K · Cached: 322K Review guidance: REVIEW.md from base branch |
marius-kilocode
enabled auto-merge
August 26, 2026 07:54
WebReflection
approved these changes
Aug 26, 2026
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
Opening an Agent Manager worktree review starts separate Git size, content, and patch commands for each changed file. On a 12-file review with 10 tracked files, that means about 30 Git subprocesses, unnecessary disk contention, and a visible delay before every expanded diff is ready.
Why This Change Was Made
Use size-checked
git cat-file --batch-check, binary-safegit cat-file --batch, and one path-scoped combinedgit diffto materialize eligible text files together. Keep complete file contents and hunk-bounded patches, preserve project ownership and source cancellation, and explicitly defer files that exceed the aggregate memory budget to the existing single-file path. Images, binary files, unsupported paths, failed batches, and non-bulk sources continue to use their existing behavior.User Impact
Cached worktree switching, full-screen review, scrolling, images, and complete expanded diffs remain available.
Evidence
bun run test:unit: 4,210 passing tests on the rebased branch.bun run build:check,bun run knip, andbun run check-kilocode-changepass.Closes #13415