Skip to content

[2.1] Fixes #38280: Show when an alert is disabled and not running (backport 2.1 #38286) - #38588

Merged
manerow merged 1 commit into
2.1from
backport/2.1/disabled-alert-ui-state
Nov 24, 2026
Merged

manerow merged 1 commit into
2.1from
backport/2.1/disabled-alert-ui-state

Conversation

@manerow

@manerow manerow commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Issue

Cherry-pick of #38286 to 2.1 (Fixes #38280). The change is identical: the backport has the same patch id as the commit merged on main, and it applied with no conflicts.

Why 2.1 needs it

The backend half, #38279, is already on 2.1 through #38555. Since then a disabled alert reports 0 pending events and the API returns enabled, but the 2.1 UI does not show either, and there is still no way to switch an alert off or on from it. This brings the UI in line with the backend.

What this PR changes

  • Alert lists (Notifications, Observability classic and AI mode, profile Notifications panel): a Status column, Active in green or Disabled in gray.
  • Event counts header: a disabled alert shows Pending as "Not running", with a tooltip, instead of 0.
  • Diagnostics tab: a Status row, Enabled or Disabled.
  • Alert forms (create and edit, notification and observability, classic and AI mode): an Enabled settings row before Name, on for new alerts. Its description says what the current state means. While a saved alert is off, its other fields are read-only; a new alert stays editable, so it can still be filled in and saved disabled. Save and Cancel stay active.

It reuses the alert's enabled field and the core Card, Toggle and BadgeWithDot, which 2.1 already ships. Five translation keys are new, translated in every locale.

Tests

The tests come with the cherry-pick unchanged: unit tests for the new components, the lists, the diagnostics, all form variants and the field-access helper, and a Playwright step in ObservabilityAlerts.spec.ts that switches an alert off from its form, saves, then switches it back on.

Run locally on 2.1 with the backport: the 16 test files it changes pass (344 tests). ESLint reports no errors; yarn tsc:check reports no error in this PR's files (the existing ones on 2.1 are in OMSelectWidget.tsx and SSOUtils.test.ts). Playwright was not run locally.

* Report nothing pending for a disabled alert

* Cover alerts created disabled with a position an older release wrote

* Share the read-nothing progress and test the no-row read

* Keep the raw alert offset getter Collate tests read

* Say a disabled alert is not running and report its stored offsets

* Show when an alert is disabled and not running

* Map the notification list page to its alert specs

* Describe the status row neutrally and test each disabled alert screen

* Organise the alert badge imports

* Show alert status in a column and switch alerts on or off from the form

* Show a disabled alert's description as a preview instead of a locked editor

* Organise the alert status and switch imports

* Format the alert form fields and map the enabled switch to its spec

* Show alert status as a dot badge, green for active and gray for disabled

* Turn the alert Enabled switch into a settings row whose description explains the state

* Close the profile source picker from the start of the header subtitle

* Follow the helper placement, core styling and permission test rules in the alert UI

* Lock a switched-off alert only when editing it and drop permission checks the entry points already make
@manerow
manerow requested a review from a team as a code owner November 24, 2026 10:21
@manerow
manerow requested review from shah-harshit and removed request for a team November 24, 2026 10:21
@manerow manerow self-assigned this Nov 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

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

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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.

@manerow manerow added UI UI specific issues skip-pr-checks Bypass PR metadata validation check safe to test Add this label to run secure Github workflows on PRs labels Nov 24, 2026
@gitar-bot

gitar-bot Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk

Adding controls to disable and re-enable event alerts could stop configured notifications until an alert is switched back on.

Backports the alert disabled-state UI to 2.1: a Status column in alert lists, a "Not running" Pending count and Status row for disabled alerts, and an Enabled toggle in alert forms. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

@manerow
manerow merged commit 755ad60 into 2.1 Nov 24, 2026
42 of 44 checks passed
@manerow
manerow deleted the backport/2.1/disabled-alert-ui-state branch November 24, 2026 10:27
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 skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant