Skip to content

Fixes #37307: Refit Ports lineage after exiting fullscreen with Escape - #38078

Merged
anuj-kumary merged 2 commits into
mainfrom
anuj-kumary/issue-37307-check
Nov 18, 2026
Merged

anuj-kumary merged 2 commits into
mainfrom
anuj-kumary/issue-37307-check

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #37307

Exiting the Data Product Ports Lineage fullscreen with Escape left the graph off-screen in the inline pane. PortsLineageView only refit the viewport (fitView + zoomTo(0.4)) inside the fullscreen button handler; Escape is handled by the parent InputOutputPortsTab and never reached it, and the one-shot init fit was guarded by isInitialized. 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 just onToggleFullScreen; no change to the parent.

Type of change:

  • Bug fix

High-level design:

N/A — small change.

Tests:

Use cases covered

  • Ports lineage enters fullscreen with the button and the graph is fit to the fullscreen pane (unchanged).
  • Exiting with the button refits the graph into the inline pane (unchanged).
  • Exiting with Escape refits the graph into the inline pane (fixed).

Unit tests

  • PortsLineageView.component.test.tsx — new refits when isFullScreen changes without the toggle button (Escape exit): flips isFullScreen via props (as the parent's Escape handler does) and asserts fitView/zoomTo run. Fails on main, passes with the fix. Suite: 10/10; src/components/DataProducts + src/components/Domain: 21 suites / 226 tests pass.

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • playwright/e2e/Pages/InputOutputPorts.spec.ts › Exit fullscreen with Escape key previously only asserted position: 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.
    • Against main's component: fails (graph 239px off-center after Escape).
    • With the fix: passes.
  • Full InputOutputPorts.spec.ts with the fix (local, chromium, Vite + local server): 44 passed.

Visual regression baselines

  • Not applicable (no rendering change to a baselined screen).

Manual testing performed

  1. Vite dev server on this branch (fec2ee054c2) proxying to a local OpenMetadata server (2.0.0-SNAPSHOT).
  2. Created a domain, a data product with 3 table assets, 2 input ports and 1 output port.
  3. Opened Data Product → Input/Output Ports, expanded Ports Lineage, clicked fullscreen, pressed Escape.
  4. Measured the center node: 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

Before: empty pane after Escape

After (this PR, fec2ee054c2) — after Escape the graph is refit and centered.

ports-escape-after.mp4

After: graph centered after Escape

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.
  • I have added a test that covers the exact scenario we are fixing.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; making the mock stable would strengthen the unit test.

Findings

  1. P2 Fullscreen test can pass incorrectly ▶

Summary

The PR refits the ports lineage graph when fullscreen changes, including exits with Escape.

  • Ports Lineage refits the graph after every fullscreen change.

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

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.
@anuj-kumary
anuj-kumary requested a review from a team as a code owner November 18, 2026 06:22
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@gitar-bot

gitar-bot Bot commented Nov 18, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Refitting 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 isFullScreen, so the graph is re-centered in the inline pane when exiting fullscreen with Escape as well as the toggle button. Adds a unit test and Playwright coverage for the Escape exit path. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@anuj-kumary
anuj-kumary enabled auto-merge (squash) November 18, 2026 06:51
@anuj-kumary
anuj-kumary merged commit 88aaed4 into main Nov 18, 2026
56 checks passed
@anuj-kumary
anuj-kumary deleted the anuj-kumary/issue-37307-check branch November 18, 2026 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Detail Bug] Data Products: Exiting Ports lineage fullscreen via Escape leaves graph misfitted/cropped

2 participants