Skip to content

feat: diff scope + PR provenance overlay - #8

Draft
bryan-uipath wants to merge 7 commits into
mainfrom
feat/pr-provenance
Draft

bryan-uipath wants to merge 7 commits into
mainfrom
feat/pr-provenance

Conversation

@bryan-uipath

Copy link
Copy Markdown
Owner

npm run analyze -- <repo> --diff <base>..<head> mines one range into data.diff: the changed-file set plus every added line bucketed verbatim / reshaped / new (git --color-moved=zebra, then token-similarity pairing of leftover adds vs dels).

  • Diff scope dims everything outside the changed set; the strata "only" collapse applies to it.
  • Provenance mode paints a cyan → violet → orange "how much must I read" ramp. A diff file is its three origin bands scaled by added lines; untouched files are plinths. Modes change height, never footprint or position.
  • Top-bar diff chip: refs, changed-file count, substantive added lines; click = Provenance.
  • Timeline shows the diff: base..head span as a cyan band with ref labels, branch's own commits in accent; range handles pin to the diff.
  • Parser hardening: --no-renames, pinned color.diff.*, header detection only inside file headers, blank/punctuation-only lines skipped, warn when head ≠ checkout HEAD.

Verification: npm run typecheck, motion probe unchanged, checked on flow-workbench and this repo.

🤖 Generated with Claude Code

bryan-uipath and others added 7 commits September 7, 2026 13:00
`--diff <base>..<head>` mines one range into `data.diff`: the changed-file
set (the diff scope) with every added line bucketed verbatim / reshaped /
new. Verbatim comes from git's own --color-moved=zebra; reshaped pairs the
leftover adds against the leftover dels by token similarity.

The scope dims everything it does not contain and gets the strata filter's
"only" collapse; the Provenance mode paints inside it along a
cyan -> violet -> orange "how much must I read" ramp.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
--no-renames so a renamed file's unchanged lines are counted as verbatim
instead of vanishing from the diff; -c color.diff.* pins so a user's palette
cannot break the parser; ---/+++ read as headers only inside a file header;
blank and punctuation-only lines land in no bucket; warn when --diff head is
not the checkout's HEAD.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
A city carrying a diff now says so in every mode: refs as the user named
them, changed-file count, substantive added lines; click = Provenance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
DiffScope carries rev-list base..head plus base/head committer times; the
spark draws the span as a cyan band with ref labels and tints the branch's
own bars in the accent, everything else muted. setRange() pins both handles.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Modes may now change height, never footprint or position: in Provenance a
diff file is its three origin bands (verbatim/reshaped/new) scaled by added
lines, untouched files are plinths. Same instanced mesh via an optional
BandSource; crossing the boundary rises over 300ms. Commit-type filter and
"only the diff" go inert there. The chip and Provenance pin the strata range
to the diff, so Strata's levels are the branch's commits.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…edOut

core.quotePath=false — octal-escaped non-ASCII paths never matched the tree, so
those files fell out of the diff scope; log.showSignature=false so a signed head
still yields %ct. `--diff` with no value silently disabled the pass. movedOut was
mined and typed but never read; MOVED_OLD still keeps git-matched deletions out
of the reshaped pairing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…unts

The collapse button only rendered once collapse was on, so nothing could arm it;
it now stands in every mode but Provenance. Leaving Provenance via "Fix hotspots"
kept the band geometry under a strata paint. setRange dropped its one-day drag
floor (a sub-day PR pinned wrong) and gives up `rangeIsDiff` when an endpoint
clamps; Escape only releases the pin where it is visible. Prov height scale and
the legend file count come from files the city holds, not the repo-wide list.
Docs carry the revised massing rule.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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