Skip to content

Incident groups related-entity column, sub-line and table cells (superseded by #34599) - #34590

Closed
ShaileshParmar11 wants to merge 34 commits into
ShaileshParmar11/34549-incident-groups-backendfrom
ShaileshParmar11/34550-related-entities-ui
Closed

ShaileshParmar11 wants to merge 34 commits into
ShaileshParmar11/34549-incident-groups-backendfrom
ShaileshParmar11/34550-related-entities-ui

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 3 of 9 for epic #30414. Base: ShaileshParmar11/34549-incident-groups-backend — 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 #34550 — superseded by #34599

The group table's related-entity column and sub-line, and the cells drawn with core components.

  • Related entities: test-definition groups count their tables ("3 tables") and list them under the group name. Table and owner groups count their check types, or name the only one.
  • Header stats: a bold group count, and a recurring count with the red trend icon, as the design shows.
  • Domain: groups follow the domain picked in the app nav.
  • Fits the screen: the name cell is capped and both lines truncate. Hovering shows the full name and each related entity's FQN, which tells same-named tables in two services apart. Before, the unbounded sub-line made the table twice the screen width.
  • Core components:
    • Assignees use the core owner avatar stack: a hover card per avatar, a "+N" that lists the rest, and no per-name profile lookup (it returned 404 for every team).
    • Severity is a read-only core Badge, not a disabled button.
    • The status bar is one continuous track, with a caption that does not wrap.

Type of change:

  • New feature

High-level design:

Tests:

Use cases covered

  • Each dimension shows its related column and sub-line; long and duplicate names show their FQNs on hover.
  • Team assignees render without errors; the "+N" lists the rest.

Unit tests

  • I added unit tests for the new/changed logic.
  • Files: IncidentGroupsTable.test.tsx, IncidentGroups.utils.test.ts, IncidentGroupsView.test.tsx.
  • Coverage on the UI files this PR changes (jest --coverage, limited to this PR's files):
Statements   : 100% ( 281/281 )
Branches     : 95.51% ( 149/156 )
Functions    : 100% ( 52/52 )
Lines        : 100% ( 261/261 )
File                         | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
All files                    |     100 |    95.51 |     100 |     100 |                   
 IncidentGroups.constants.ts |     100 |      100 |     100 |     100 |                   
 IncidentGroups.utils.ts     |     100 |    98.11 |     100 |     100 | 125               
 IncidentGroupsTable.tsx     |     100 |    94.11 |     100 |     100 | 113,232-236       
 IncidentGroupsView.tsx      |     100 |    96.55 |     100 |     100 | 180               
 IncidentStatusBreakdown.tsx |     100 |       80 |     100 |     100 | 70                
 useIncidentGroups.ts        |     100 |    94.44 |     100 |     100 | 64                
Test Suites: 7 passed, 7 total
Tests:       117 passed, 117 total

Backend integration tests

  • Not applicable (no backend API changes).

Ingestion integration tests

  • Not applicable (no ingestion changes).

Playwright (UI) tests

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. At a 1440px window, checked the table width against the design for each dimension (1205px in a 1059px box, was 1984px).
  4. Hovered names, sub-lines and avatars; opened "+N".
  5. Checked 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.

Add the filter row of the design above the incident groups (test case,
assignee, open statuses, date field and date range) and page the groups
on the endpoint's opaque cursors.

- Filters persist in the query string under the params the incident
  listing on the same page already reads, so one filter set drives both;
  the listing's own FilterBar is removed.
- Any change to the filters, dimension, ordering or page size starts over
  from the first page; a background refresh keeps the current page.
- Cursors are passed back verbatim as `offset`, never decoded.
- Empty and error states move to the core EmptyPlaceholder.
- DqDateRangeFilter gains an opt-in `fullWidth` so the range trigger
  spans its field like the inputs beside it.
- The pager jumps to the page picked, through the new `page` parameter,
  instead of stepping one page towards it.
- The assignee filter searches users and teams, lists them on open, and
  names a selected assignee by display name, also after a reload. The
  test case search waits for a pause in typing.
- Filters that match nothing say so and offer to clear them, instead of
  the "no active incidents" placeholder.
- A failed read offers Retry, and raises a toast only when the rows stay
  on screen.
- The loader keeps the section's height, so the page does not jump.
…lk severity

- Group rows carry `tableCount`/`tables` and `testDefinitionCount`/
  `testDefinitions`: the related entities the group's open incidents span,
  ranked by how many incidents carry them and capped at five, with exact
  counts.
- The flat incident listing takes `unowned=true` to list the "No Owner"
  group's incidents, and `dateField` (createdAt|updatedAt) to apply the
  range to the incidents themselves, as the groups do, so a drill-down
  lists exactly what its group counted.
- A bulk entry that keeps an open incident's status now only updates its
  severity instead of being silently skipped; an entry that changes
  nothing, or sends an open incident back to New, is reported as a
  failure rather than counted as applied.
- A severity PATCHed on an incident's latest record now reaches the
  denormalized incident row the groups read their severity from.
A bulk entry that keeps an assigned incident with the same assignee only
edits its severity, but the assignee was compared by name. An entry
naming the assignee by id alone fell through to a reassign the workflow
treats as a no-op, so the severity was dropped while the entry was
reported as applied.
An Assigned request may name its assignee by id or name alone, and the
record kept that partial reference. The incident lists then had no name
to show, and the incident groups, which count assignees by name, left
the assignee out. The mapper now resolves the reference before the
record is written.
A test case is in its table's domain, but that domain is resolved at
read time and leaves no relationship on the test case. The incident
groups only matched a domain set on the test case itself, so in a
domain scope they listed nothing for the usual test case. The flat
listing ignored the domain parameter altogether, so a drill-down from
a domain-scoped group listed incidents from every domain.

Both now match the domain on the test case or on its table, found by
the table's fqnHash prefix of the test case's.
The latest-record listing filters status and assignee on each
incident's latest record, but its count filtered them before ranking.
An incident resolved since still counted through its earlier open
record, so the drill-down pager reported more incidents, and pages,
than it listed. The count now applies the same outer filter, on a copy
of the filter the listing reads afterwards.
The groups and the incident listing only handed out next and previous
cursors, so a pager could not jump to a page or reach the last one. Both
take a 1-based `page` now, turned into the cursor's offset on the
server.

Groups named their assignees by name only, which leaves a client unable
to tell a user from a team, or to show a display name. They now also
carry assigneeReferences, resolved in one lookup per page.
A drill-down link carries its group's key and nothing else, and the group may
sit on any page of the listing. The groups endpoint now takes `group` to return
just that group, matched on the key the dimension groups by — the table FQN,
the test definition or owner id, or empty for the unowned bucket — so it counts
exactly what the full listing counts.
Replace the per-row dimension badge, which read the same on every row,
with the design's related-entity column and sub-line:

- Test definition groups count their tables ("3 tables") and list them
  under the group name.
- Table and owner groups count their check types ("3 types"), or name the
  only one; table groups list their check types, owner groups their tables.
- Counts come from the server's exact `*Count` fields, never from the
  capped arrays.

Header stats follow the design too: a bold count over a plural-aware
"groups" label, and a red trend icon next to the recurring count. The
`label.group-count`/`label.recurring-count` keys they replace are removed.
The groups ignored the domain picked in the app nav while the incident
listing below them honoured it. Pass it as the endpoint's `domain` filter;
a domain change starts over from the first page.
…nents

The related sub-line had no bound, so a group spanning many tables widened the
table to twice the screen and pushed every column after the name off it. The
name cell is now capped and both lines truncate, with the full name and the
FQN of each related entity on hover, which also tells same-named tables in two
services apart.

Assignees use the core owner stack on the resolved references: a hover card
per avatar, a +N that lists the rest, and no profile lookup by name, which
404'd for every team. Severity is a read-only badge instead of a disabled
button, the count is a round pill, the status bar is one continuous track with
a caption that does not wrap, and the last-seen date no longer competes with
the group name.
@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

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 74%
74.71% (112380/150418) 60.22% (68985/114544) 61.55% (22921/37238)

A background refresh that came back empty stepped back a page, but the read of that page ran in the foreground: had it failed, the rows on screen were wiped for the error state instead of staying with a toast. The step-back now reads the earlier page the way the refresh was read.

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.

Hand the navigation back from the filter change instead of leaving it floating, test the status against its options with includes, and dedupe it with a Set.

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.

The test case filter searched through a debounced call whose responses landed in whatever order they came back, so an older, slower search could replace the results of a newer one. The search now runs as one query per debounced text, as the assignee picker does, and closing the menu drops the pending text. Each filter caption now labels the group its control sits in, so a trigger that shows only the picked value is still announced with its field.
The groups count, the recurring count and the related tables and check types badge were built as a number followed by a singular or plural word. That only fits languages with two forms: Russian reads "2 групп" where it needs "2 группы", and Arabic has its own dual. They now use i18next plural keys with the count inside the message, translated per locale, and the number keeps its emphasis through Trans. Every locale carries all six plural forms, since the locale sync only knows the older plural format and would drop a form English does not have. The word-only keys this PR had added are removed.
- Resolve group assignees whatever case the incident row keeps their
  name in: users are looked up by their lowercased FQN and mapped back
  to the row's own name.
- Only accept a user or a team as an incident assignee; any other type
  is rejected with 400.
- Match a domain the test case's table inherits from its schema,
  database or service, in the groups and the flat listing.
- Bind dateField as an enum and move the date range and owner/unowned
  handling of the flat listing into the repository.
- Rank each group's related tables and test definitions in SQL so the
  page is bounded by its groups, not their incidents, and keep incidents
  whose test case lost its definition relationship in the counts.
- Make the dateField IT fail when the range is applied to the wrong
  column.

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 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 2 closed / 2 findings

🟡 Medium risk · Incident-group listings add domain filtering and related-entity table details.

Adds related-entity column, sub-line, and status breakdown to the incident groups table with core components for assignees, severity badge, and status bar; names and sub-lines truncate with hover tooltips showing full details. Consider translating the overflowTeamsLabel and overflowUsersLabel props in the assignees AvatarGroup to avoid English-only headings in the +N popover across other locales.

✅ 2 closed
Closed: Quality: Count + singular/plural concatenation breaks plurals in many locales

📄 openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsTable.tsx:119-122 📄 openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsView.tsx:212-218 📄 openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsView.tsx:236-238 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json:1373-1374 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json:2469 📄 openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json:3255
The PR drops the i18next {{count}} keys (group-count, recurring-count) and builds the text as ${count} ${t(count === 1 ? singular : plural)}. That only handles a one/other split. Russian needs one/few/many forms, so ru-ru shows "2 групп" and "3 типов" where it should show "2 группы" and "3 типа". Arabic needs its own forms too, and the number can't be moved inside the phrase (ja/ko/zh glue it to a counter word). Keep one count-interpolated key per string with i18next _one/_other (and _few/_many) suffixes, so each locale picks its own form. For the bold number, use <Trans> with a component slot.

Closed: Quality: Assignee +N popover shows untranslated 'Teams'/'Users' headings

📄 openmetadata-ui/src/main/resources/ui/src/components/observability/IncidentManager/IncidentGroups/IncidentGroupsTable.tsx:155-159
The assignees AvatarGroup passes only overflowTitleLabel. When overflowTeamsLabel and overflowUsersLabel are missing, OwnerOverflowPopoverContent falls back to its hardcoded English defaults ('Teams', 'Users'). Opening the "+N" popover therefore shows English group headings such as "Users (4)" in every locale. This breaks the no-string-literals i18n rule. The fix is to pass translated labels for both.

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.

Groups table: related-entity column and sub-line

2 participants