Skip to content

Fixes #35304: Make the product tour offline, visible and startable (backport 2.0 #35305) - #35344

Merged
harsh-vador merged 2 commits into
2.0from
fix/product-tour-gaps-2.0
Oct 13, 2026
Merged

harsh-vador merged 2 commits into
2.0from
fix/product-tour-gaps-2.0

Conversation

@harsh-vador

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #35304

Backport of #35305 to 2.0. On 2.0 I ran the tour first, to see which of the bugs exist there. These do:

  • The tour stalls at step 5. The highlighted result card is clipped, so its link cannot be clicked.
  • The tour never starts on a first visit. The welcome screen takes the place of the step targets.
  • The Explore summary panel fetches the mock table. It requests the entity, permissions, change summary and lineage paging for it, which shows "table instance … not found" toasts on an instance without the sample data.
  • The tour crashes on the Vite dev server.

The changes match #35305, adapted to the 2.0 code:

  • TourPage: loads Explore early but hides it with visibility (tw:invisible tw:fixed tw:inset-0, aria-hidden, no pointer events) instead of display: none. Under display: none the results panel measured 0px wide and kept that width.
  • Checks for isTourPage that skip the request in LineageSection, DataAssetSummaryPanelV1 and GenericProvider (change summary), DataAssetsHeader (contract), useAssetHealth, KnowledgePages and TableDetailsPageV1 (query count).
  • EntitySummaryPanel: 2.0 still loads permissions with usePermissionProvider, so the port is done by hand:
    • On the tour, the panel shows the search-hit data and skips its lineage request.
    • On the tour, the panel gets a view-only grant (mockTourSummaryPanelPermission = { ViewBasic: true }) instead of a permission request.
    • Fix needed only on 2.0: the panel passed hasViewTests={entityPermissions.ViewTests || entityPermissions.ViewAll}. With neither grant that value is undefined, and DataQualityTab declares hasViewTests = true as its default, so the tab fetched anyway. It now passes Boolean(...), as main does with canViewTests. Outside the tour this also stops a user without the ViewTests grant from sending a request that would fail.
  • MyDataPage: on /tour, no welcome screen and always the default layout.
  • Tour.tsx: the lazy react-tour import handles both export shapes.

Differences from #35305, and why:

  • No LineageMap mock scene. 2.0's lineage tab uses LineageProvider with the mock entityLineage, which already stays offline. LineageMap does not exist on 2.0.
  • mockTablePermission stays in mockTourData.constants.ts. Nothing on 2.0 reads it, so moving it would be churn. mockTourPermission.constants.ts holds only the summary panel's grant.
  • No decision record. 2.0 has no docs/decisions/ folder or checker. The record lands on main with Fixes #35304: Make the product tour offline, visible and startable #35305.

Type of change:

  • Bug fix

High-level design:

The design is the same as #35305, adapted to 2.0 as listed above. Each new check applies only on /tour, and there are no API or schema changes.

Tests:

Use cases covered

  • Tour from Help → Tour, all 15 steps. Each highlighted element is asserted in the viewport, and click steps are performed by clicking the element. The lineage step shows the mock graph (raw_order, fact_order). Finish leaves /tour. No API request names the mock table.
  • Tour from the welcome screen link.
  • New: a first-time user opening /tour gets the tour, not the welcome screen.

Unit tests

  • Added AppTour/Tour.test.tsx and AssetHealthWidget/useAssetHealth.test.tsx. Added tour cases to TourPage, MyDataPage, EntitySummaryPanel (written for 2.0's usePermissionProvider mocks), LineageSection, KnowledgePages, DataAssetsHeader, GenericProvider, DataAssetSummaryPanelV1 and TableDetailsPageV1 (a 2.0-shaped query-count tour test).
  • yarn test over every touched area: 37 suites, 445 tests passed.
  • Running the TableDetailsPageV1 "Queries tab count" tests with -t fails on unmodified 2.0 too, because the suite's mocks depend on test order. The full file passes: 20/20 on 2.0 and 21/21 on this branch.

Backend integration tests

  • Not applicable (no backend changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Flow/Tour.spec.ts follows Fixes #35304: Make the product tour offline, visible and startable #35305, adapted to 2.0's Playwright helpers. It signs in with login(), and its fixture uses 2.0's getWorkerAdminAPIContext. It keeps 2.0's reload-retry on the first badge for the help and welcome tests. The first-visit test does not use it, because a reload would hide the welcome-screen bug it tests for.
  • On 2.0 (Vite dev build, backend on :8585): 3/3 passed, and a soak of --repeat-each=8 --workers=4 passed 24/24.
  • Against unmodified 2.0 code (source reverted, new spec kept): help-section fails at step 4 (toBeInViewport: viewport ratio 0), and first-visit fails because the tour never appears.

Manual testing performed

A scripted walkthrough of the 2.0 build (all 15 steps with real clicks, a request recorder and a toast recorder) reported no problems, no toasts and no request for the mock table. On the instance used, which has no dim_address table, unmodified 2.0 stalls at step 5 and shows "not found" toasts.

UI screen recording:

Not applicable — this is a backport of a bug fix. Recording, if any, is on #35305.

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.

  • For JSON Schema changes: not applicable.

  • For a UI feature or feature task: not applicable, this is a bug fix backport.

  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

  • Decision check: the record ships with Fixes #35304: Make the product tour offline, visible and startable #35305 on main. 2.0 has no docs/decisions/ folder.

  • I have added a test that covers the exact scenario we are fixing.

Backport of #35305 to 2.0, adapted to the 2.0 code:
- Pre-mount the tour's Explore page with visibility instead of display:none
  so the highlighted result card is not clipped.
- Stop the summary panel, lineage section, change summary, contract, asset
  health, knowledge pages and query count fetching the tour's mock table.
  The summary panel gets a view-only grant on the tour, and passes a boolean
  hasViewTests so a missing grant no longer defaults the tab to fetching.
- On /tour, skip the welcome screen and use the default landing layout.
- Normalise react-tour's lazy import for Vite's dev pre-bundle.
- Harden Tour.spec: real step actions, in-viewport targets, a mock-request
  tripwire, a first-visit test, and per-test accounts.
@harsh-vador
harsh-vador requested a review from a team as a code owner October 13, 2026 11:09
@harsh-vador harsh-vador added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Oct 13, 2026
@github-actions

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

Copy link
Copy Markdown
Contributor

🔄 Playwright impact map auto-refreshed

This PR touched specs or UI source that changed the source→spec routing map. I regenerated .github/playwright/impact-map.generated.json and pushed the diff to this branch.

- source entries: 567 → 567
- 0 added, 0 removed, 6 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/FailedTestCaseSampleData/FailedTestCaseSampleData.component.tsx
  openmetadata-ui/src/main/resources/ui/src/components/Database/SampleDataTable/SampleDataTable.component.tsx
  openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeaderTitle/EntityHeaderTitle.component.tsx
  openmetadata-ui/src/main/resources/ui/src/components/Lineage/Lineage.component.tsx
  openmetadata-ui/src/main/resources/ui/src/components/common/NoOwner/NoOwnerFound.tsx
  openmetadata-ui/src/main/resources/ui/src/components/common/OwnerLabel/OwnerLabel.component.tsx

What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing getByTestId strings. Hand-authored routing in impact-map.json always wins on conflict.

What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit:

python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit  # or a separate commit

@pmbrull
pmbrull requested review from a team, akash-jain-10, harshach and tutte as code owners October 13, 2026 11:09
@gitar-bot

gitar-bot Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Tour-mode guards suppress entity and health requests while changing permission handling; misapplied tour state could leave real asset panels incomplete.

Makes the product tour work offline on 2.0 by hiding Explore with visibility instead of display: none, skipping summary panel and asset requests on /tour, and fixing the hasViewTests default so the Data Quality tab no longer fetches without the ViewTests grant. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

Options

Display: compact → Counting what did not apply, without listing it.

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

@harsh-vador harsh-vador self-assigned this Oct 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 68%
68.17% (82660/121247) 53.06% (51173/96439) 53.8% (15214/28274)

@sonarqubecloud

Copy link
Copy Markdown

@harsh-vador
harsh-vador merged commit f7d15eb into 2.0 Oct 13, 2026
73 of 74 checks passed
@harsh-vador
harsh-vador deleted the fix/product-tour-gaps-2.0 branch October 13, 2026 12:24

This branch was previously deployed

1 inactive deployment
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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants