fix(diff): head each deferred diff with its module and target#29
Merged
Conversation
Now that diffs print together at the end instead of inline with the operation logs, they lost the surrounding context that told you which module produced a change and which repo it belonged to. Restore it: - quick mode: DiffCollector carries the module name and a target label (rendered repo URL + branch, or the target dir) with each diff and prints a header before it, deduped across consecutive same-target diffs. - full mode: printTargetDiffs heads each target's git diff with the module (from the numbered clone dir), the origin remote URL, and the base branch read from the clone itself. Adds spec rule DF4 and header assertions to the DF1/DF2 tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
rickliujh
force-pushed
the
feat/loom-diff-command
branch
from
July 22, 2026 22:41
d23ddb6 to
f23edc6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the
loom diffcommand (merged in #28).Problem
Now that diffs print together at the end of a run instead of inline with the operation logs, they lost the surrounding context that told you which module produced a change and which repo it belonged to — leaving a wall of diffs with no attribution.
Fix
Head each deferred diff with its module and target:
DiffCollectornow carries the module name and a target label (rendered repo URL + branch, or the target dir) with each diff and prints a header before it — deduplicated across consecutive diffs from the same module and target.printTargetDiffsheads each target's git diff with the module (from the numbered clone dir), theoriginremote URL, and the base branch — all read from the clone itself, so it works for bulk/child modules too.In a terminal the module renders as an inverted chip and the repo/branch in muted gray, matching the log handler's style.
Spec & tests
go test ./...,go vet ./..., gofmt, and spectrace all clean.🤖 Generated with Claude Code