Skip to content

feat(ui): Incident test case status & severity migrate from mui to core components#27595

Merged
shah-harshit merged 14 commits intomainfrom
issue-3770
Apr 27, 2026
Merged

feat(ui): Incident test case status & severity migrate from mui to core components#27595
shah-harshit merged 14 commits intomainfrom
issue-3770

Conversation

@shah-harshit
Copy link
Copy Markdown
Contributor

@shah-harshit shah-harshit commented Apr 21, 2026

Summary

  • Refactor InlineTestCaseIncidentStatus into focused pieces under InlineIncidentStatus/ (chip trigger, popover shell/header, scrollable assignee list, failure-reason chips, black/white icon variants).
  • Update InlineSeverity to match the same patterns and expand tests.
  • Improve InlineTestCaseIncidentStatus test coverage and mocks.
Screen.Recording.2026-04-23.at.5.55.32.PM.mov

Collate tracking

This PR addresses work tracked in Collate and should close:

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

Test plan

  • yarn test InlineTestCaseIncidentStatus.test.tsx
  • yarn test InlineSeverity.test.tsx
  • UI smoke on incident manager test case status & severity flows

Made with Cursor


Summary by Gitar

  • API & Logic Updates:
    • Switched from postTestCaseIncidentStatus to transitionIncident for status updates and createTask for re-opening.
    • Updated entity identification in DataQualityTab and IncidentManager to use fullyQualifiedName instead of stateId.
  • Test Infrastructure:
    • Refactored InlineTestCaseIncidentStatus.test.tsx and InlineSeverity.test.tsx to accommodate the new component architecture and updated API mocks.

This will update automatically on new commits.

…omponents

Extract InlineIncidentStatus subcomponents (chip, popover shell, header, scroll list,
failure reason chips, icons). Align status dropdown and incident UX with design tokens.
Expand unit tests for InlineTestCaseIncidentStatus and InlineSeverity.

Made-with: Cursor
@shah-harshit shah-harshit requested a review from a team as a code owner April 21, 2026 14:06
@github-actions
Copy link
Copy Markdown
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!

@shah-harshit shah-harshit self-assigned this Apr 21, 2026
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Apr 21, 2026
@shah-harshit shah-harshit changed the title feat(ui): Incident test case status & severity — core components refactor (Collate #3770) feat(ui): Incident test case status & severity migrate from mui to core components Apr 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 61%
62.05% (61908/99760) 42.14% (33108/78549) 45.22% (9794/21658)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

🟡 Playwright Results — all passed (8 flaky)

✅ 3965 passed · ❌ 0 failed · 🟡 8 flaky · ⏭️ 86 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 298 0 1 4
🟡 Shard 2 755 0 4 8
✅ Shard 3 732 0 0 7
🟡 Shard 4 758 0 1 18
✅ Shard 5 687 0 0 41
🟡 Shard 6 735 0 2 8
🟡 8 flaky test(s) (passed on retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event is created when description is updated (shard 2, 1 retry)
  • Features/ActivityAPI.spec.ts › Activity event shows the actor who made the change (shard 2, 1 retry)
  • Features/DomainFilterQueryFilter.spec.ts › Domain filter should persist across page navigation (shard 2, 1 retry)
  • Features/DomainFilterQueryFilter.spec.ts › Search suggestions should be filtered by selected domain (shard 2, 1 retry)
  • Pages/DomainAdvanced.spec.ts › Remove multiple assets from domain at once (shard 4, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (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) April 24, 2026 11:42
@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Apr 27, 2026

Code Review ⚠️ Changes requested 1 resolved / 2 findings

Migrates incident test case status and severity components to the core UI library. The dropdown placement on the top setting currently causes incorrect popover positioning.

⚠️ Bug: Dropdown placement="top" opens popover above trigger instead of below

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/TestCaseStatus/InlineTestCaseIncidentStatus.component.tsx:456 📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/Severity/InlineSeverity.component.tsx:83

Both InlineTestCaseIncidentStatus and InlineSeverity set placement="top" on Dropdown.Popover. In the underlying library, placement="top" positions the popover above the trigger element. The old MUI implementation anchored to the bottom of the chip (standard dropdown behavior — menu opens downward). This reverses the expected dropdown direction, which is likely unintended.

The previous version of InlineSeverity didn't specify any placement (defaulting to bottom), and the old MUI code in InlineTestCaseIncidentStatus used anchorOrigin: { vertical: 'bottom' } — both resulting in the popover appearing below the trigger.

Suggested fix
Change `placement="top"` to `placement="bottom"` (or remove the prop to use the default) in both `Dropdown.Popover` usages:

// InlineTestCaseIncidentStatus.component.tsx
<Dropdown.Popover
  className="tw:min-w-[100px] tw:w-max tw:overflow-auto"
  placement="bottom">

// InlineSeverity.component.tsx
<Dropdown.Popover className="tw:w-max" placement="bottom">
✅ 1 resolved
Quality: No-op onStatusClick passed to ChipTrigger in InlineSeverity

📄 openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/Severity/InlineSeverity.component.tsx:71
In InlineSeverity, ChipTrigger receives onStatusClick={() => {}} (a no-op) and attachPressHandler={false}. While functionally harmless since the press handler is never attached, passing a no-op callback is confusing — it suggests the prop is required when it's effectively unused. This makes the component interface harder to understand.

🤖 Prompt for agents
Code Review: Migrates incident test case status and severity components to the core UI library. The dropdown placement on the top setting currently causes incorrect popover positioning.

1. ⚠️ Bug: Dropdown placement="top" opens popover above trigger instead of below
   Files: openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/TestCaseStatus/InlineTestCaseIncidentStatus.component.tsx:456, openmetadata-ui/src/main/resources/ui/src/components/DataQuality/IncidentManager/Severity/InlineSeverity.component.tsx:83

   Both `InlineTestCaseIncidentStatus` and `InlineSeverity` set `placement="top"` on `Dropdown.Popover`. In the underlying library, `placement="top"` positions the popover *above* the trigger element. The old MUI implementation anchored to the bottom of the chip (standard dropdown behavior — menu opens downward). This reverses the expected dropdown direction, which is likely unintended.
   
   The previous version of `InlineSeverity` didn't specify any placement (defaulting to bottom), and the old MUI code in `InlineTestCaseIncidentStatus` used `anchorOrigin: { vertical: 'bottom' }` — both resulting in the popover appearing below the trigger.

   Suggested fix:
   Change `placement="top"` to `placement="bottom"` (or remove the prop to use the default) in both `Dropdown.Popover` usages:
   
   // InlineTestCaseIncidentStatus.component.tsx
   <Dropdown.Popover
     className="tw:min-w-[100px] tw:w-max tw:overflow-auto"
     placement="bottom">
   
   // InlineSeverity.component.tsx
   <Dropdown.Popover className="tw:w-max" placement="bottom">

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

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