Skip to content

Change an incident's status and severity from its row in a group (superseded by #34599) - #34597

Closed
ShaileshParmar11 wants to merge 12 commits into
ShaileshParmar11/30420-e2e-retire-flat-listfrom
ShaileshParmar11/incident-inline-actions
Closed

ShaileshParmar11 wants to merge 12 commits into
ShaileshParmar11/30420-e2e-retire-flat-listfrom
ShaileshParmar11/incident-inline-actions

Conversation

@ShaileshParmar11

@ShaileshParmar11 ShaileshParmar11 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Superseded by #34599, which merged this stack as one PR.

Stacked PR 7 of 9 for epic #30414. Base: ShaileshParmar11/30420-e2e-retire-flat-list — review only this PR's own diff; merge bottom-up.

  1. Incident groups filter bar and pagination (superseded by #34599) #34588 (issue Query controls: filter bar + pagination #30417) — ShaileshParmar11/30414-epic-task-plan
  2. Incident groups backend: related entities, drill-down parity, paging, group lookup (superseded by #34599) #34589 (issue Incident groups backend: related entities, drill-down parity, bulk severity #34549) — ShaileshParmar11/34549-incident-groups-backend
  3. Incident groups related-entity column, sub-line and table cells (superseded by #34599) #34590 (issue Groups table: related-entity column and sub-line #34550) — ShaileshParmar11/34550-related-entities-ui
  4. Incident group drawer and drill-down (superseded by #34599) #34591 (issue Drill-down view + preview drawer #30418) — ShaileshParmar11/30418-drawer-drilldown
  5. Bulk status and severity changes for incident groups (superseded by #34599) #34592 (issue Selection and bulk actions (Set status / Set severity) #30419) — ShaileshParmar11/30419-bulk-actions
  6. Grouped incidents E2E and retire the flat list (superseded by #34599) #34593 (issue Close-out: Playwright E2E + legacy listing retirement #30420) — ShaileshParmar11/30420-e2e-retire-flat-list
  7. 👉 Change an incident's status and severity from its row in a group (superseded by #34599) #34597 (issue Incident rows: change status and severity from the drawer and drill-down #34594) — ShaileshParmar11/incident-inline-actions
  8. Sort incident groups by severity and last seen (superseded by #34599) #34598 (issue Incident groups: sort by severity and last seen #34595) — ShaileshParmar11/incident-groups-sort
  9. Fixes #34616: Grouped incidents in the AI-mode incident manager #34599 (issue Incident groups: filter by severity #34596) — ShaileshParmar11/incident-groups-severity-filter

Describe your changes:

Was for #34594 — superseded by #34599

Incidents can be changed from their rows in the group drawer and drill-down again.

Retiring the flat list (#30420) removed the only place an incident could be changed without opening its test case. Incident rows in the drawer and the drill-down now carry the same core chips the incident table uses:

  • Status: the status chip also assigns, reassigns and resolves.
  • Severity: the severity chip.

Who sees them:

  • Only users with EditStatus on the incident's test case.
  • Everyone else, and every row while its permission loads, keeps the read-only badges.

After a change:

  • The incidents in view and the groups are re-read, so the drawer header, the drill-down summary and the group row update.
  • A resolved incident leaves the list.

Type of change:

  • New feature

High-level design:

  • Rows: IncidentList reads each row's test case permission with the existing useIncidentRowPermissions, under the same rule the incident table uses (EditStatus, falling back to EditAll).
  • Controls: it renders InlineTestCaseIncidentStatus (core) and InlineSeverity (core). A severity change is a JSON patch on the incident record.
  • Refresh: onIncidentChange goes up through the drawer and the drill-down to the view's refresh. useIncidentGroupIncidents gains a refresh.
  • Drawer header: the drawer's group re-resolves from the re-read groups.

Tests:

Use cases covered

  • An editor changes status (including assign/reassign/resolve) and severity from a drawer row and a drill-down row; counts follow.
  • A read-only user sees badges only.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files: IncidentList.test.tsx, IncidentGroupDrawer.test.tsx, IncidentGroupDetail.test.tsx, IncidentGroupsView.test.tsx.
  • Coverage on the UI files this PR changes (jest --coverage, limited to this PR's files):
Statements   : 99.63% ( 270/271 )
Branches     : 95.42% ( 167/175 )
Functions    : 98.36% ( 60/61 )
Lines        : 99.61% ( 258/259 )
File                          | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
All files                     |   99.63 |    95.42 |   98.36 |   99.61 |                   
 IncidentGroupDetail.tsx      |     100 |     90.9 |     100 |     100 | 78,137            
 IncidentGroupDrawer.tsx      |     100 |      100 |     100 |     100 |                   
 IncidentGroupsView.tsx       |   99.06 |    95.38 |   96.29 |      99 | 365               
 IncidentList.tsx             |     100 |    94.64 |     100 |     100 | 69,151-154        
 useIncidentGroupIncidents.ts |     100 |      100 |     100 |     100 |                   
Test Suites: 18 passed, 18 total
Tests:       234 passed, 234 total

Backend integration tests

  • Not applicable (no backend API changes). Only the existing incident patch and transition endpoints are used.

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

  • Added to playwright/e2e/Features/AIMode/IncidentGroups.spec.ts: change one incident's severity from the drawer and check the record through the API. The four incident specs pass 19/19 against a server built from this branch.

Manual testing performed

  1. Built the server from this branch 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. In a drawer, changed an incident's severity, reassigned another through the status chip, and checked that the drawer header, the list and the group row updated.
  4. Checked that the status and severity menus open above the drawer, in light and dark mode.

UI screen recording / screenshots:

TODO: attach a recording (opened as draft until it is added).

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. N/A — no JSON Schema changes.
  • 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.

Retiring the flat list took away the only place an incident could be changed
without opening its test case. The drawer and the drill-down rows now carry
the same core status and severity chips the incident table used — the status
chip also assigns and reassigns — for whoever may edit the incident's test
case (`EditStatus`, read per row). Everyone else, and every row while its
permission loads, keeps the read-only badges.

A change re-reads the incidents in view and the groups, so the drawer header,
the drill-down summary and the group row all follow it; a resolved incident
leaves the list. The E2E changes one incident's severity from the drawer.
@ShaileshParmar11
ShaileshParmar11 marked this pull request as ready for review October 3, 2026 09:24
@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

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

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: 74%
74.78% (112798/150830) 60.32% (69245/114790) 61.65% (23020/37337)

Copilot AI balanced review requested due to automatic review settings October 3, 2026 12:35

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.

Copilot AI balanced review requested due to automatic review settings October 3, 2026 12:50

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

🔄 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: 833 → 833
- 0 added, 0 removed, 1 changed spec-list

Entries whose spec list changed:
  openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsView.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 balanced review requested due to automatic review settings October 3, 2026 12:51

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.

…eshParmar11/incident-inline-actions

# Conflicts:
#	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/IncidentGroupsView.test.tsx
#	openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/useIncidentGroupIncidents.ts
…t table

The group rows sent a severity change and decided who may edit a row with their own copies of what the incident table already does. Both now go through shared helpers: one sends the severity patch and toasts a failure, the other reads EditStatus on the row's test case.
Copilot AI balanced review requested due to automatic review settings October 3, 2026 15:00

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

🔄 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: 833 → 833
- 1 added, 1 removed, 0 changed spec-list

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

Removed source→spec entries:
  openmetadata-ui/src/main/resources/ui/src/components/observability/common/FilterChip/FilterChip.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 balanced review requested due to automatic review settings October 3, 2026 15:00

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

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 3 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), 3 warning(s) across 2 changed file(s).

Count Rule
2 openmetadata-imports/no-lower-layer-page-imports
1 openmetadata-imports/review-sequential-api-calls
All findings
Location Rule Message
🟡 src/components/IncidentManager/IncidentManagerTable.component.tsx:34: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

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

make ui-checkstyle-changed

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 3, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 closed / 1 findings

🟡 Medium risk · Group rows add permission-gated status transitions and severity updates.

Enables editing incident status and severity directly from incident rows in the drawer and drill-down, with inline status and severity chips for authorized users. Resolving the last incident on a page now steps back to the previous page. High test coverage (99.63% statements) and Playwright tests included.

✅ 1 closed
✅ Edge Case: Resolving the last incident on a page leaves an empty page

📄 openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/useIncidentGroupIncidents.ts:62-76 📄 openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupDetail.tsx:166-173 📄 openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupDrawer.tsx:169-176
In the drawer or drill-down, a user can resolve the only incident left on the last page (page N > 1). The row's onIncidentChange then calls refresh(), which reads the same currentPage again. That page now comes back empty, so the list shows the "no incidents" empty state while earlier pages still have incidents, and the page number is past the new total. useIncidentPaging never clamps the page to the total. After the refresh, clamp the page: when the response is empty, currentPage > 1, and paging.total is above 0, go back to the last page that still exists.

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

@sonarqubecloud

sonarqubecloud Bot commented Oct 3, 2026

Copy link
Copy Markdown

@ShaileshParmar11

Copy link
Copy Markdown
Contributor Author

Combined into #34599, which carries the whole grouped incident manager (backend and frontend) as one PR against main. Its content is this stack's, rebased on main, plus fixes for the two open review findings and the standard page sizes.

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.

Incident rows: change status and severity from the drawer and drill-down

3 participants