feat(lineage): add Body Changes view mode to filter config-only changes#1268
feat(lineage): add Body Changes view mode to filter config-only changes#1268
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Add a new "Body Changes" mode to the lineage view Mode dropdown that uses state:modified.body + state:modified.macros + state:modified.contract selectors. This filters out config-only YAML changes (tags, descriptions, deprecation dates, etc.) while keeping data-impacting changes visible. The existing "Changed Models" and "All" modes remain unchanged. Resolves DRC-3047 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: even-wei <evenwei@infuseai.io>
- Add missing body_changes to LineageView.tsx and LineageDiffView.tsx types - Handle body_changes in Cloud LineageView node filtering (was falling through to "all") - Update stale comments in run.ts, LineageViewTopBar docstring, and 3 test files - Add Body Changes radio to dropdown assertion in existing test - Add interaction test for switching to body_changes mode Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: even-wei <evenwei@infuseai.io>
062059a to
9fbdd18
Compare
Cover the body_changes branch in select_nodes to fix patch coverage. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: even-wei <evenwei@infuseai.io>
Code Review: PR #1268Reviewer: Claude Code Review (adversarial) Validation ResultsPass A — Correctness & Logic — FAILISSUE —
} else if (
viewOptions?.view_mode === "changed_models" ||
viewOptions?.view_mode === "body_changes"
) {
// Changed models or body changes (filtering done server-side via selector)
selectedNodeIds = lineageGraph.modifiedSet;
}
Consequence: a user who saves a Lineage Diff check while in Body Changes mode will see the same node set as a Changed Models check (config-only YAML edits included), defeating the feature's purpose for that surface. The selector value is preserved on the wire, but the rendered graph isn't. Either:
NOTE — Empty-state guard missing for if (viewMode === "changed_models" && !lineageGraph.modifiedSet.length) {
return <LineageViewNoChanges ... />;
}For Pass B — Security — PASSNo new endpoints, no new authn/authz boundaries, no PII surfaces. The selector strings are static (not user-controlled). Pass C — Cross-Reference Consistency — PASSThe Verified: existing Pass D — Error Handling — PASS
Pass E — Test Coverage — PASS with one gap
Gap: No test exercises the case the feature is for — a project where some models have body changes and others have config-only changes — to assert that Pass F — Diff-Specific Checks — PASS
Pass G — Performance — PASSThe selector compiles once per Pass H — Async/Concurrency — N/ANo async surface change. Verification Results
Verdict: NO-GOIssues
Notes
What I could not verify
What I looked for and did not find
PR is in draft. Mark ready-for-review only after addressing the LineageView filtering branch (or documenting why |
PR checklist
What type of PR is this?
Feature
What this PR does / why we need it:
Adds a new "Body Changes" mode to the lineage view Mode dropdown. This mode uses
state:modified.body,state:modified.macros, andstate:modified.contractselectors to filter out config-only YAML changes (tags, descriptions, deprecation dates, warehouse, materialization, etc.) while keeping data-impacting changes visible.This reduces noise for users whose PRs touch YAML config without changing SQL logic — a pain point raised by customers (see Slack thread in #customer-super).
Which issue(s) this PR fixes:
Resolves DRC-3047
Special notes for your reviewer:
1+state:modified+) and "All" modes remain unchangedchanged_modelsis still the default for UI and MCPrecce summarycommand is not changed in this PR; it already excludes config-only changes via checksum comparison. A follow-up issue can add full selector parity if neededimpact_analysistool already uses this same selector pattern (state:modified.body+ state:modified.macros+ state:modified.contract+)Does this PR introduce a user-facing change?:
Yes — new "Body Changes" option in the lineage view Mode dropdown that filters to only SQL body, macro, and contract changes.
🤖 Generated with Claude Code