Skip to content

Migrate IncidentManager table to core-ui Table component#27972

Open
shah-harshit wants to merge 9 commits intomainfrom
feat/migrate-incident-manager-table-core-ui
Open

Migrate IncidentManager table to core-ui Table component#27972
shah-harshit wants to merge 9 commits intomainfrom
feat/migrate-incident-manager-table-core-ui

Conversation

@shah-harshit
Copy link
Copy Markdown
Contributor

@shah-harshit shah-harshit commented May 7, 2026

Summary

  • Replace Ant Design Table with core-ui Table (react-aria-components) in IncidentManager.component.tsx
  • Fix status/severity/assignee columns stuck at loading skeleton by using plain renderRow function with static Table.Cell children and Table.Body dependencies prop (matching DataQualityTab pattern)
  • Fix popover max-height distortion caused by react-aria useOverlayPosition setting max-height as inline style — added popoverClassName prop to IncidentStatusPopoverShell and applied tw:!max-h-none to override
  • Update unit test mock for @openmetadata/ui-core-components to include Table
  • Update e2e selector from Ant Design .ant-table-tbody to data-testid based tbody tr selector

Reference

https://github.com/open-metadata/openmetadata-collate/issues/3837

Test plan

  • Verify IncidentManager table renders correctly with all columns visible
  • Verify status, severity, and assignee columns show actual values (not stuck at loading skeleton)
  • Verify resolved and assignee popovers open without max-height distortion
  • Run unit tests: yarn test src/components/IncidentManager/IncidentManager.test.tsx
  • Run e2e: yarn playwright:run --grep IncidentManager

🤖 Generated with Claude Code


Summary by Gitar

  • E2E Stability:
    • Replaced brittle ant-table selectors with data-testid in IncidentManager.spec.ts.
    • Added retry logic to TaskNavigation.spec.ts to ensure task notifications appear before interaction, resolving CI race conditions.

This will update automatically on new commits.

- Replace Ant Design Table with core-ui Table (react-aria-components)
- Use plain renderRow function (matching DataQualityTab pattern) with
  static Table.Cell children and Table.Body dependencies to fix status/
  severity/assignee columns stuck at loading skeleton
- Fix popover max-height distortion by adding popoverClassName prop to
  IncidentStatusPopoverShell and applying tw:!max-h-none via react-aria
  className override
- Update unit test mock for @openmetadata/ui-core-components to include
  Table component
- Update e2e selector from Ant Design .ant-table-tbody to
  data-testid based tbody tr selector

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shah-harshit shah-harshit requested a review from a team as a code owner May 7, 2026 16:39
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels May 7, 2026
@shah-harshit shah-harshit self-assigned this May 7, 2026
@shah-harshit shah-harshit changed the title refactor(IncidentManager): migrate table to core-ui Table component Migrate IncidentManager table to core-ui Table component May 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.5% (63198/101112) 42.98% (34261/79704) 45.87% (10088/21991)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

🟡 Playwright Results — all passed (15 flaky)

✅ 4013 passed · ❌ 0 failed · 🟡 15 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 299 0 0 4
🟡 Shard 2 752 0 3 8
🟡 Shard 3 755 0 4 7
🟡 Shard 4 789 0 1 18
🟡 Shard 5 686 0 1 41
🟡 Shard 6 732 0 6 8
🟡 15 flaky test(s) (passed on retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should display correct status badge color and icon (shard 2, 2 retries)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Flow/IngestionBot.spec.ts › Ingestion bot should be able to access domain specific domain (shard 3, 1 retry)
  • Flow/PersonaDeletionUserProfile.spec.ts › User profile loads correctly before and after persona deletion (shard 3, 1 retry)
  • Flow/SchemaTable.spec.ts › Copy nested column link should include full hierarchical path (shard 3, 1 retry)
  • Pages/DataContractInheritance.spec.ts › Edit Asset Contract - Add SLA when inheriting SLA from Data Product (PATCH should use /add not /replace) (shard 4, 1 retry)
  • Pages/EntityDataConsumer.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary CSV import preserves typed relations (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Inactive Announcement create & delete (shard 6, 1 retry)
  • Pages/Tag.spec.ts › Verify Owner Add Delete (shard 6, 1 retry)
  • Pages/TaskFormSettings.spec.ts › creates and updates a task form schema from settings (shard 6, 1 retry)
  • Pages/UserDetails.spec.ts › Admin user can assign and remove domain from a user (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@shah-harshit shah-harshit enabled auto-merge (squash) May 8, 2026 06:13
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented May 8, 2026

Code Review ✅ Approved 2 resolved / 2 findings

Migrates IncidentManager table to the core-ui Table component and replaces brittle Ant Design selectors with data-testid attributes. Includes retry logic in TaskNavigation.spec.ts to resolve CI race conditions.

✅ 2 resolved
Edge Case: Loading skeleton renders outside table row/cell structure

📄 openmetadata-ui/src/main/resources/ui/src/components/IncidentManager/IncidentManager.component.tsx:819-830
When testCaseListData.isLoading is true, items is [] and renderEmptyState renders a <div> with Skeleton elements. Since Table.Body renders as <tbody>, placing a <div> directly inside <tbody> is invalid HTML and may cause hydration warnings or layout issues in some browsers. The empty state should be wrapped in a <Table.Row> with a single <Table.Cell> spanning all columns, or use whatever pattern the core-ui Table supports for loading states.

Bug: Table.Body dependencies array is incomplete

📄 openmetadata-ui/src/main/resources/ui/src/components/IncidentManager/IncidentManager.component.tsx:812-817
The Table.Body dependencies prop controls when rows re-render. The current array includes [isPermissionLoading, testCasePermissions, testCaseListData.data], but renderRow also closes over tableDetails?.deleted (used in permission checks at lines 662, 673, and via testCaseResolutionStatusDetailsRender at line 581). If tableDetails.deleted changes (e.g., soft-delete while viewing), the table body won't re-render and stale permission state will be shown.

Additionally, callback handlers like handleStatusSubmit and handleSeveritySubmit are closed over, but since they only use stable setTestCaseListData, they're less of a concern.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

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