Repository navigation
Show before/after image previews in the Git pane - #1615
Conversation
… Automations: natural-language authoring (describe it in chat
… P2: Replay-fixture provider harness: recorded CLI output thr
Selecting a changed PNG/JPEG/GIF/WebP/BMP in the Git pane shows the old and new image side by side, read from the exact refs the selected scope diffs (HEAD, merge base or turn checkpoint vs working tree/checkpoint). Each side carries its revision label, dimensions and file size, over a checkerboard with Fit/100%/200% zoom; a missing side says added/deleted. The host reads via cat-file and plain file reads (never the index), sizes images from headers, and caps transfers at 8 MB and 25 MP with a note fallback. Symlinks and paths outside the tree are refused. Staged renames carry oldPath. SVG is deferred and keeps its text diff. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4aa62b1c3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (filePath.includes(" -> ")) { | ||
| filePath = filePath.split(" -> ").pop() || filePath; | ||
| const [from, ...rest] = filePath.split(" -> "); | ||
| oldPath = from.replace(/^"|"$/g, ""); |
There was a problem hiding this comment.
Parse the quoted rename delimiter before extracting oldPath
When a staged rename's original filename contains the literal -> sequence, porcelain can return a line such as R "old -> icon.png" -> logo.png; splitting on every occurrence records oldPath as old rather than old -> icon.png. Selecting the renamed image then asks cat-file for a nonexistent before-side path and incorrectly displays it as missing, so the parser needs to identify the rename separator outside the quoted filename.
Useful? React with 👍 / 👎.
automation_create now echoes the #1604 trigger fields (team, status, org, project, environment) and stored threads carry prLinks: []. Both tests fail identically on main; they predate #1192. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A cold dynamic import() could outlast the three-tick flush on loaded CI runners (ubuntu and windows, runs 38304474453), so the iframe assertion saw nothing. Importing the module up front lets React.lazy resolve from the module cache. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…indows CI node --test applies --test-timeout to each file as well as each test. On windows-latest several renderer files now take 17-20s, so whichever crosses 20s fails as testTimeoutFailure (appWiring on main #1615, threadView here) while running in under 3s locally. 60s still catches a wedged file well inside the 25-minute job limit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-0c31dd Replay harness files take main's #1614 version. htmlFence takes main's warm-import fix (#1615); threadView uses the same warm import instead of polling. Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Merge worktree coder/automations-natural-language-authoring-d-4d26e0: Automations: natural-language authoring (describe it in chat * Merge worktree coder/p2-replay-fixture-provider-harness-recor-9dbd6f: P2: Replay-fixture provider harness: recorded CLI output thr * coder-checkpoint: turn 70 Solenta-Message-Id: 306b13e4-79c9-4f4d-bc27-923754043258 * Fix main's red CI: preload HtmlPage in tests, refresh two stale fixtures HtmlPage used plain React.lazy, which mount() never preloads, so on a cold CI runner the tool.html card suspended past three flushes and its late resolve tripped the next test's act() gate. lazyNamed puts it in the preload set like every other lazy view. automation-create-mcp and store round-trip expectations predate the Linear/Sentry trigger fields (#1588) and prLinks normalization. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Raise renderer --test-timeout to 60s: it bounds whole files on slow Windows CI node --test applies --test-timeout to each file as well as each test. On windows-latest several renderer files now take 17-20s, so whichever crosses 20s fails as testTimeoutFailure (appWiring on main #1615, threadView here) while running in under 3s locally. 60s still catches a wedged file well inside the 25-minute job limit. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Willem <[email protected]> Co-authored-by: Solenta <solenta@local> Co-authored-by: Willem <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
…indows CI node --test applies --test-timeout to each file as well as each test. On windows-latest several renderer files now take 17-20s, so whichever crosses 20s fails as testTimeoutFailure (appWiring on main #1615, threadView here) while running in under 3s locally. 60s still catches a wedged file well inside the 25-minute job limit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-0c31dd Replay harness files take main's #1614 version. htmlFence takes main's warm-import fix (#1615); threadView uses the same warm import instead of polling. Co-Authored-By: Claude Opus 5.5 <[email protected]>
What
When the selected file in the Git pane is a raster image (PNG/APNG, JPEG, GIF, WebP, BMP), the pane now shows the before and after images side by side instead of the text diff. You can view them at Fit, 100% or 200%. Closes #1192.
New IPC
git:imageDiff(electron/worktrees-changes.js): reads both sides from the same refsdiff()compares for each scope:It is read-only and uses only
git cat-fileand plain file reads. Each side comes back with a label (for exampleHEAD 1a2b3c4orWorking tree), its byte size, its dimensions and adata:URL.Header-only sizing (
imageInfo): format and dimensions are parsed from the file header without decoding the image. SVG is left out on purpose because it is text and keeps its text diff.Limits: each side is capped at 8 MB transferred and 25M pixels. The blob size is checked with
cat-file -sbefore the bytes are read, so an oversized blob is never loaded. Working-tree reads reject symlinks and any path that resolves outside the worktree, and the size is checked again after reading in case the agent was still writing the file. Remote projects get an error instead.Renames:
diff()now keepsoldPathfor->entries in porcelain status, so the before side of a rename is read from the old path.gitExecThrowAsyncgains abufferoption that returns raw stdout bytes for blob reads.UI: the new
ImageDiff.tsxcomponent is wired intoChangesPanelthroughonFetchImageDiff. It re-fetches on each diff reload (Refresh, commits) and ignores stale responses. An added or deleted image shows "Not in …" on the missing side. Oversized or unsupported files show a note instead of a preview.The new type, channel and API are added to
shared/ipc.ts, the IPC channel list, preload, web scopes,useCoder/useCoderWorkspace, and the dev/fake coder shims.Why
Before this change, a changed image showed up as a useless binary diff, so you couldn't review image edits from an agent inside the Git pane.
Tests
electron/test/worktrees-image-diff.test.js: header parsing, scope refs, renames, limits and the symlink/escape guards.test/imageDiff.test.tsx: renderer behaviour of the image view.🤖 Generated with Claude Code