Skip to content

[2.1] Fixes 36363: Lineage zoom drill threshold, dark-mode node text and drag re-renders - #36390

Merged
chirag-madlani merged 1 commit into
2.1from
backport/2.1/pr-36370
Oct 28, 2026
Merged

chirag-madlani merged 1 commit into
2.1from
backport/2.1/pr-36370

Conversation

@gh-bot-collate

@gh-bot-collate gh-bot-collate Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Automated backport of #36370 to 2.1.

Source PR #36370
Author @chirag-madlani
Merge commit 4ada25ae71a2c0ab068b9ea5457acd88fd2e1475
Method Clean cherry-pick — identical to the commit on main.

Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once this branch's required checks pass — no review needed. If a check fails it stays open and the author of #36370 is asked to look.

resolver run

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable defects were established.

Summary

This backport makes lineage zoom drill sooner, improves dark-mode text, and reduces updates while dragging nodes.

  • The Lineage map drills into a chosen card sooner after zooming settles.
  • Dragging lineage nodes keeps their callback data and handler context steady.
  • The lineage search menu stays current without tracking every drag.
  • Lineage titles and footer counts stay readable on dark cards.

No actionable defects were established. Tests and browser checks were not run.

Reviews (1) · Last reviewed commit: "Fixes 36363: Lineage zoom drill threshol..." · Reviewed by Greptile

…ag re-renders (#36370)

* Lineage map: drill at 35% screen fill, on the zoomed node, once the zoom settles

Drilling needed the widest card to fill 60% of the canvas width. A 340px
container on a ~1400px canvas reached that at zoom 2.45 against a 2.5 maximum,
so drilling only happened at the very end of the zoom range.
- ZOOM_IN_SCREEN_FILL is 0.35: containers drill at ~1.43, assets at ~1.21.
- The fill is measured on the node being zoomed into (under the pointer, or
  for button/keyboard zoom the selected node or the drillable node nearest
  the canvas centre), not the widest card in the scene.
- Button/keyboard zoom picks the drillable node nearest the centre within the
  middle half of the canvas on each axis, instead of drilling only when a
  single drillable node is in view.
- A drill waits 250ms for the zoom to settle; any further move, a pan
  included, restarts or cancels it.

* Lineage nodes: every title in primary text

Only the base node's title used link-primary; the rest used link-gray, whose
tertiary text read washed out on dark node cards (gray-400 on raised).
All titles now use link-primary in both themes, so the titleColor prop is
gone.

* Lineage nodes: node-level DQ badge counts in primary text

The node footer sets no colour, so the node's test summary counts inherited
React Flow's fixed #222 node text, dark on dark cards, while the column rows'
counts were light. The badge now sets primary text itself.

* Lineage: stop re-rendering every node and handler consumer per drag frame

Dragging a node and holding it at the canvas edge (React Flow auto-pans)
crashed the entity lineage page with "Maximum update depth exceeded" in about
half of runs; it reproduces on main too.
- EntityLineageCanvas gave every node a fresh `data` object whenever `nodes`
  changed, which is every drag frame, so every node re-rendered. Each node now
  keeps its extended data until its own data changes.
- The handlers context was rebuilt per frame (several handlers depend on
  `nodes`), re-rendering every consumer (~1000 renders of the search box per
  drag). It now holds stable wrappers that call the latest handler.
- LineageSearchSelect subscribed to the whole store and reset its options on
  every node change; it selects only what it renders and builds options on open.

Crash rate in a headless repro went from ~1 in 2 to ~1 in 8, the same as
passing nodes to React Flow unwrapped. The rest is the controlled-node round
trip per auto-pan frame; making the drag uncontrolled is a follow-up.

* Lineage: address self-review — search filter on reopen, identity tests

- LineageSearchSelect rebuilds options on open; typing into the focused
  input reopens the menu after the filter for that text was queued, and
  the rebuild cancelled it, so a single keystroke or paste showed the
  unfiltered list. Opening now applies the current search text.
- Regression tests: the keystroke-after-close case (fails on the previous
  commit, passes on main), the handlers context staying the
  same object when nodes change, and EntityLineageCanvas keeping each
  node's extended data across a position-only change. Each fails without
  its fix.
- Comments trimmed to the reason.

* Lineage: address bot review — empty-service drills, live search options, ADR

- Unaimed drills (zoom button/keyboard, the Data Assets rail) pick only a
  drillable node with children near the centre, sharing the predicate
  getRailDrillFallbackNode already used. The scene API marks empty containers
  expandable, so the centre fallback could open an empty service; the rail
  again falls back to a service with assets.
- LineageSearchSelect follows nodes added or removed while its menu is open,
  via a node-id key that drag-only updates leave unchanged. The search filter
  moves to LineageSearchSelect.utils.ts; its test uses a real zustand store
  so subscriptions behave as in the app.
- Record ADR:2026-10-27-lineage-semantic-zoom-drills-at-35-percent-after-settling
  and cite it at the constants.

(cherry picked from commit 4ada25a)
@gh-bot-collate
gh-bot-collate Bot requested a review from a team as a code owner October 28, 2026 05:50
@gh-bot-collate
gh-bot-collate Bot requested review from shah-harshit and removed request for a team October 28, 2026 05:50
@gh-bot-collate gh-bot-collate Bot added the safe to test Add this label to run secure Github workflows on PRs label Oct 28, 2026
@gh-bot-collate

Copy link
Copy Markdown
Author

🤖 This backport will not merge itself: 2.1 has no required status checks, so there is nothing for auto-merge to wait on. Merge it by hand once CI is green.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 79%
79.77% (131364/164669) 66.27% (46320/69888) 69.23% (26298/37982)

@sonarqubecloud

Copy link
Copy Markdown

@chirag-madlani
chirag-madlani merged commit c59a392 into 2.1 Oct 28, 2026
109 checks passed
@chirag-madlani
chirag-madlani deleted the backport/2.1/pr-36370 branch October 28, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant