feat(lineage): add Lineage tab to Model Detail panel#1345
Conversation
Folds the lineage index into the existing Model Detail panel as a collapsible section above the Columns/Code tabs, so users can navigate direct upstream/downstream without a separate panel. Includes a per-column filter, 200px scroll cap, and paginated "show N more" to keep staging models with large fan-out (e.g. stg_orders with 140 direct children) from overwhelming the panel. Refs DRC-3306. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
Row clicks in Upstream & Downstream now only refocus the panel; the canvas is only re-centered when the user clicks the new crosshair icon. A back button appears in the section header while navigation history is non-empty (row-click history only — clicking a node on the canvas clears it). Refs DRC-3306. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
The collapsible Upstream & Downstream section above the Columns/Code tabs is being replaced by a dedicated Lineage tab. Drop the V2 component, its test, the index export, the lineageIndexSlot prop on NodeView, and the OSS wiring. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
Adds a "Lineage" tab as the first tab in the Model Detail panel that
shows the focused node's direct upstream parents and direct downstream
children. The body has:
- Toolbar with a back button and a "Path <previous> > <current>"
breadcrumb that exposes one step of navigation history (older
entries stay in the stack and are reachable via back).
- Upstream and Downstream sections with per-side filter and
pagination. Each row navigates the panel to that node.
- Focused-node card with the node name, an inline center-on-canvas
button, and a change-status badge. Accent bar uses the
added/removed/modified/unchanged color.
NodeView gains a `lineageTabContent` slot so the OSS shell injects the
tab without coupling NodeView to the lineage graph context.
LineageViewOss exposes `historyTrail` and a `navigateToHistoryIndex`
callback so the breadcrumb can jump back to a specific entry.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
Covers direct upstream/downstream rendering, empty hints, row click navigation, filter threshold and narrowing, pagination "show more", back-button visibility, the in-card center-on-canvas button, and the breadcrumb behavior — including the rule that only the most recent previous step is shown and that clicking it falls back to onBack when onJumpToHistory is not provided. Also covers state reset when the focused node changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
Exports LineageTabContent and LineageTabContentProps from @datarecce/ui/advanced and adds a Lineage/LineageTabContent story file covering: a default mid-graph node, mixed change-status neighbors, the back-path breadcrumb (rendered only when historyTrail is non-empty), the filter+pagination case, and the source/leaf/isolated edge cases. The back arrow and breadcrumb only render on the WithHistory story — matching how the OSS wrapper only passes onBack when the navigation history is non-empty. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
Replace the hardcoded grey.50 section / toolbar backgrounds with useThemeColors().background.subtle, and swap the focus card's hardcoded light-pink (rgb(255 245 241)) for background.emphasized when isDark, so the focused-node card stays distinguishable in both themes. Light mode keeps its original orange-tinted card. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
MUI v9 dropped SystemProps shortcuts on Stack, so `alignItems` is no longer a valid prop. Move it into `sx` on all five Stack instances in LineageTabContent so `next build` type-checks cleanly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
1618219 to
31d27ce
Compare
navigateBack and navigateToHistoryIndex were calling setFocusedNodeId inside the setFocusedHistory updater function. React updater functions must be pure — StrictMode invokes them twice in development, firing the nested setter twice per click. Read state up front, then dispatch both setters separately. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
PathBreadcrumb hardcoded textDecorationColor as 25% black, which is nearly invisible on the dark background.subtle (neutral[800]) — the "this previous step is clickable" affordance disappeared at rest. Read isDark from useThemeColors and pick a translucent white in dark mode while keeping the existing 25% black in light mode. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Wei-Chun, Chang <wcchang@infuseai.io>
Code Review: PR #1345Reviewed at: Validation ResultsPass A: Correctness & Logic — PASS
Pass C: Cross-Reference Consistency — PASS
Pass D: Error Handling & Edge Cases — PASS
Pass E: Test Coverage & Quality — PASS
Pass F: Diff-Specific Checks — PASS
Pass G: Performance — PASS
Pass H: Async/Concurrency — PASS
Verification Results
Verdict: GONo BLOCKERs, no ISSUEs. Notes
What I could not verify
What I looked for and did not find
|
gcko
left a comment
There was a problem hiding this comment.
Claude Code Review: No critical issues found. See PR comment for full review (4 NOTEs, no BLOCKERs/ISSUEs).
gcko
left a comment
There was a problem hiding this comment.
Claude Code Review: GO. No critical issues found. See PR comment for full review (4 NOTEs, no BLOCKERs/ISSUEs).
PR checklist
What type of PR is this?
Feature / enhancement (UI).
What this PR does / why we need it:
Adds a Lineage tab as the first tab in the Model Detail panel that shows the focused node's direct upstream parents and direct downstream children, replacing the previously prototyped collapsible "Upstream & Downstream" section above the Columns/Code tabs.
Tab body:
Path <previous> › <current>breadcrumb that surfaces one step of navigation history (older entries stay in the stack and are reachable by clicking back repeatedly).added/removed/modified/unchanged.useThemeColors— section headers, toolbar, and focus card adapt to dark mode.API:
NodeViewgains alineageTabContentslot so the OSS shell injects the tab without couplingNodeViewto the lineage graph context.LineageViewOssexposeshistoryTrailand a newnavigateToHistoryIndexcallback so the breadcrumb can jump to a specific history entry.LineageTabContentandLineageTabContentPropsare now exported from@datarecce/ui/advanced.Which issue(s) this PR fixes:
DRC-3306
Special notes for your reviewer:
The branch went through two design iterations on the same scope:
ddc41bae,006b6173) added a V2 collapsible section.c24d78c4removes V2 entirely (component, test, export,lineageIndexSlotprop, OSS wiring), andd8cbb138introduces the Lineage tab.Net diff vs
mainis "Lineage tab + supporting infra" — the V2 commits are intermediate history. Reviewing the squash-merge / final diff is easier than going commit-by-commit.Test coverage:
LineageTabContent.test.tsxcovering rows, filter threshold, pagination, navigation, breadcrumb (single-step rule, fallback toonBack), focus reset on node change, etc.Lineage/LineageTabContentcovering default / change-statuses / with-history / many-downstream / source / leaf / isolated.Does this PR introduce a user-facing change?:
A new Lineage tab appears as the first tab in the Model Detail panel, showing direct upstream and downstream nodes for the focused model and a path breadcrumb of recent navigation. Replaces the previously prototyped "Upstream & Downstream" collapsible section.
🤖 Generated with Claude Code