Skip to content

superparle/better-diff

 
 

Repository files navigation

better-diff

normal diff too much. what if diffs were tldrs i can zoom in and out of

concept

code review has been getting harder with the volume of code to go through due to ai assisted code generation (its a good thing only) looking at diffs kind of became pointless. raw diffs as it is i mean.

you might have come across issues like these

  • large diff block and its just formatter things, but interleaved with important small changes that i might miss
  • i have to jump around multiple parts of the diff since diffs are alpahbetically ordered by file name, not diff blocks by the execution flow they appear
  • fatigue creeps in by just seeing a 2000 line change to comb through

i have to aggressviely prioritize what i should go over and what i can just skim through these days i have to zoom in on things that need scrutiny but brush over things that are arbitary

so something i did at work is:

  1. i treat each diff block as my unit
cleanshot 2026-04-16 at 15 11 37@2x
  1. i take diffs and get the llm to rearrange it in the execution / data flow order. (it splits up blocks within the files as well)
cleanshot 2026-04-16 at 15 12 12@2x
  1. then i get a one liner description for each of the diff like "formatter changed" "anthropic key changed to openrouter"
cleanshot 2026-04-16 at 15 13 03@2x
  1. and then i get a pr level or natural language description of the entire diff
cleanshot 2026-04-16 at 15 13 30@2x
  1. and read it all the way from the bottom to top, so that i go from the least information to detail as i need

i jump in and out out of my summaries, natural lang diffs, rearranged diffs, and the raw diffs.

this is the core idea, and i wanted this as a core primtive in my code editor / agent workspace. the old diff view just feels slow to work with.

in an ideal world i can blindly rely on the ai you wouldnt need this but in places where its no there yet, i felt like there needs to be a middle ground, and i think this is it.

this wasnt possible before this general intelligence being available. reordering diff blocks require some intelligence. converting them into natural language defo. making a flexible tldr of that, yeah.

cant this be just a skill, i think most things could be represented by a instruction and a text output. there is a seamless in and out experience i wanted and how it integrates with other system text could represent this but i think its too inefficient of a representation and is too much detail for me to handle at once i like boxes hiding away detail from me

dev flow

how to run this

  1. have bun
  2. do bun install
  3. bun install
  4. bun run dev
  5. load up your project run something and check the diff out

About

A beautiful web-based UI for Claude Code & Codex

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 94.4%
  • JavaScript 3.8%
  • CSS 1.5%
  • HTML 0.3%