#462·hunk

Auto-collapse generated, lockfile, and minified files in review

Author: benvinegarCreated Jun 20, 2026Updated Sep 30, 2026
Labelsenhancementui

Gap

Agent changesets are full of noise — lockfiles (bun.lock, package-lock.json), generated code, snapshots, minified bundles. Today hunk only has a size-based isTooLarge placeholder; it doesn't recognize generated/noise files and still streams them into the review at full weight.

What competitors do

difit auto-collapses deleted files, lockfiles, minified code, and generated output. It uses content-based detection (@generated markers, DO NOT EDIT headers, common codegen signatures: source maps, Orval, Protobuf, etc.) plus path heuristics.

Why it matters for hunk

This is squarely on hunk's thesis: reviewing a messy agent changeset. Collapsing the noise so the human focuses on real changes is one of the highest value-to-effort wins available — the collapsed-state UI mostly exists already; this is mainly a detection heuristic + default-collapsed state with one-key expand.

Sketch

  • Heuristic: path globs (lockfiles, dist/, *.min.*, snapshots) + content markers (@generated, DO NOT EDIT).
  • Render such files collapsed by default in sidebar + stream, expandable on demand.
  • Config toggle + a way to override per-repo via .hunk/config.toml.

Source: competitor gap analysis (difit).