Diffo draws a treemap of where agent changes land, rescuing a 20-line parser fix from a 900-line stylesheet
shetritr · reddit · 2026-12-06
A developer shares Diffo's code review visualization: the agent drops a one-line changeset-map fence in its note, and Diffo draws a treemap from the live diff — files as boxes grouped by folder, area proportional to changed lines, plus a line naming the folders holding most of the change (so a 900-line stylesheet no longer drowns out a 20-line parser fix).
Key details:
- Layout uses squarified treemap (Bruls et al.): rows along the shorter side, closed when the next box would worsen aspect ratio; biggest box top-left.
- Weighted "code size": blank lines excluded; styles, docs, JSON/YAML/config count one quarter; generated files one twentieth, since raw line counts lie.
- Floors for visibility: every box gets at least 0.6% of canvas and rows at least 20px, while reported shares stay true.
- Color encodes how each file changed (95%+ additions reads as new), review state, or agent steps.
The whole tool, including the map, was written by Claude Code: it landed as one PR with a 359-line layout module and 14 tests, generated from the author's description of what they wanted to see before reading a change. Free under Apache-2.0 at diffo.io/demo.
More from coding & agent
- 108 agent sessions: Qwen4-35B-A3B is 40% faster than Qwen3.8-27B but loops forever without reasoning — CarstenSpraener · 2026-12-06
- 12 terms to name what you want from AI: coyote time, optimistic updates, quiescence — dotey · 2026-12-06
- Archify: open-source agent skill turns any idea or codebase into interactive diagrams — Promptmethus · 2026-12-06
- research-loop-skills: 7 open-source skills to make AI agents do evidence-first research — Promptmethus · 2026-12-06
- Hi0 runs an isolated Linux desktop as a local MCP server so agents can safely use real apps — Pitiful-Ad4680 · 2026-12-06
- MCP Inspector Web 0.1.2 adds per-tool share links, pre-registered OAuth, and curl export — kr-jmlab · 2026-12-06