Skip to content

#345 — feat(explore): macro view filtered directory + dimmed impacted-model DAG - #426

Merged
cmbays merged 2 commits into
mainfrom
explore-345-macro-view-finish
Jun 14, 2026
Merged

cmbays merged 2 commits into
mainfrom
explore-345-macro-view-finish

Conversation

@cmbays

@cmbays cmbays commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Finishes the explore macro view (cute-dbt#345, epic #99) — the two remaining ACs after Slices 1–3 (#362 skeleton, #364 focus-set walker, #369 focused DAG + role dimming).

AC1 — filtered artifact directory. For the focused macro, a folder-grouped, collapsible directory (native <details>/<summary> — zero JS, zero egress) of ONLY the models + tests whose transitive depends_on.macros reaches it, mirroring the project folders (grouped on the directory portion of original_file_path).

AC3 — models + tests partitioned separately. The two kinds are surfaced as SEPARATE partitions, never merged (the get_where_subquery non-merge rule), each grouped independently. Pathless nodes bucket under (no path) rather than being silently dropped.

The other ACs were already satisfied:

  • AC2 (impacted-model subgraph complement dimmed) shipped in Slice 3 (#345 — explore: focused macro DAG with role dimming (Slice 3) #369) as the .macro-downstream role-dim — the induced subgraph renders with the downstream complement dimmed (opacity: 0.45), not removed.
  • 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 reverse-walk, differing only in the resource-type predicate — the two partitions can never drift on transitive-reachability or the root-project fail-open package semantics.
  • AC5 (EXPERIMENTAL-gated) holds — the explore page is already experimental (cli: mark explore experimental — help text, runtime notice, docs de-headlining #290).

Architecture

  • Domain stays POD: macro_test_consumers is a pure reverse-walk twin of macro_blast_radius (shared macro_resource_consumers core). The folder grouping is presentation in the explore adapter (build_macro_directory / macro_dir_partition).
  • render_explore now takes a MacroFocus<'a> bundle (focus set + pre-resolved test consumers) so the renderer never performs a domain walk — the explore-lane pure-renderer posture. The walks stay in cli::execute_explore.
  • Explore Cytoscape contract untouched; zero-egress preserved (<details> native collapse, no new assets).

Dogfood

The examples/explore-macro/macro.html golden is regenerated byte-identical and now shows the directory: 3 calling models across 2 folders (models/intermediate/healthcare, models/marts/core), empty tests partition (no root-project test calls quarantine_filter — an honest empty state). The explore / explore-seed goldens are unchanged.

Gates (all green, raw exit code, run directly)

  • cargo fmt --check · cargo clippy --all-targets --locked -- -D warnings
  • cargo nextest run --locked — 2252 passed
  • cargo test --test bdd — 30 features / 227 scenarios passed (new directory scenario included)
  • headless_zero_egress -- --ignored — 12 passed (macro page + every-committed-example zero-egress over the regenerated golden)
  • headless_toggle -- --ignored explore_macro — macro DAG geometry + new filtered-directory live-DOM test
  • RUSTDOCFLAGS=-D warnings cargo doc --no-deps --locked · cargo deny check
  • resource-ref lint · example-report-check byte-identity on the regenerated golden

Tests added

  • Domain: 8 macro_test_consumers tests (direct/transitive/unit_test/vendor-exclude/null-package fail-open/unknown-macro).
  • Adapter: 5 directory tests (folder grouping + sort, partition separation, no-path sentinel, empty sets, end-to-end render).
  • BDD: 1 scenario + 3 steps (directory render, model partition lists the caller under its folder, empty tests partition).
  • Headless: 1 test (live-DOM: 2 separate partitions, ≥3 model entries grouped by models/, real <details> collapse).

Closes #345

🤖 Generated with Claude Code


Open in Stage

…-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>
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@cmbays, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 8 minutes and 52 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3501add7-df55-4b7e-acaa-9945f075d642

📥 Commits

Reviewing files that changed from the base of the PR and between d3f9c9c and a5f9b02.

📒 Files selected for processing (10)
  • examples/explore-macro/macro.html
  • features/explore_macro_view.feature
  • src/adapters/explore.rs
  • src/cli/mod.rs
  • src/domain/macro_lens.rs
  • src/domain/mod.rs
  • templates/explore-macro.html
  • tests/headless_toggle.rs
  • tests/headless_zero_egress.rs
  • tests/steps/explore_macro_view.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch explore-345-macro-view-finish

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ghost

ghost commented Jun 14, 2026 •

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

📄 Rendered report preview

All golden examples regenerated cleanly.

🟡 Golden examples

Committed to examples/ and byte-identity gated — the canonical reports contributors and consumers browse. Stable across PRs.

Report View Download
seed-showcase-report.html ▶ Open ↗ ⬇ Download
prdiff-minidag-report.html ▶ Open ↗ ⬇ Download
jaffle-shop-report.html ▶ Open ↗ ⬇ Download
diff-showcase-report.html ▶ Open ↗ ⬇ Download
macro-heavy-report.html ▶ Open ↗ ⬇ Download
playground-report.html ▶ Open ↗ ⬇ Download

🐶 Live dogfood preview

This PR doesn't touch dbt-project/, so there's no live dogfood preview.

🧭 Explore preview

The two-page cute-dbt explore explorer — dag.html (model lineage) + tests.html (unit-test viewer). Same golden/live split as the report.

🟡 Golden explore

The committed examples/explore/ playground golden (the full synthetic playground manifest). Byte-identity gated in Example report check. Stable across PRs.

Page View Download
explore/dag.html ▶ Open ↗ ⬇ Download
explore/tests.html ▶ Open ↗ ⬇ Download

🐶 Live explore

This PR doesn't touch dbt-project/, so there's no live explore preview.

▶ Open ↗ opens the report or explorer in your browser in one
click — published to this repo's GitHub Pages under
/pr-426/.
⬇ Download fetches the same self-contained HTML as a workflow
artifact (auth-gated; works fully offline). Either way the report
makes zero external resource requests.

The Pages preview may take ~1 min to update after this comment
posts. On PRs from forks the Open link is unavailable (read-only
token) — use Download.

Alternative: GitHub CLI
# gh CLI >= 2.63 extracts into ./report-preview-playground/.
gh run download 27505086032 -R breezy-bays-labs/cute-dbt -n report-preview-playground
open report-preview-playground/playground-report.html

Posted by report-preview.yml for a5f9b02ddbb66b9e3136dfee55de5ce6415bf291. Affordance only — never blocks merge.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a filtered artifact directory for the explore macro view (addressing cute-dbt#345). It introduces folder-grouped, collapsible listings of models and tests that transitively call a focused macro, keeping the two partitions separate to prevent test consumers from cluttering the model view. The changes span domain logic (adding macro_test_consumers and refactoring with a shared reachability walk), rendering adapters, HTML/CSS templates, and comprehensive unit, BDD, and headless integration tests. Feedback on the changes suggests simplifying the path parsing logic in src/adapters/explore.rs by matching on the path once and using Option combinators to extract both the directory and file name in a single pass.

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.

Comment thread src/adapters/explore.rs Outdated
…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>
@cmbays
cmbays merged commit 89a97e3 into main Jun 14, 2026
44 checks passed
@cmbays
cmbays deleted the explore-345-macro-view-finish branch June 14, 2026 16:36
github-actions Bot added a commit that referenced this pull request Jun 14, 2026
@cmbays

cmbays commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Merge debrief (#426 → #345) — squash 89a97e3, #345 closed.

Shipped: explore macro view — filtered artifact directory (macro_dir_partition) + dimmed impacted-model DAG. Completes the 2 remaining #345 AC.

Bot disposition: 1 gemini medium (path-parse redundancy in macro_dir_partition) — accepted, applied as a single-pass match (commit a5f9b02). Used map_or_else rather than .map().unwrap_or_else() to stay clear of clippy::map_unwrap_or under -D warnings; proven functionally identical across all three path cases (dir/file, no-slash, none). Thread resolved.

Probe: verified the refactor preserves (folder, file) semantics + the MACRO_DIR_NO_PATH sentinel; golden explore-macro byte-unchanged.

Gates: all 44 required green; clippy + nextest (1983) exit 0 (judged by raw exit — rtk masked the clippy code).

Risk/follow-up: none from this PR. Note for the lane: #426 changed render_explore's macro_focus param type — surfaced + handled the #432 (#270) collision on that signature (being rebased now).

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.

explore: macro view — filtered artifact directory + dimmed impacted-model DAG

1 participant