Repository navigation
feat(desktop,service,features): draw changed images before and after in Files changed - #3638
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
luke-agent
Bot
force-pushed
the
feat/files-changed-image-diffs
branch
from
October 18, 2026 16:55
937c180 to
c9a3efb
Compare
…efore and after, side by side, swiped, or faded Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…verlays on one canvas, and offers source only with lines Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…he changes Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
…me near before it reads Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
luke-agent
Bot
force-pushed
the
feat/files-changed-image-diffs
branch
from
October 18, 2026 17:20
5ce0431 to
0cae842
Compare
14 tasks done
This was referenced Oct 18, 2026
This branch was successfully deployed
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
Files changed extras, E2 of the "Files changed extras" stack, stacked on #3304.
What was asked: show changed images (png, jpg, gif, webp, svg) before and after instead of "binary file", with stage-cli's cheap modes. Read the bytes for the base and head through the service, inside the agent's own repository only, reusing #3206's image proxy and contents-API path. Bound the size, and mind the CSP.
What the window does
<>button in the header switches to its source, and back.IntersectionObserveron the lead). It is then kept for the window's life (@luke/ui/picture-cache), so a collapsed or far-off image costs nothing. A side whose read failed is asked for again on Refresh changes.data:URLs the window makes, whichimg-srcallows. The swipe clip and the onion-skin opacity are set through React'sstyle(the CSSOM), never style markup.Where the bytes come from
CODING_AGENTS_GITHUB_IMAGEact, asraw.githubusercontent.com/<owner>/<name>/<sha>/<path>. fix(desktop,service,features): draw bot badges and repository screenshots on the Pull request tab #3206'sgithubImageOfreads that address as a FILE image.GITHUB_IMAGE_BOUNDS.MAX_BYTES(8 MB)Service changes
The changes answer gains two optional keys,
headShaandbaseSha:headShacomes from one extraGET /pulls/{n}, run in parallel with the files and people reads the endpoint already makes.baseShais the merge base, not the base branch's tip, so a "before" picture is never one the pull request didn't have. It comes fromGET /compare/{base}...{head}?per_page=1(imageCommits), which runs only when the files include a modified, renamed or deleted image.baseShais left out and the window shows the after side alone with "Previous version unavailable". It never falls back to the base branch's tip.imageTypeOfPathis now exported from@luke/features/github-image, so the service and the window share one extension → type table.Goldens
LUKE_UPDATE_FIXTURES=1regeneratedcodingAgentChangesAnswerSchemaandcodingAgentChangesAnswerViewSchema. Each gains only the two optional string keys,headShaandbaseSha, underpullRequest.Screenshots
From a throwaway harness (fake app bridge, real bundles and stylesheet), since deleted.
Narrow (600px, tree hidden):
Evidence
tsc: pass.pnpm lint,pnpm knip,pnpm discarded-effect,./scripts/repository-checks.sh: pass.pnpm exec vitest run apps/desktop/src/renderer/tasks packages/service/src/agents/coding-agents-app.test.ts packages/service/src/github packages/features/src: 150 files, 1752 tests passed.image-commits.test.ts:per_page=1compareagent-changes-tab.test.ts:pnpm check:affectedran out of memory in this sandbox, so the checks above were run one at a time instead.Invariants
./scripts/check.shgreen. (CI)asassertion.Effect.run*outside the edges.CLAUDE.md/AGENTS.mdsentence names a changed part.PRIVACY.mdunchanged. Images stay inside the list'sph-no-capture.Notes
main.