Skip to content

feat: soft theme, partial diff hydration, and base branch switcher - #29

Merged
imfing merged 7 commits into
mainfrom
feat/diff-view-enhancements
Aug 6, 2026
Merged

feat: soft theme, partial diff hydration, and base branch switcher#29
imfing merged 7 commits into
mainfrom
feat/diff-view-enhancements

Conversation

@imfing

@imfing imfing commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add Pierre Soft diff theme and hydrate partial diffs with full file contents for hunk expansion
  • Make the branch-view base ref a clickable switcher (local + remote-tracking branches via /api/branches)
  • Build web assets before cargo run in pnpm dev so embedded UI stays current

imfing added 6 commits August 5, 2026 01:25
Adds a loadDiffFiles loader to the diff viewer so hunk expansion can
reach the entire file instead of dead-ending at the patch context.

- GET /api/blob serves repo blobs by (abbreviated) object id, or
  working-tree files by validated repo-relative path (worktree=1)
- GET /api/pull/{org}/{repo}/{number}/file proxies one side of a PR
  file from GitHub via gh, fork-aware at the base/head sha
- both cap contents at 5 MB and reject binary (NUL byte) content
- the web loader picks blob oid vs worktree vs PR proxy per source
  and hydrates both sides in parallel; failures leave the diff partial
@imfing imfing changed the title Diff view enhancements: Soft theme, hydration, base switcher feat: soft theme, partial diff hydration, and base branch switcher Aug 5, 2026
Pure renames carry no index line, so the local-store hydration path threw
'missing prevObjectId' whenever a rename-pure file was expanded. Read the
unchanged content from the worktree instead, and reject an all-zeros
prevObjectId up front rather than 404ing on the blob fetch.
@imfing
imfing marked this pull request as ready for review August 5, 2026 21:11
@imfing
imfing merged commit e96b041 into main Aug 6, 2026
8 checks passed
@imfing
imfing deleted the feat/diff-view-enhancements branch August 6, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant