fix: improve session diff viewing infrastructure - #29
Merged
Merged
Conversation
dylsteck
force-pushed
the
codex/diff-viewer-codeview
branch
from
May 30, 2026 23:11
133a9db to
b796c9e
Compare
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.
Summary
This PR improves the existing session right-sidebar Git tab diff infrastructure. It does not add a new review page, modal, or separate review surface.
@pierre/diffsto^1.2.5.PatchDiffpath with virtualizedCodeViewrendering.parsePatchFilesinstead of a regex splitter.Backend
GET /chat/:sessionId/git/stateresponse shape stable:diff.patch,diff.truncated,diff.files,diff.additions,diff.deletions.git diff ... | head -c 250000path.GitHubRepoError/StreamWriteErrorfailures.MAX_PATCH_BYTES + 1, cancels the stream on truncation, and falls back to boundedresponse.text()when GitHub returns no stream body.pulls.listFilesfor file metadata andpulls.listCommitsfor commit rows.Tests / Verification
pnpm --filter web test -- git-tab-diff-model.test.tspnpm --filter api test -- github-pr-diff.test.ts session-git-state.test.tspnpm --filter web typecheckpnpm --filter api typecheckpnpm build && pnpm lint && pnpm typecheck && pnpm testpnpm openapi:checkpnpm sdk:generate:checkReference with many learnings that were used to help shape this PR: https://pierre.computer/writing/on-rendering-diffs