Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 23, 2026

Describe your changes:

Charts with 487 assets were searchable but invisible in the left-side explore tree. Three issues prevented proper rendering: notIncludeAggregationExploreTree() filtered charts from aggregation buckets, Dashboard's childEntities array lacked CHART type, and getPluralizeEntityName() was missing the CHART plural label mapping.

Changes:

  • SearchClassBase.ts: Removed EntityType.CHART from notIncludeAggregationExploreTree() exclusion list
  • SearchClassBase.ts: Added EntityType.CHART to Dashboard's childEntities array
  • EntityUtils.tsx: Added EntityType.CHART mapping to getPluralizeEntityName() so tree displays "Charts" (plural) instead of "Chart" (singular)
  • ExploreTree.spec.ts: Added ChartClass to test suite with comprehensive UI test verifying charts are displayed in the explore tree, following Playwright best practices
// Before
public notIncludeAggregationExploreTree() {
  return [EntityType.CHART, EntityType.INGESTION_PIPELINE];
}

// After
public notIncludeAggregationExploreTree() {
  return [EntityType.INGESTION_PIPELINE];
}
// Added to getPluralizeEntityName()
[EntityType.CHART]: t('label.chart-plural'),

Test Coverage:
The Playwright test validates the complete user interaction flow following the Playwright Developer Handbook guidelines:

  1. Reloads the page to ensure newly created chart data is visible in the explore tree aggregation
  2. Expands the Dashboards node in the explore tree and waits for API response
  3. Uses Playwright's built-in auto-waiting through toBeVisible() assertion (no manual timeouts)
  4. Asserts the "Charts" node becomes visible in the UI using a flexible locator
  5. Clicks the Charts node and waits for API response
  6. Verifies the data assets filter updates to "Data Assets: chart"

Bug Fixes:

  • Fixed test flakiness by adding page reload after entity creation in beforeEach to ensure the UI reflects the latest aggregation data before the test runs

Charts now render under Dashboards in explore tree with the correct plural label and appear in API aggregation responses.

Type of change:

  • Bug fix

Checklist:

  • I have read the CONTRIBUTING document.
  • I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.
Original prompt

This section details on the original issue you should resolve

<issue_title>Charts not visible in left-side panel while assets are available</issue_title>
<issue_description>Affected module
Does it impact the UI, backend or Ingestion Framework? -UI

Describe the bug
A clear and concise description of what the bug is.

  • Charts are not appearing in the left-side navigation panel, even though the corresponding assets are present and accessible elsewhere in the UI.
    This creates confusion for users, as charts exist but are not discoverable via the left panel.

To Reproduce

Screenshots or steps to reproduce

Image

Expected behavior
A clear and concise description of what you expected to happen.

  • Charts should be visible and accessible from the left-side panel when the underlying assets are available.

Version:

  • OS: [e.g. iOS]
  • Python version:
  • OpenMetadata version: [e.g. 0.8]
  • OpenMetadata Ingestion package version: [e.g. openmetadata-ingestion[docker]==XYZ]

Additional context
Add any other context about the problem here.
</issue_description>

<agent_instructions>This is because of it was excluded from explore tree. The change is in SearchClassBase.ts, function notIncludeAggregationExploreTree. Remove the chart from there and add playwright test coverage to test this. We already have ExploreTree.spec.ts for testing this.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@github-actions
Copy link
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Copilot AI and others added 2 commits January 23, 2026 15:12
Co-authored-by: aniketkatkar97 <51777795+aniketkatkar97@users.noreply.github.com>
Co-authored-by: aniketkatkar97 <51777795+aniketkatkar97@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix charts not visible in left-side panel Fix: Charts not visible in explore tree panel Jan 23, 2026
Copilot AI requested a review from aniketkatkar97 January 23, 2026 15:18
@aniketkatkar97 aniketkatkar97 marked this pull request as ready for review January 23, 2026 18:33
@aniketkatkar97 aniketkatkar97 requested a review from a team as a code owner January 23, 2026 18:33
@github-actions
Copy link
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

1 similar comment
@github-actions
Copy link
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@aniketkatkar97
Copy link
Member

@copilot, the added playwright test case does not verify the chart being shown in the explore tree in the UI. Add necessary assertions to verify the charts are displayed in the tree.

Co-authored-by: aniketkatkar97 <51777795+aniketkatkar97@users.noreply.github.com>
});

test('Verify charts are visible in explore tree', async ({ page }) => {
await page.waitForLoadState('networkidle');
Copy link

Choose a reason for hiding this comment

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

Removed both networkidle waits. The test now relies on explicit API response waits and Playwright's built-in auto-waiting.

@aniketkatkar97
Copy link
Member

@copilot The ExploreTree.spec.ts is still failing in the latest run

Co-authored-by: aniketkatkar97 <51777795+aniketkatkar97@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 24, 2026

@copilot The ExploreTree.spec.ts is still failing in the latest run

Fixed the test failure by adding a page reload at the start of the test. The issue was that after the beforeEach creates the chart entity via API, the explore page needs to be refreshed to reflect the newly created data in the UI.

The test now:

  1. Reloads the page to ensure the chart data appears in the aggregation
  2. Expands the Dashboards node
  3. Verifies the Charts node is visible
  4. Clicks it and validates the filter

Commit: 6308f36

@gitar-bot
Copy link

gitar-bot bot commented Jan 24, 2026

🔍 CI failure analysis for 6308f36: Multiple Playwright test failures detected across two CI jobs. The failures appear to be unrelated to the PR changes, which only add Charts to the explore tree UI.

Issue

Two Playwright CI jobs failed with a total of 4 test failures and 22 flaky tests:

Job 61355160554 (playwright-ci-postgresql 2/6):

  • 3 failed tests in ColumnBulkOperations.spec.ts
  • 10 flaky tests across multiple spec files

Job 61355160562 (playwright-ci-postgresql 3/6):

  • 1 failed test in ServiceCreationPermissions.spec.ts
  • 12 flaky tests across multiple spec files

Previously reported: The ExploreTree.spec.ts test "Verify charts are visible in explore tree" times out after 180 seconds when waiting for an API response at line 419.

Root Cause

The test failures appear to be unrelated to the PR changes. Analysis shows:

  1. PR Scope: This PR modifies only 3 files:

    • ExploreTree.spec.ts - adds a new test for charts visibility
    • EntityUtils.tsx - adds chart pluralization
    • SearchClassBase.ts - includes charts in Dashboard's childEntities
  2. Failed Tests Location: All failing tests are in files NOT modified by this PR:

    • ColumnBulkOperations.spec.ts (3 failures)
    • ServiceCreationPermissions.spec.ts (1 failure)
    • Various other flaky test files (22 flaky tests)
  3. Failure Characteristics: The failures exhibit typical flakiness patterns:

    • Test timeouts (60-180 seconds)
    • Browser/page closure errors ("Target page, context or browser has been closed")
    • Element not found errors
    • Race conditions in page navigation

Details

Failed Test Examples:

ColumnBulkOperations.spec.ts failures:

Test timeout of 60000ms exceeded.
Error: page.waitForURL: Test timeout of 60000ms exceeded.
Error: page.waitForResponse: Test timeout of 60000ms exceeded.

ServiceCreationPermissions.spec.ts failure:

Error: expect(locator).toBeVisible() failed
Timeout: 5000ms
Error: element(s) not found
Locator: getByTestId('entity-header-name')

These errors suggest timing issues and race conditions in test infrastructure rather than functional bugs introduced by the PR.

Assessment

The PR changes focus on adding Charts as a visible entity type in the explore tree UI. The failing tests cover completely different functionality (bulk operations, service permissions, landing page widgets, pagination, etc.) that should not be impacted by simply adding Charts to the explore tree hierarchy.

The high number of flaky tests (22 total) across both jobs further supports the conclusion that these are infrastructure/timing-related test issues rather than code defects.

Code Review 👍 Approved with suggestions 2 resolved / 3 findings

Bug fix PR correctly enables Charts in explore tree with appropriate test coverage. The previous finding about using getByTestId instead of chained locators remains unresolved in the new test code.

💡 Quality: Use `getByTestId` instead of chained locator filters

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ExploreTree.spec.ts:456-461 🔗 Playwright Developer Handbook - Locator Priority Order

The test uses a complex locator pattern that could be simplified and made more resilient:

await page
  .locator('div')
  .filter({ hasText: /^Dashboards$/ })
  .locator('svg')
  .first()
  .click();

According to the Playwright Developer Handbook's Locator Priority Order, getByTestId should be the preferred locator choice for most cases. The current implementation relies on DOM structure (div > svg) which is described as brittle and prone to breaking with markup changes.

Suggested fix:
If an expand icon data-testid attribute is available (or can be added), use it:

await page.getByTestId('explore-tree-expand-Dashboards').click();

Or if the tree node has a proper test ID structure, use that consistently with getByRole as a fallback:

await page.getByRole('button', { name: 'Expand Dashboards' }).click();
✅ 2 resolved
Quality: Avoid using `networkidle` waitForLoadState in tests

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ExploreTree.spec.ts:442 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ExploreTree.spec.ts:464 🔗 Playwright Developer Handbook - Proper Waits
The test uses page.waitForLoadState('networkidle') which is discouraged according to the Playwright Developer Handbook guidelines. The handbook recommends using explicit API waits instead of network idle states, as networkidle can be unreliable and flaky.

According to section 6 "Proper Waits" in PLAYWRIGHT_DEVELOPER_HANDBOOK.md: "Always prefer API awaits if any action demands or results in a particular API call."

Current code:

await page.waitForLoadState('networkidle');

Suggested fix:
Remove networkidle waits and rely on the explicit API response waits that are already in place (expandResponse, chartClickResponse), or wait for specific elements/loaders. The test already has proper API waits, so the networkidle calls appear redundant and could be removed.

Bug: Test only validates API response, not UI rendering of Charts

📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/ExploreTree.spec.ts:460-463
The test case only verifies that the API returns a chart bucket in the aggregation response, but it does not validate that the Charts node is actually rendered and visible in the explore tree UI.

Current test behavior:

  • Waits for API response
  • Checks that chartBucket exists in jsonResponse.aggregations

Missing UI assertions (as described in PR description):

  1. Expand the Dashboards node in the explore tree
  2. Assert the "Charts" node becomes visible using page.getByTestId('explore-tree-title-Charts') or similar selector
  3. Click the Charts node
  4. Verify the data assets filter updates

Impact: The bug being fixed is that "Charts are not appearing in the left-side navigation panel." The test should verify the Charts are actually visible in the UI, not just that they exist in the API response. A change that breaks only the UI rendering would pass this test.

Suggested fix:

test('Verify charts are visible in explore tree aggregation', async ({
  page,
}) => {
  await page.reload();
  await page.waitForLoadState('networkidle');

  // Expand Dashboards node to see Charts
  const dashboardsNode = page.getByTestId('explore-tree-title-Dashboards');
  await dashboardsNode.click();

  // Verify Charts node is visible under Dashboards
  const chartsNode = page.getByTestId('explore-tree-title-Charts');
  await expect(chartsNode).toBeVisible();

  // Click Charts and verify filter updates
  await chartsNode.click();
  await expect(page.getByText('Data Assets: chart')).toBeVisible();
});

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link

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 To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Charts not visible in left-side panel while assets are available

2 participants