feat: diff module breadcrumb#32
Merged
Merged
Conversation
Bulk-run items share one source, and thus one metadata.name, so a diff headed by that name cannot say which item it belongs to. The instance name that does distinguish them already labels the logs but never reaches the diff. Add the shared primitive the fix needs: RunOptions.ModulePath carries the instance breadcrumb (root name -> this instance name), extended as each child is dispatched and copied into every ExecutionContext. A DirLabels registry maps each local clone dir to its breadcrumb so full-mode diff — which reads changes back from the clone dirs, not the in-memory collector — can head diffs with the same identity. Initialize the numbered-clone counter once at the run's root so the per-child opts copies share one monotonic sequence instead of each subtree restarting at 00. No output change yet; the diff headers still key off the metadata name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A bulk run fans one child source out to many items that share a metadata name, so heading every diff with that name left them indistinguishable. Head each diff with the instance breadcrumb instead — the run's root name, then the item's own instance name — keeping the repo URL and branch on their own line beneath for context. The root segment renders as an inverted chip, wrapped in "≡ … ≡" and trailed by muted " › " steps when the run fanned out, matching the log's root marker. Quick mode reads the breadcrumb from the threaded ExecutionContext; full mode reads it from the clone-dir registry the executor now populates. Both share one action.DiffHeader renderer, retiring cmd's duplicate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
With several modules nested in one run, every chip sat in the same left gutter, so nothing showed who ran under whom. The pretty handler already counts a record's module depth; use it to indent each line one step per level of nesting. Depth 1 — the root, or a flat single module — stays flush left; a child's lines (and their attribute bullets) sit one step in beneath the parent that dispatched them. A section header's leading blank line stays flush so it reads as a gap rather than a line of trailing spaces. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A "child (N/M)" batch header is emitted by the parent that dispatches it, but only a depth-1 root got the "≡ … ≡" chip — a nested orchestrator's dispatch rendered as a plain leaf chip, so a deep batch counter floated free of the module that owns it. Tag every dispatch header (KeyDispatch) and, when it is nested (depth > 1), render it as "▸ parent › child (N/M)": a hand-off marker plus the dispatching module's name, indented at the parent's level so the child's own lines nest one step beneath. The run's root keeps its "≡ … ≡" chip. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
No description provided.