Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/CODE_MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ A metric is its analyzer plus one catalog entry; the step-by-step checklist is `
| Before/after dependency graphs on one union layout (changed files center, importers left, imports right; added/removed edges; ghosts for absent files; "used by N" hubs; linked pan/zoom; expand) | `client/src/compare/CompareGraph.tsx`, model in `client/src/compare/graphModel.ts` (feeds `viz/deps/layout.ts:layoutViewSync`) |
| Shared bits (status icon, diffstat, health, magnitude and split bars), labels/formatting/health | `client/src/compare/bits.tsx`, `client/src/compare/metrics.ts` |

Compare design:

- The diff runs on the server, and the client only draws. `diff.py` is a pure module that turns two cached trees and two graphs into one payload, so the UI and `srcly compare` share one definition of better and worse.
- Compare gives each metric and each file its own better, worse or neutral verdict. It gives no single verdict for the whole change. A metric that is N/A on either side gets no delta.
- Views focus on changed files by default. The output comes from disk and the git diff only, with no LLM in the path.
- The treemap and the graph each lay out the union of both sides once, then filter per side. Unchanged nodes keep the same position on both sides.
- A commit snapshot is a `git worktree add --detach` in srcly's cache directory. It never touches your checkout, branch or stash, and real paths keep tsconfig and package roots working.
- Compare is its own view beside the normal one. Non-git folders and commits outside the local clone are out of scope.

Ref picker rules:

- A PR's base is the merge-base of its own `baseRefName` and its head, as GitHub diffs it. PRs are often stacked, so the default branch is the wrong base.
Expand Down
15 changes: 15 additions & 0 deletions docs/initiative-history.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,20 @@
],
"revision": "0bfb05ba",
"follow_ups": []
},
{
"title": "PR compare mode",
"slug": "pr-compare",
"outcome": "completed",
"retired_at": "2026-11-12",
"summary": "srcly compare and a compare mode UI landed: a CLI with commit snapshots and metric deltas, a changed-files table, side-by-side treemaps and before/after dependency graphs on shared union layouts. Reconciled against origin/main 0bfb05ba.",
"reason": "All four milestones were marked completed and their PRs merged on 2026-10-15 (#38, #39, #40, #41).",
"documentation": [
"docs/CODE_MAP.md"
],
"revision": "0bfb05ba",
"follow_ups": [
"Longer-horizon ideas in claim C8 (change islands, PR splittability, ripple frontier) were never planned and are not tracked."
]
}
]
97 changes: 0 additions & 97 deletions docs/intent/pr-compare/implementation-plan.md

This file was deleted.

Loading
Loading