Skip to content

#270 — feat(render): explorer project pane — vars/config provenance/reference filter - #432

Merged
cmbays merged 4 commits into
mainfrom
render-270-explorer-project-pane
Jun 14, 2026
Merged

cmbays merged 4 commits into
mainfrom
render-270-explorer-project-pane

Conversation

@cmbays

@cmbays cmbays commented Jun 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Surfaces the dbt project definition on the explore page, mirroring what the report already shows report-side (#266/#267/#268) — the C-arc explore surface of epic #262. Adds:

  • a project-info pane (name / version / require-dbt-version);
  • a standing vars inventory (names + precedence-resolved values + per-tier reference counts);
  • config provenance on the model detail pane (+materialized = view via models.healthcare_analytics);
  • a var/macro reference filter (var:NAME / macro:NAME chips + search, dimming the complement).

All four consume the same ProjectDefinition POD the report reads (AC R4) — render + explore-template work, not new ingestion.

What changed

Domain (additive, reuses existing POD):

  • vars::project_var_inventory → VarInventory { entries, footprint, var_models }, reusing the existing private var scanner so the explore inventory and the report's change panel never disagree on which models reference a var.
  • project_def::resolve_model_configs → per-model ConfigProvenance, reusing fusion's get_config_for_fqn descent (resolve_key_for_fqn).

Adapter (explore.rs): ProjectPanePayload (info + inventory + var/macro filter indices) rides the dag carrier + a tests.html carrier; per-model ConfigProvenance rides a config_provenance side-map (the seed_tables precedent). All serde-skip when no project file is read, so no-project-root goldens stay byte-identical. render_explore takes a new &ProjectFacts; macro.html emission extracted to render_macro_page.

CLI: gather_explore_project_facts parses the working-tree dbt_project.yml (explicit --project-root, else derived from the manifest layout); fail-open — unreadable/unparseable degrades to no pane.

Templates/JS (additive, in-place, zero-egress): project-pane shell + CSS on both explore pages (all 8 themes via shared tokens, createElement/textContent only); explore-lineage.js renders the pane, adds config provenance to the detail card, and the reference filter (composes with the existing highlight vocabulary); explore-tests.js renders the pane.

Dogfood

examples/explore-macro/{dag,tests}.html are now committed (rendered with --project-root playground-source, which carries a dbt_project.yml) — the canonical visual proof of the project-pane surface. The base explore + explore-seed goldens keep their shape (no project pane without a project file; serde-skip). tests/common/mod.rs adds the two new pages to the zero-egress + resource-ref scan set.

Gates (all pass, raw exit code)

fmt --check · clippy --all-targets --locked -D warnings · nextest (2256 tests) · cargo test --test bdd (226 scenarios) · headless_toggle + headless_zero_egress (-- --ignored, real Chrome) · cargo doc --no-deps --document-private-items -D warnings · cargo deny · crap4rs (render.rs/explore.rs) · resource-ref lint · example-report-check byte-identity on all 7 explore goldens.

New headless test (explore_project_pane_renders_inventory_provenance_and_reference_filter) asserts the pane renders against the committed golden, themes correctly on all 8 themes, shows config provenance on a model detail card, and the reference filter dims the complement.

Closes #270


Open in Stage

cmbays and others added 2 commits June 14, 2026 12:23
…eference filter

Surface the project definition on the EXPLORE page, mirroring what the
report already shows report-side (#266/#267/#268): a project-info pane
(name/version/require-dbt-version), a standing vars inventory
(precedence-resolved values + per-tier reference counts), config
provenance on the model detail pane, and a var/macro reference filter.

Domain (additive, reuses the existing ProjectDefinition POD — R4):
- vars::project_var_inventory → VarInventory{entries, footprint,
  var_models}, reusing the existing private var scanner so the explore
  inventory and the report's change panel never disagree on which models
  reference a var.
- project_def::resolve_model_configs → ConfigProvenance per model,
  reusing fusion's get_config_for_fqn descent (resolve_key_for_fqn).

Adapter (explore.rs): ProjectPanePayload (info + inventory + var/macro
filter indices) rides the dag carrier + a tests.html carrier;
per-model ConfigProvenance rides a config_provenance side-map (the
seed_tables precedent). All serde-skip when no project file is read, so
no-project-root goldens stay byte-identical. render_explore takes a new
&ProjectFacts; macro.html emission extracted to render_macro_page.

CLI: gather_explore_project_facts parses the working-tree dbt_project.yml
(explicit --project-root, else derived from the manifest layout);
fail-open — unreadable/unparseable degrades to no pane.

Templates/JS (additive, in-place, zero-egress): project-pane shell + CSS
on both explore pages (all 8 themes via shared tokens); explore-lineage.js
renders the pane, adds config provenance to the detail card, and the
var:/macro: reference filter (dims the complement, composes with the
existing highlight vocabulary); explore-tests.js renders the pane.

Dogfood: examples/explore-macro/{dag,tests}.html are now committed
(rendered with --project-root playground-source) — the canonical proof of
the project-pane surface; base explore + explore-seed goldens unchanged in
shape. Headless: tests/headless_toggle.rs asserts the pane renders,
themes on all 8 themes, shows config provenance, and the reference filter
dims the complement; zero-egress covers the new pages.

Closes #270

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…project_facts

The pre-push docs gate runs `cargo doc --no-deps --document-private-items
-D warnings`; the private gather fn's doc linked a bare [`ProjectDefinition`]
not in scope there. Use the crate-qualified path so the link resolves under
private-item docs too (the cargo-doc-gate-not-in-clippy lesson).

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 46 minutes and 57 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: 97ca1814-6005-41de-a427-77383a1e02cb

📥 Commits

Reviewing files that changed from the base of the PR and between 7ced83a and 718855f.

📒 Files selected for processing (21)
  • .github/workflows/ci.yml
  • examples/explore-macro/dag.html
  • examples/explore-macro/macro.html
  • examples/explore-macro/tests.html
  • examples/explore-seed/dag.html
  • examples/explore-seed/tests.html
  • examples/explore/dag.html
  • examples/explore/tests.html
  • src/adapters/asset_embed.rs
  • src/adapters/explore.rs
  • src/cli/mod.rs
  • src/domain/mod.rs
  • src/domain/project_def.rs
  • src/domain/vars.rs
  • templates/explore-dag.html
  • templates/explore-lineage.js
  • templates/explore-tests.html
  • templates/explore-tests.js
  • tests/common/mod.rs
  • tests/headless_toggle.rs
  • tests/headless_zero_egress.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch render-270-explorer-project-pane

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.

@cmbays cmbays added the type:feature New capability label Jun 14, 2026
@ghost

ghost commented Jun 14, 2026 •

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 7 individual chapters for you:

Title
1 Define domain types for project facts
2 Gather project facts in CLI layer
3 Wire project facts through explore adapter
4 Add project pane to explore templates
5 Implement project pane and filter in JS
6 Update goldens and CI gates
7 Verify project pane with headless tests
Open in Stage

Chapters generated by Stage for commit 718855f on Jun 14, 2026 4:55pm UTC.

@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
diff-showcase-report.html ▶ Open ↗ ⬇ Download
seed-showcase-report.html ▶ Open ↗ ⬇ Download
macro-heavy-report.html ▶ Open ↗ ⬇ Download
playground-report.html ▶ Open ↗ ⬇ Download
jaffle-shop-report.html ▶ Open ↗ ⬇ Download
prdiff-minidag-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-432/.
⬇ 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 27505719979 -R breezy-bays-labs/cute-dbt -n report-preview-playground
open report-preview-playground/playground-report.html

Posted by report-preview.yml for 718855f75cdc1d8c2bfb12c51e8f35266fe05825. 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 new project pane, standing vars inventory, and config provenance feature for the explore view (cute-dbt#270), integrating it across the DAG, tests, and macro pages. Feedback focuses on performance optimizations: simplifying provenance_for_fqn to a single-pass traversal, precomputing package names in project_var_inventory to avoid repeated lookups, and caching Cytoscape element lookups in filterByModels to prevent redundant queries on large lineage graphs.

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/domain/project_def.rs
Comment thread src/domain/vars.rs
Comment thread templates/explore-lineage.js
@cmbays
cmbays merged commit 5b138eb into main Jun 14, 2026
44 checks passed
@cmbays
cmbays deleted the render-270-explorer-project-pane branch June 14, 2026 16:59
@cmbays

cmbays commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

Merge debrief (#432 → #270) — squash 5b138eb, #270 closed. Explore lane complete.

Shipped: explorer project pane — vars inventory, config provenance, var/macro reference filter (explorer-side of the #262 dbt_project.yml ingestion).

Bot disposition: 3 gemini medium perf threads (provenance_for_fqn single-pass, var-inventory package precompute, filterByModels Cytoscape lookup dedup) — all deferred to #433 (post-v0.1 perf pass). Rationale: correctness-neutral micro-opts on non-hot paths; cute-dbt is zero-compute on small artifacts and perf is the org's un-budgeted aspirational leg. Tracked, not dropped.

Merge mechanics (load-bearing): resolved the render_explore signature collision with #426 — #426 changed the macro_focus param type (&MacroFocusSet→MacroFocus<'_>) while #270 added a trailing project_facts param. Took #426's richer macro-directory body + kept #270's project pane; re-extracted render_macro_page to stay under the line limit. Caught the concurrent-signature hazard: a #426-origin test called render_explore with 8 args missing project_facts — clippy --all-targets flagged it where cargo build didn't (the classic shared-signature trap). A second clean auto-merge then pulled in #413/#418.

Probe + gates: explore goldens regenerated, byte-identical to the auto-merge; full sweep green (2267 nextest, golden, zero-egress incl. macro-page + cytoscape, doc).

Follow-up: #433 (perf). Report lane continues: #434 (DAG halo, rebasing) → #424.

github-actions Bot added a commit that referenced this pull request Jun 14, 2026
cmbays added a commit that referenced this pull request Jun 15, 2026
…recompute + filterByModels lookup dedup (#441)

Three correctness-neutral traversal/lookup dedups on the #262 project-config
surfaces (deferred from #432): provenance_for_fqn single-pass
(O(K·L)->O(L), removes keys_along_fqn), project_var_inventory package
precompute (O(V×M)->O(M)), filterByModels resolve-once. Behavior-neutral by
construction; only the four JS-embedding explore goldens regenerated. All
gates green incl. crap4rs + byte-identity.

Closes #433

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render: explorer project pane — vars inventory, config provenance, var/macro reference filter

1 participant