Skip to content

fix(ui): make alert sidebar actions work on the incident page - #6864

Open
olitez wants to merge 1 commit into
keephq:mainfrom
olitez:fix/5125-incident-alert-sidebar-actions
Open

olitez wants to merge 1 commit into
keephq:mainfrom
olitez:fix/5125-incident-alert-sidebar-actions

Conversation

@olitez

@olitez olitez commented Oct 1, 2026 •

Copy link
Copy Markdown

Closes #5125. Some sidebar actions are still left, see "Not in this PR".

Problem

On the incident page, open an alert from the incident's alert list. In the
alert sidebar, click "Change Status", "Dismiss" or "Run Workflow". The sidebar
closes and nothing else happens. No modal opens and no request goes to the
backend.

IncidentAlerts passes undefined for setChangeStatusAlert,
setDismissModalAlert and setRunWorkflowModalAlert to AlertSidebar, and it
does not render the modals. AlertMenu calls setChangeStatusAlert?.(alert),
which does nothing, and then closes the sidebar. The same actions work in the
alerts feed, because alerts.tsx keeps this state and renders the modals.

Fix

IncidentAlerts now keeps the state for the three actions and renders
ManualRunWorkflowModal, AlertDismissModal and AlertChangeStatusModal, the
same way the feed does.

The dismiss and change-status modals revalidate only the /alert* SWR keys.
The incident alert list uses /incidents/{id}/alerts, so the page calls
mutateAlerts() when these modals close. Without it the list shows the old
status until the next poll.

Tests

  • New tests in incident-alerts-sidebar.test.tsx: each of the three sidebar
    actions opens its modal, and closing the dismiss or change-status modal
    refetches the incident alerts. They fail on main and pass with this change.
  • incident-alerts.test.tsx mocks ManualRunWorkflowModal, so its SWR fetch
    does not add act(...) warnings.
  • Manual check on a local Keep (backend 0.54.2, UI from this branch): from the
    incident page sidebar, "Change Status" sends POST /alerts/enrich,
    "Dismiss" sends POST /alerts/batch_enrich, "Run Workflow" opens its modal,
    and the incident alert list shows the new status.

Not in this PR

Other sidebar actions on the incident page still do nothing: "History",
"Enrich", "View Alert", provider methods and "Correlate Incident". The first
four set URL parameters that only the feed page reads, and the incident page
does not render an incident selector. They need a different fix, so I kept
this PR small.

On the incident page the alert sidebar got undefined for
setChangeStatusAlert, setDismissModalAlert and setRunWorkflowModalAlert,
and the page did not render the modals. "Change Status", "Dismiss" and
"Run Workflow" closed the sidebar and did nothing.

Keep the state for these actions and render the modals, as the alerts
feed does. The dismiss and change-status modals revalidate only the
/alert* SWR keys, so refetch the incident alerts when they close.

Part of keephq#5125
@CLAassistant

CLAassistant commented Oct 1, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Alert Action Tabs (e.g., History, Enrich) Not Functional When Entering Alert via Incidents View

2 participants