Skip to content

fix(lineage): drill in when a fast zoom-in reaches the maximum zoom - #37080

Merged
manerow merged 2 commits into
mainfrom
fix/lineage-semantic-zoom-gesture
Nov 5, 2026
Merged

manerow merged 2 commits into
mainfrom
fix/lineage-semantic-zoom-gesture

Conversation

@manerow

@manerow manerow commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Issue

No issue. Found while checking why LineageScenePerformanceScaleIT still fails its interaction-semantic-zoom-in step after PR #35892.

Problem

On the platform Lineage map, zooming in over a card should open the next level (a service's assets, a table's columns) once the card fills 35% of the canvas and the view stops moving. A fast zoom-in (quick wheel or trackpad) instead stops at the 250% maximum and never drills. Wheeling again does nothing, so the user must zoom out and retry slowly.

Why it happened

The decision record says a drill fires once the view has been still for 250ms, and that any further move "cancels or restarts" that wait. The code cancelled the wait on every move, but only started it again when the move made the zoom bigger than the move before it.

At 250% the browser keeps sending moves while the wheel turns, but the zoom no longer changes. Each of those moves cancelled the pending drill and none started it again.

The root cause was what each move was compared with. Comparing with the previous move answers "did this event zoom in?". The decision needs "did the user zoom in since the view last stood still?".

What this PR changes

  • The map remembers the zoom it last came to rest at, and judges every move against it instead of the previous move.
  • Every move restarts the 250ms wait. When the view settles, the map drills if the user zoomed in past the threshold, then records the current zoom as the new resting zoom. A pan after a settled zoom therefore never drills.
  • Zooming out still goes up a level at once, judged against the same resting zoom.
  • The decision record states this rule and lists the new test as its guard.

What users will notice

A fast zoom-in now drills, like a slow one. Slow zooming, panning and zooming out are unchanged.

How it was tested

  • New Playwright test in PlatformLineage.spec.ts: opens a table's scene, sends 40 wheel steps over the table without pausing, and expects the columns level. It fails on main (stuck at 250%) and passes here.
  • Side-by-side browser check, main vs this branch, same data:
    • fast zoom-in (service to assets, table to columns): main stays put, this branch drills.
    • slow zoom-in, pan after a small zoom-in, fast zoom-out: identical on both.
  • LineageScenePerformanceScaleIT at its nightly size (50,000 tables) against a server built from this branch: all 3 tests pass and all 10 map interactions are measured, including zoom-in (p95 2.3s). On main, zoom-in times out.
  • LineageMap unit tests (88) pass; ESLint, Prettier and import order are clean.

Not in this PR

Main's UI build is broken by the lru-cache bump in PR #37062; PR #37073 fixes it. I applied that fix locally to build and test this change, but it is not part of this PR.

@manerow
manerow requested a review from a team as a code owner November 4, 2026 16:48
@manerow
manerow requested a review from sweta1308 November 4, 2026 16:48
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added backend safe to test Add this label to run secure Github workflows on PRs labels Nov 4, 2026
Comment on lines +4 to +5
- **Revisions:** v1 2026-10-27 (initial); v2 2026-11-04 (a settled zoom is judged against the
zoom it last rested at)

@gitar-bot gitar-bot Bot Nov 4, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Quality: ADR v2 rewrites the v1 Decision text in place, with no Amendment section

docs/decisions/README.md (lines 38-41) says each amendment adds a dated Revisions entry and an ## Amendment section below the original. This PR adds the v2 entry, but it rewrites the v1 Decision bullet in place, so "any further move … cancels or restarts it" becomes "restarts that wait". The record has no ## Amendment section, so a reader can no longer see what v1 decided, or that v1's per-move comparison is what caused the stuck-at-250% bug. To fix this, put the original bullet back and add an ## Amendment (v2, 2026-11-04) section. That section should state the new rule: every move restarts the 250ms settle window; when the window ends, the zoom is compared with the zoom the viewport last rested at, not with the previous move; the resting zoom is then updated, so a pan after a settled zoom never drills.

Restore the v1 bullet and add the amendment section after ## Consequences:

## Amendment (v2, 2026-11-04)

Any further move, a pan included, restarts the 250ms settle wait (it no longer cancels it). When
the viewport settles, the zoom is compared with the zoom it last rested at, not with the move
before, and that zoom becomes the new resting zoom. Once the zoom reaches its maximum, the wheel
keeps sending moves that no longer change the zoom, so a per-move comparison never drilled.
Guard: `PlatformLineage.spec.ts` (a fast zoom-in past the maximum still drills).

Was this helpful? React with 👍 / 👎

@gitar-bot

gitar-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 0 closed / 1 findings

🟡 Medium risk · Updating semantic-zoom settling and zoom-direction tracking could open an unintended lineage level after mixed zoom and pan gestures.

Fixes a fast zoom-in that stalls at the 250% maximum and never drills, by judging each zoom against the resting zoom instead of the previous move and restarting the 250ms settle wait on every move. Approved with a suggestion: the decision record rewrites the v1 Decision text in place instead of adding the required ## Amendment section, so docs/decisions/2026-10-27-lineage-semantic-zoom-drills-at-35-percent-after-settling.md should restore the original bullet and add an amendment describing the v2 rule.

💡 Quality: ADR v2 rewrites the v1 Decision text in place, with no Amendment section

📄 docs/decisions/2026-10-27-lineage-semantic-zoom-drills-at-35-percent-after-settling.md:4-5 📄 docs/decisions/2026-10-27-lineage-semantic-zoom-drills-at-35-percent-after-settling.md:27-30

docs/decisions/README.md (lines 38-41) says each amendment adds a dated Revisions entry and an ## Amendment section below the original. This PR adds the v2 entry, but it rewrites the v1 Decision bullet in place, so "any further move … cancels or restarts it" becomes "restarts that wait". The record has no ## Amendment section, so a reader can no longer see what v1 decided, or that v1's per-move comparison is what caused the stuck-at-250% bug. To fix this, put the original bullet back and add an ## Amendment (v2, 2026-11-04) section. That section should state the new rule: every move restarts the 250ms settle window; when the window ends, the zoom is compared with the zoom the viewport last rested at, not with the previous move; the resting zoom is then updated, so a pan after a settled zoom never drills.

Restore the v1 bullet and add the amendment section after `## Consequences`
## Amendment (v2, 2026-11-04)

Any further move, a pan included, restarts the 250ms settle wait (it no longer cancels it). When
the viewport settles, the zoom is compared with the zoom it last rested at, not with the move
before, and that zoom becomes the new resting zoom. Once the zoom reaches its maximum, the wheel
keeps sending moves that no longer change the zoom, so a per-move comparison never drilled.
Guard: `PlatformLineage.spec.ts` (a fast zoom-in past the maximum still drills).
🤖 Prompt for agents
Code Review: Fixes a fast zoom-in that stalls at the 250% maximum and never drills, by judging each zoom against the resting zoom instead of the previous move and restarting the 250ms settle wait on every move. Approved with a suggestion: the decision record rewrites the v1 Decision text in place instead of adding the required `## Amendment` section, so `docs/decisions/2026-10-27-lineage-semantic-zoom-drills-at-35-percent-after-settling.md` should restore the original bullet and add an amendment describing the v2 rule.

1. 💡 Quality: ADR v2 rewrites the v1 Decision text in place, with no Amendment section
   Files: docs/decisions/2026-10-27-lineage-semantic-zoom-drills-at-35-percent-after-settling.md:4-5, docs/decisions/2026-10-27-lineage-semantic-zoom-drills-at-35-percent-after-settling.md:27-30

   `docs/decisions/README.md` (lines 38-41) says each amendment adds a dated `Revisions` entry **and** an `## Amendment` section below the original. This PR adds the v2 entry, but it rewrites the v1 Decision bullet in place, so "any further move … cancels or restarts it" becomes "restarts that wait". The record has no `## Amendment` section, so a reader can no longer see what v1 decided, or that v1's per-move comparison is what caused the stuck-at-250% bug. To fix this, put the original bullet back and add an `## Amendment (v2, 2026-11-04)` section. That section should state the new rule: every move restarts the 250ms settle window; when the window ends, the zoom is compared with the zoom the viewport last rested at, not with the previous move; the resting zoom is then updated, so a pan after a settled zoom never drills.

   Fix (Restore the v1 bullet and add the amendment section after `## Consequences`):
   ## Amendment (v2, 2026-11-04)
   
   Any further move, a pan included, restarts the 250ms settle wait (it no longer cancels it). When
   the viewport settles, the zoom is compared with the zoom it last rested at, not with the move
   before, and that zoom becomes the new resting zoom. Once the zoom reaches its maximum, the wheel
   keeps sending moves that no longer change the zoom, so a per-move comparison never drilled.
   Guard: `PlatformLineage.spec.ts` (a fast zoom-in past the maximum still drills).

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

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 81%
81.37% (138281/169932) 68.41% (49865/72891) 71.46% (28015/39201)

@sonarqubecloud

sonarqubecloud Bot commented Nov 4, 2026

Copy link
Copy Markdown

@manerow
manerow merged commit 875ff68 into main Nov 5, 2026
65 of 68 checks passed
@manerow
manerow deleted the fix/lineage-semantic-zoom-gesture branch November 5, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 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.

2 participants