Skip to content

Fixes #34616: Grouped incidents in the AI-mode incident manager - #34599

Merged
ShaileshParmar11 merged 3 commits into
mainfrom
ShaileshParmar11/incident-groups-severity-filter
Oct 4, 2026
Merged

ShaileshParmar11 merged 3 commits into
mainfrom
ShaileshParmar11/incident-groups-severity-filter

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

One PR for the whole grouped incident manager (epic #30414). It replaces the stack #34588–#34598, which is closed in favour of this one. Two commits: the backend first, then the frontend on top of it.

image image image

Describe your changes:

Fixes #34616
Fixes #30414
Fixes #30417
Fixes #34549
Fixes #34550
Fixes #30418
Fixes #30419
Fixes #30420
Fixes #34594
Fixes #34595
Fixes #34596

The AI-mode incident manager (/observability/incident-manager) lists open incidents as groups, by test definition, table or owner, instead of one flat list.

Groups

  • Each row shows its open incident count, worst severity, status mix, assignees, related tables or test definitions, last and first seen, and a trend.
  • Group by test definition, table or owner; sort by incident count, severity or last seen.
  • Filter by test case, assignee, status, severity, date field and date range. The filters live in the URL, so links and reloads keep them.
  • Paging by page number, with the application's standard page sizes (15, 25, 50).

Drill-down

  • A row opens a drawer with the group's incidents. "View all" opens the full drill-down, and Back returns to the same groups.

Changes

  • Bulk status, assignee and severity across selected groups, behind a confirmation that states the scope. Failures are listed per incident.
  • Inline status, assignee and severity on each incident row.

Backend (TestCaseResolutionStatusResource)

  • The groups endpoint returns related entities, assignee references and exact counts, takes page, group, sortField and severity, and validates them (400 on bad values).
  • The flat listing matches the groups for every filter (unowned, dateField, severity, domain), so a drill-down lists exactly what its group counts.
  • A domain is matched on the test case or the nearest of its table, schema, database and service that has one, as domains are inherited.
  • Existing offset paging keeps working, so the current UI on main is unaffected by the backend commit alone.

How to review

  1. Backend commit (8 files): TestCaseResolutionStatusResource → TestCaseResolutionStatusRepository → TimeSeriesDAOs (SQL) → ListFilter → IncidentGroupsIT. The schema testCaseIncidentGroup.json gains response-only fields, and its TS model is regenerated.
  2. Frontend commit (90 files, over half tests and locales):
    • components/observability/IncidentManager/IncidentGroups/: the view, its hooks (useIncidentGroups, useIncidentGroupIncidents, useIncidentGroupBulkUpdate), filters, table, drawer, drill-down, bulk modals; query keys in rest/queries/incidentGroupsQuery.ts.
    • components/IncidentManager/: shared inline actions (IncidentManager.utils.ts); the retired flat-list filter code is removed.
    • openmetadata-ui-core-components: DateRangePicker and FilterSelect take a size on the Select scale.
    • locale/languages/*.json: new plural keys, translated in all 20 locales.
    • playwright/e2e/Features/AIMode/IncidentGroups.spec.ts and playwright/utils/incidentGroups.ts.

Type of change:

  • New feature

High-level design:

  • Groups query: one aggregate SQL per page in TimeSeriesDAOs, with the total from COUNT(*) OVER () and the top 5 related tables and test definitions per group ranked in SQL (ROW_NUMBER()). Assignees are resolved as users, then teams, in one lookup per page.
  • Latest record: the flat listing filters status, assignee and severity on each incident's latest record, in the list and in its count alike.
  • Domain: ListFilter.testCaseInDomainCondition follows inheritance. A level counts only when every nearer level has no domain of its own.
  • Validation: dateField and sortField are enums, severities are checked against Severity (or none), and the assignee mapper accepts only users and teams.
  • UI state: useIncidentGroups owns the dimension, filters, sort and page, reading and writing them in the URL. The groups, a drill-down's group and a group's incidents are React Query reads (keys in rest/queries/incidentGroupsQuery.ts). A refresh cancels reads still in flight and invalidates them all; the rows on screen stay until the new ones land, and a refresh that empties the page steps back to the last one.
  • Bulk: groups are read 4 at a time and incidents sent in batches. A failed batch becomes failure entries, and the listing is always re-read.
  • Permissions: selection, bulk and inline changes need EditStatus on test cases; incident rows read it through useBulkEntityPermissions.
  • Components: UntitledUI core components only (@openmetadata/ui-core-components), no antd. The assignee filter is the shared UserTeamSelectableList (Users and Teams tabs).

Tests:

Use cases covered

  • Group counts equal the drawer and the drill-down for every dimension, filter and domain, including inherited and overridden domains.
  • Paging by number, including the last page and page-size changes; one group by its key.
  • Bulk changes with partial failures; view-only users get no selection or bulk actions.
  • Inline status, assignee and severity changes refresh the groups.
  • Plurals resolve correctly in English, French, Russian and Arabic.

Unit tests

  • I added unit tests for the new/changed logic.
  • Coverage on the 35 UI source files this PR changes (jest --coverage, limited to them; 127 suites, 1302 tests):
Statements   : 97.57% ( 1209/1239 )
Branches     : 93.45% ( 771/825 )
Functions    : 94.13% ( 289/307 )
Lines        : 97.47% ( 1119/1148 )
  • Below 90%: incidentManagerAPI.ts (this PR adds request params; the uncovered lines are existing request helpers) and FilterBar.tsx (this PR only removes code from it).
  • Core components (vitest): filter-select.test.tsx, date-range-picker.test.tsx.

Backend integration tests

  • I added integration tests in openmetadata-integration-tests/ for new/changed API endpoints.
  • IncidentGroupsIT: 61/61 pass on Postgres and on MySQL (-Pmysql-elasticsearch).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • playwright/e2e/Features/AIMode/IncidentGroups.spec.ts (new), with TestCaseBreadcrumb.spec.ts and ObservabilityLayout.spec.ts: 18/18 pass. The tests are independent and run in parallel: read-only ones share one seed, each that changes incidents seeds its own (helpers in playwright/utils/incidentGroups.ts).

Manual testing performed

  1. Built the server and ran it on Postgres + OpenSearch, seeded with ~2,000 incidents: every status and severity, users and teams as owners and assignees, 4 domains, reopened incidents, and a year of history.
  2. Logged in as admin, switched to AI mode and opened /observability/incident-manager.
  3. Grouped by each dimension, sorted, filtered by each control, reloaded, and checked that the URL kept the filters.
  4. Opened the drawer and the drill-down, went back, and compared counts: groups 1,817 = listing 1,817; per domain, Marketing 226 = 226, Finance 309 = 309.
  5. Ran bulk and inline changes, including a partial failure, and as a view-only user.
  6. Checked every state in light and dark mode against the design.

UI screen recording / screenshots:

TODO: attach a recording.

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: I updated the migration scripts or explained why it is not needed. testCaseIncidentGroup.json is a response schema; nothing stored changes, so no migration is needed.
  • For UI changes: I attached a screen recording and/or screenshots above. (TODO, see above)
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions

github-actions Bot commented Oct 3, 2026

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: 828 → 833
- 5 added, 0 removed, 11 changed spec-list

New source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupDetail.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupDrawer.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsSelectionBar.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsTable.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsView.tsx

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/e2e/Utils/appMode.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/TableClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/DatabaseServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/user/UserClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/admin.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/dateTime.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
  openmetadata-ui/src/main/resources/ui/src/components/IncidentManager/IncidentManagerTable.component.tsx
  openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts
  … and 1 more

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

Copilot AI balanced review requested due to automatic review settings October 3, 2026 09:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 75%
75.49% (114931/152233) 61.22% (70803/115642) 62.56% (23556/37653)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 4, 2026

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: 832 → 837
- 6 added, 1 removed, 11 changed spec-list

New source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupBulkStatusModal.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupDetail.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupDrawer.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsSelectionBar.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsTable.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsView.tsx

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/observability/common/FilterChip/FilterChip.tsx

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/e2e/Utils/appMode.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/TableClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/DatabaseServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/user/UserClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/admin.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/dateTime.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/entity.ts
  openmetadata-ui/src/main/resources/ui/src/components/IncidentManager/IncidentManagerTable.component.tsx
  openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts
  … and 1 more

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Backend for the grouped incident manager (epic #30414): group rows with their
related tables and test definitions and assignee references, drill-down parity
for the flat listing, paging by page number, a lookup of one group by its key,
bulk severity, sorting the groups (#34595) and filtering them by severity
(#34596). Existing offset paging keeps working.
Frontend for the grouped incident manager (epic #30414), on top of the
incident groups API (#34549):

- Filter row and paging by page number (#30417)
- Related tables and test definitions on every group row (#34550)
- Group drawer and drill-down (#30418)
- Bulk status, assignee and severity changes (#30419)
- End-to-end tests; the flat incident list is retired (#30420)
- Inline status, assignee and severity on incident rows (#34594)
- Sorting the groups (#34595)
- Severity filter (#34596)

Core components: DateRangePicker and FilterSelect take a size, so the filter
row lines up on the Select scale.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Oct 4, 2026

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: 832 → 837
- 6 added, 1 removed, 9 changed spec-list

New source→spec entries:
  openmetadata-ui/src/main/resources/ui/playwright/utils/incidentGroups.ts
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupDetail.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupDrawer.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsSelectionBar.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsTable.tsx
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsView.tsx

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/observability/common/FilterChip/FilterChip.tsx

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/playwright/e2e/Utils/appMode.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/TableClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/support/entity/service/DatabaseServiceClass.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/admin.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/common.ts
  openmetadata-ui/src/main/resources/ui/playwright/utils/dateTime.ts
  openmetadata-ui/src/main/resources/ui/src/components/IncidentManager/IncidentManagerTable.component.tsx
  openmetadata-ui/src/main/resources/ui/src/generated/entity/data/table.ts
  openmetadata-ui/src/main/resources/ui/src/utils/TourUtils.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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@gitar-bot

gitar-bot Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved

🔴 High risk · Bulk status/severity updates and denormalized severity synchronization change stored incident data

Comprehensive grouped incident manager implementation for AI-mode with backend API and frontend UI. Groups incidents by test definition, table, or owner; supports filtering, sorting, paging, bulk and inline status/assignee/severity changes; drill-down from groups to incidents; backend validation and domain inheritance; 61/61 integration tests passing, 1302 unit tests at 97.57% statement coverage, 18/18 Playwright tests passing. No issues found.

Review coverage

📋 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

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 7 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 7 warning(s) across 6 changed file(s).

Count Rule
4 openmetadata-imports/no-lower-layer-page-imports
1 openmetadata-imports/review-sequential-api-calls
1 react-hooks/exhaustive-deps
1 openmetadata-ui-patterns/no-non-adaptive-palette
All findings
Location Rule Message
🟡 src/components/IncidentManager/useIncidentActions.test.ts:21:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/IncidentManager/useIncidentActions.ts:21:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/IncidentManager/useIncidentActions.ts:89:27 openmetadata-imports/review-sequential-api-calls Review these sequential API requests. If they are independent, start them together with Promise.all/Promise.allSettled; keep sequencing only when data-dependent
🟡 src/components/IncidentManager/useIncidentFilterOptions.ts:21:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/IncidentManager/useIncidentFilters.ts:19:1 openmetadata-imports/no-lower-layer-page-imports Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here.
🟡 src/components/observability/DataQuality/Dashboard/DqDateRangeFilter.tsx:72:6 react-hooks/exhaustive-deps React Hook useEffect has a missing dependency: 'buildValue'. Either include it or remove the dependency array.
🟡 src/components/observability/IncidentManager/IncidentManagerPage.tsx:37:3 openmetadata-ui-patterns/no-non-adaptive-palette Raw palette class "tw:[&_.custom-chart-background]:bg-gray-blue-25" is static — it does not flip in dark mode. Use the theme-adapting "utility-" variant (tw:bg-

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

@sonarqubecloud

sonarqubecloud Bot commented Oct 4, 2026

Copy link
Copy Markdown

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

5 participants