Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
||
| const trackedPatchSegments = headExists | ||
| ? [ | ||
| yield* runGitStdoutWithOptions( |
There was a problem hiding this comment.
🟡 Medium Layers/GitCore.ts:1362
readWorkingTreeDiff passes maxOutputBytes: LARGE_DIFF_MAX_OUTPUT_BYTES but leaves truncateOutputAtMaxBytes as the default false. When the diff exceeds 5MB, collectOutput throws a GitCommandError instead of truncating. This is inconsistent with prepareCommitContext and readRangeContext, which both set truncateOutputAtMaxBytes: true to handle large outputs gracefully. Consider adding truncateOutputAtMaxBytes: true to all three runGitStdoutWithOptions calls in this function.
🤖 Copy this AI Prompt to have your agent fix this:
In file apps/server/src/git/Layers/GitCore.ts around line 1362:
`readWorkingTreeDiff` passes `maxOutputBytes: LARGE_DIFF_MAX_OUTPUT_BYTES` but leaves `truncateOutputAtMaxBytes` as the default `false`. When the diff exceeds 5MB, `collectOutput` throws a `GitCommandError` instead of truncating. This is inconsistent with `prepareCommitContext` and `readRangeContext`, which both set `truncateOutputAtMaxBytes: true` to handle large outputs gracefully. Consider adding `truncateOutputAtMaxBytes: true` to all three `runGitStdoutWithOptions` calls in this function.
Evidence trail:
apps/server/src/git/Layers/GitCore.ts lines 1360-1391 (REVIEWED_COMMIT): three runGitStdoutWithOptions calls in readWorkingTreeDiff with only `maxOutputBytes` set. apps/server/src/git/Layers/GitCore.ts lines 600-607: collectOutput throws GitCommandError when truncateOutputAtMaxBytes is false and max exceeded. apps/server/src/git/Layers/GitCore.ts lines 1452-1460 (prepareCommitContext) and 1652-1676 (readRangeContext): all set `truncateOutputAtMaxBytes: true`.
Addresses #1590 and #1122
What Changed
Why
I will often use agents in combination with manual changes or with other agents. When I do this, I need the ability to review the changes to the branch holistically. T3 Code's diff UI is actually quite pleasant to read, and thus I wanted to have the ability to review the entire branch's changes from the primary UI I use in development. I find that this is critical when using a generative tooling like T3 Code for real production workflows that will affect real users.
UI Changes
Diff pane buttons
before:

after:

(red: git/session toggle, blue: expand/collapse all)
Smaller diff card headers
before:
(tbd, I dont have the ability to create session diffs on this laptop)
after:

Checklist
Note
Add git working tree diff pane with session/git scope toggle to DiffPanel
readWorkingTreeDiffmethod toGitCorethat generates a unified patch covering tracked, staged, unstaged, and untracked changes, handling repos with or without an initial commit.git.diffRPC method, wired through contracts, transport, and native API layers.diffScopeto the diff route URL search params;ChatViewnow setsdiffScope: "session"when opening a turn diff.📊 Macroscope summarized 218fee3. 15 files reviewed, 2 issues evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues