elastic / elastic/kibana

[AlertingV2] Row actions for classic (v1) alerts in unified episodes table

Closed
#288,317 0 comments 0 reactions 1 assignee Claimed by @benakansara View on GitHub
Feature:AlertingV2 Team:rna-project
Dominant language
TypeScript
Stars
21.3k
Forks
8.6k
PR merge metrics
PR metrics pending

Description

## Summary
Classic (v1) alerts merged into the v2 episodes table currently have no row actions. `mapClassicAlertToEpisode()` sets `supports_actions: false`, which causes `episodeSupportsActions()` to exclude them from all inline controls and the overflow menu.

V2-native episodes already have row actions (ack, snooze, resolve, tags, assignee, open in Discover) via `createEpisodeActions()` in `@kbn/alerting-v2-episodes-ui/actions/`.

## What needs to happen

### 1. Enable the action gating for classic rows
- Relax or extend `episodeSupportsActions()` in `episodes_query.ts` so classic rows can participate in the action menu
- May need a per-action capability check rather than a blanket boolean

### 2. Wire classic alert workflow APIs
Classic alerts use different APIs than v2 episodes for state mutations:
- **Acknowledge / Unacknowledge** — v1 uses alert workflow status API (`POST /internal/alerting/alert/{id}/_update_workflow_status`); v2 uses episode-level ack
- **Snooze / Unsnooze** — see note below on snooze complexity
- **Mark as untracked** — v1 has `POST /internal/alerting/alerts/_bulk_untrack`; not present in v2 action set, needs to be added

### 3. Snooze implementation for classic rows
V1 and v2 snooze have different UIs and APIs:
- **V1**: inline form inside kebab popover (`AlertSnoozePanelInline`) with quick snooze + conditional snooze (field-based). Calls rule-level snooze API via `ruleId` + `alertInstanceId`
- **V2**: modal (`SnoozeExpiryModal`) with quick snooze only. Calls episode-level bulk action API via `group_hash`

For classic rows, need to decide whether to use the v1 inline panel pattern or the v2 modal, and route to v1 rule-level APIs. `mapClassicAlertToEpisode` would need to preserve `ruleId` and `alertInstanceId` for this.

### Key files
- `alerting-v2-episodes-ui/actions/create_episode_actions.ts` — episode action factory
- `alerting-v2-episodes-ui/classic_alerts/map_alert.ts` — classic→episode mapping (sets `supports_actions`)
- `alerts-table/components/snooze_alert_action.tsx` — v1 snooze with inline panel + conditional snooze
- `alerting-v2-episodes-ui/actions/snooze.ts` — v2 snooze with modal
- `alerts-table/components/default_alert_actions.tsx` — v1 action implementations to reference
- `alert_episodes_list_page.tsx` — wires `rowAdditionalLeadingControls`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.