Repository navigation
Fixes #37307: Refit Ports lineage after exiting fullscreen with Escape - #38078
Conversation
PortsLineageView refit the graph only from the fullscreen button handler, so exiting with Escape (handled by the parent tab) kept the fullscreen viewport transform in the 350px inline pane and left the graph off-screen. Refit on every isFullScreen change instead, which covers both exit paths.
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
Code Review ✅ Approved 🟡 Medium riskRefitting Ports Lineage whenever fullscreen state changes alters viewport behavior; timing or fit issues could leave the graph poorly positioned in its pane. Refits the Ports Lineage viewport in a single effect keyed on VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #37307
Exiting the Data Product Ports Lineage fullscreen with Escape left the graph off-screen in the inline pane.
PortsLineageViewonly refit the viewport (fitView+zoomTo(0.4)) inside the fullscreen button handler; Escape is handled by the parentInputOutputPortsTaband never reached it, and the one-shot init fit was guarded byisInitialized. React Flow keeps its viewport transform across a container resize, so the transform computed for the 100vh pane stayed applied to the 350px pane.The refit now lives in one effect keyed on
isFullScreen(plus "graph has nodes" for the initial fit), so it runs for the first render, the button and Escape alike. The timeout is cleared on cleanup so a fast toggle cannot apply a stale fit. The button handler is now justonToggleFullScreen; no change to the parent.Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
PortsLineageView.component.test.tsx— newrefits when isFullScreen changes without the toggle button (Escape exit): flipsisFullScreenvia props (as the parent's Escape handler does) and assertsfitView/zoomTorun. Fails onmain, passes with the fix. Suite: 10/10;src/components/DataProducts+src/components/Domain: 21 suites / 226 tests pass.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Pages/InputOutputPorts.spec.ts›Exit fullscreen with Escape keypreviously only assertedposition: relative, which passed with the bug. It now waits for the graph to be centered in the fullscreen pane, presses Escape, and polls that the graph (union of all nodes) is centered in the inline pane again.main's component: fails (graph 239px off-center after Escape).InputOutputPorts.spec.tswith the fix (local, chromium, Vite + local server): 44 passed.Visual regression baselines
Manual testing performed
fec2ee054c2) proxying to a local OpenMetadata server (2.0.0-SNAPSHOT).main→ y=771 after Escape (inline pane spans y 418–668, i.e. outside); fix → y=535, identical to the initial render. Fullscreen position identical on both (y=352), so the button path is unchanged.UI screen recording:
Data product with 2 input + 1 output ports → expand lineage → fullscreen → Escape.
Before (
main) — after Escape the inline pane is empty; the graph sits below it.ports-escape-before.mp4
After (this PR,
fec2ee054c2) — after Escape the graph is refit and centered.ports-escape-after.mp4
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; making the mock stable would strengthen the unit test.Findings
Summary
The PR refits the ports lineage graph when fullscreen changes, including exits with Escape.
One non-blocking test weakness remains: the mocked React Flow instance changes on every render, which can hide a missing fullscreen dependency.
Reviews (2) · Last reviewed commit: "Merge branch 'main' into anuj-kumary/iss..." · Reviewed by Greptile