From 94030e11cb68ce88ecc80be7ed37c5c4ae6b2b5e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 01:32:09 -0400 Subject: [PATCH 1/2] =?UTF-8?q?fix(render):=20#253=20=E2=80=94=20snapshots?= =?UTF-8?q?/seeds/sources/exposures=20as=20typed=20DAG=20nodes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The explorer lineage filtered every non-model node out of the DAG, severing stg -> snapshot -> downstream chains into disconnected components and presenting downstream models (and every source-fed staging model) as false roots. build_lineage now renders the typed union: the model set plus every snapshot/seed nodes-map entry, every sources-map entry and every exposures-map entry (the Discovery fold-in), ordered by full node id, with edges filtered to the union. LineageNodeType is the render-layer wire vocabulary (model/snapshot/seed/source/exposure — fusion's DbtNode serde tags + the sources/exposures maps @ 9977b6cb); an exhaustive wire_key match plus a template-grep test form the node-vocab completeness guard (the edge-vocab twin). Engine honesty: snapshots keep the not-compiled flag (fusion null-fills snapshot compiled_code at parse, manifest_nodes.rs:616-617, and backfills on compile, dbt-tasks-sa/src/utils.rs:151-172); seeds NEVER flag (null-filled unconditionally, manifest_nodes.rs:232-233 — no SQL to compile); sources/exposures carry no code. The CTE arm gates to model-typed highlights (per-model CTE DAGs are model semantics). The lineage engine draws each type with redundant shape+color coding (canvas-paired legend chips), type-aware tooltip/detail facts, and a per-type width pad; the dag header counts each present type. Guards: fixture-proven integration tests (playground snapshot mid-chain + 16 sources + exposure sink; jaffle-shop seeds as typed roots; full node/edge completeness = no false roots), two BDD wire-round-trip scenarios, and the universal headless component-fidelity probe (every payload component renders as ONE Cytoscape component) on both the committed golden and a synthetic all-types chain. Golden regenerated: examples/explore/dag.html (the only example that changes; report goldens byte-identical). Closes #253 Co-Authored-By: Claude Fable 5 --- examples/explore/dag.html | 176 +++++-- features/explore_lineage_dag.feature | 29 ++ src/adapters/explore.rs | 724 ++++++++++++++++++++++++--- templates/explore-cte.js | 18 +- templates/explore-dag.html | 34 +- templates/explore-lineage.js | 128 +++-- tests/headless_zero_egress.rs | 255 +++++++++- tests/render_integration.rs | 186 +++++++ tests/steps/builders.rs | 20 +- tests/steps/explore_full_manifest.rs | 103 +++- tests/steps/explore_lineage_dag.rs | 74 ++- tests/steps/world.rs | 24 + 12 files changed, 1631 insertions(+), 140 deletions(-) diff --git a/examples/explore/dag.html b/examples/explore/dag.html index da5ffa67..279b1524 100644 --- a/examples/explore/dag.html +++ b/examples/explore/dag.html @@ -709,6 +709,16 @@ .lineage-legend { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; } .lineage-legend .legend-chip { display: inline-block; padding: 0 0.4rem; border: 1.5px solid var(--dag-import-stroke); border-radius: 4px; background: var(--dag-import-fill); color: var(--dag-node-text); } .lineage-legend .legend-chip.notcompiled { border-color: #b07400; border-style: dashed; background: var(--dag-transform-fill); } +/* cute-dbt#253 — the typed-node vocabulary. Canvas-paired chips: these + exact fills/strokes are what explore-lineage.js draws per node type + (redundant shape+color coding on canvas; the chips mirror the colors + and approximate the shapes via border-radius). Shared by the legend + and the detail card's type chip. */ +.legend-chip.type-model, .detail-type.type-model { border-color: #0072B2; background: #e8f1f8; } +.legend-chip.type-snapshot, .detail-type.type-snapshot { border-color: #7b5ea7; background: #f1ecf9; border-radius: 2px; } +.legend-chip.type-seed, .detail-type.type-seed { border-color: #00756d; background: #e6f4f2; border-radius: 10px; } +.legend-chip.type-source, .detail-type.type-source { border-color: #1f8a5b; background: #eef7ee; border-radius: 999px; } +.legend-chip.type-exposure, .detail-type.type-exposure { border-color: #6b6b76; background: #f4f4f5; border-radius: 4px 12px 12px 4px; } /* cute-dbt#106 — the PR-diff change-context treatment: an amber halo mirroring the canvas underlay glow. A separate visual channel from the highlight vocabulary (border = selected, opacity = dim/trace) @@ -764,6 +774,9 @@ /* canvas-paired status chips (fixed across themes; dark fixed text on the fixed light fills stays readable on every theme by construction) */ .model-detail-card .detail-notcompiled { display: inline-block; padding: 0 0.4rem; border: 1.5px dashed #b07400; border-radius: 4px; background: var(--dag-transform-fill); color: var(--dag-node-text); font-size: 0.8rem; } +/* cute-dbt#253 — the detail card's node-type chip (non-model nodes only; + per-type colors above). */ +.model-detail-card .detail-type { display: inline-block; margin-right: 0.35rem; padding: 0 0.4rem; border: 1.5px solid var(--dag-import-stroke); border-radius: 4px; color: var(--dag-node-text); font-size: 0.8rem; } /* cute-dbt#106 — the detail card's "changed in this diff" chip (the change-context twin of .detail-notcompiled; both can show at once). */ .model-detail-card .detail-changed { display: inline-block; margin-left: 0.35rem; padding: 0 0.4rem; border: 1.5px solid var(--dag-import-stroke); border-radius: 4px; background: var(--dag-import-fill); color: var(--dag-node-text); box-shadow: 0 0 0 2px rgba(230, 159, 0, 0.55); font-size: 0.8rem; } @@ -776,7 +789,8 @@

Model lineage

-

full manifest — 34 models, 60 edges

+ +

full manifest — 34 models, 1 snapshot, 16 sources, 1 exposure, 72 edges