Repository navigation
#345 — explore: macro view walking skeleton (Slice 1) - #362
Conversation
…age (#345 Slice 1) Add the explorer macro view's walking skeleton (epic #99): a third explore sub-page, `macro.html`, emitted ONLY when a `--pr-diff` changed a root-project macro. The focused macro DAG (Slice 3) and the filtered model+test directory (Slice 4) render into this shell in later slices; Slice 1 proves the seam end-to-end — conditional emission, the nav round-trip, and the negative path that keeps the two-page output (and its byte-identity goldens) unchanged. - `ExploreMacroTemplate` + `templates/explore-macro.html`: an empty, zero-egress-clean shell mirroring the sibling explore pages' chassis (shared tokens, appearance engine, favicon data: URI). No graph engine, no new asset. - `render_explore` gains `has_macro_focus: bool` (resolved in the CLI, not the renderer — the explore-lane pure-renderer posture). True emits `macro.html` and renders the third nav anchor on every page; false keeps the dag.html/tests.html shape, so the committed explore goldens stay byte-identical (the `{% if has_macro_focus %}` conditional anchor). - `resolve_change_context` now builds the `NormalizedDiffIndex` once and derives BOTH the changed-model set and the changed-root-project-macro set (via the already-merged `changed_macros_pr_diff`), returning an `ExploreChangeContext`. `has_macro_focus = !changed_macros.is_empty()`. - BDD: `features/explore_macro_view.feature` (positive: a changed root macro emits macro.html + the nav anchor on every page; negative: a model-only diff and a no-diff run emit no macro.html). Feature count 29 -> 30 mirrored atomically in ci.yml + lefthook.yml. - Headless: a real-Chromium file:// network-block test on macro.html (zero requests, heading + empty-state + nav round-trip). Explore-lane only — render.rs / report.html untouched. CRAP: render_explore 11.14, resolve_change_context 2.39 (both < 15). Part of #345 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
More reviews will be available in 41 minutes and 17 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Ready to review this PR? Stage has broken it down into 7 individual chapters for you: Chapters generated by Stage for commit ee7b4aa on Jun 13, 2026 6:21pm UTC. |
There was a problem hiding this comment.
Code Review
This pull request implements the walking skeleton of the explorer macro focus view, introducing a third sub-page (macro.html) that is conditionally emitted when a PR diff modifies a root-project macro. It updates the CLI change context resolution, the HTML templates, and adds comprehensive integration and headless tests. Feedback on the changes suggests optimizing the page_html helper in the test steps to avoid cloning an Option<String> on the happy path.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
📄 Rendered report previewAll golden examples regenerated cleanly. 🟡 Golden examplesCommitted to
🐶 Live dogfood previewThis PR doesn't touch 🧭 Explore previewThe two-page 🟡 Golden exploreThe committed
🐶 Live exploreThis PR doesn't touch ▶ Open ↗ opens the report or explorer in your browser in one The Pages preview may take ~1 min to update after this comment Alternative: GitHub CLI# gh CLI >= 2.63 extracts into ./report-preview-playground/.
gh run download 27475131790 -R breezy-bays-labs/cute-dbt -n report-preview-playground
open report-preview-playground/playground-report.htmlPosted by |
🧾 Merge debrief — #362 (
|
…-model DAG (#426) * #345 — feat(explore): macro view filtered directory + dimmed impacted-model DAG Finishes the explore macro view (cute-dbt#345, epic #99) — the two remaining ACs after Slices 1–3 (#362/#364/#369): - AC1 — filtered artifact directory: for the focused macro, a folder-grouped, collapsible directory (native <details>/<summary>, zero JS/egress) of ONLY the models + tests whose transitive depends_on.macros reaches it, mirroring project folders. - AC3 — models and tests surfaced as SEPARATE partitions (never merged — the get_where_subquery non-merge rule), each grouped independently by the directory portion of original_file_path; pathless nodes bucket under "(no path)". AC2 (impacted-model subgraph complement dimmed) shipped in Slice 3 (#369) as the .macro-downstream role-dim; AC4 (one shared domain authority) is completed here — macro_blast_radius (models) and the new macro_test_consumers (tests) both route through one macro_resource_consumers walk, differing only in the resource-type predicate. AC5 (EXPERIMENTAL-gated) holds — the explore page is already experimental (#290). Domain stays POD (the new fn is a pure reverse-walk); the folder grouping is presentation in the explore adapter. render_explore takes a new MacroFocus bundle (focus set + test consumers) so the renderer never performs a domain walk (the explore-lane pure-renderer posture). The explore-macro golden is regenerated byte-identical and now shows the directory (3 callers across 2 folders, empty tests partition). Tests: 8 new domain tests (macro_test_consumers — direct/transitive/ unit_test/vendor-exclude/null-package/unknown), 5 adapter tests (folder grouping, partition separation, no-path sentinel, empty sets, end-to-end render), 1 BDD scenario + 3 steps, 1 headless test (live-DOM directory render + real collapse). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(explore): #345 — single-pass folder/file split in macro_dir_partition Compute (folder, file) in one match over original_file_path instead of three redundant path traversals. Functionally identical (golden output byte-unchanged); idiomatic single pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Part of #345 — the explorer macro view, Slice 1 (the walking skeleton). Epic: explorer arc #99. Sibling: the macro report lens #265 (its domain
macro_lens.rsis already merged on main and consumed read-only here).What Slice 1 delivers
The explorer gains a third sub-page,
macro.html, emitted only when a--pr-diffchanged a root-project macro. This slice is the end-to-end seam proof — no domain delta, no focused DAG, no directory yet (those land in later slices):ExploreMacroTemplate+templates/explore-macro.html— an empty, zero-egress-clean shell mirroring the sibling explore pages' chassis (shared#242tokens, the appearance engine, the favicondata:URI). No graph engine, no new vendored asset.render_exploregainshas_macro_focus: bool— resolved in the CLI, not the renderer (the explore-lane pure-renderer posture: this layer never calls a domain walker).trueemitsmacro.htmland renders the third nav anchor on every page;falsekeeps the dag.html/tests.html output shape, so the conditional{% if has_macro_focus %}anchor leaves the committed explore goldens byte-identical.resolve_change_contextnow builds theNormalizedDiffIndexonce and derives both the changed-model set and the changed-root-project-macro set (via the already-mergedchanged_macros_pr_diff), returning anExploreChangeContext.has_macro_focus = !changed_macros.is_empty().Plan discrepancies found and reconciled (from the critique)
macro.htmlgolden." The liveexploreCI golden row renders with no--pr-diff, so it can never emitmacro.html. Slice 1's golden is therefore the negative path (the two existing goldens stay byte-identical with the conditional anchor); the first committedmacro.htmlgolden lands when the focused DAG renders (Slice 3). Verified:examples/explore/{dag,tests}.htmlregenerate byte-identically.render_exploretakes the pre-resolvedhas_macro_focusflag, not the raw changed-macro id set — scope resolution stays incli/mod.rs, the renderer stays pure. All 5+render_explorecall sites (CLI + headless helpers + in-file tests) updated.Gates (all run synchronously, in-turn)
--all-targets --locked -D warningscargo fmt --all --checkcargo nextest run --lockedcargo test --test bddmacro.htmltest + committed-pages + theme tests)RUSTDOCFLAGS=-D warnings cargo doc --no-deps --lockedcargo deny checkrender_explore11.14,resolve_change_context2.39 — both < 15)Invariants
Explore-lane only —
render.rs/report.htmluntouched. Zero-egress preserved (no new asset;macro.htmlmakes zerofile://network requests). Experimental surface inherited from theexploreverb's stderr notice. Domain purity intact (no domain delta this slice).🤖 Generated with Claude Code