Skip to content

[One Workflow] Execute workflow from historical#253396

Merged
semd merged 17 commits intoelastic:mainfrom
semd:14694_workflows/replay_executions
Feb 24, 2026
Merged

[One Workflow] Execute workflow from historical#253396
semd merged 17 commits intoelastic:mainfrom
semd:14694_workflows/replay_executions

Conversation

@semd
Copy link
Copy Markdown
Contributor

@semd semd commented Feb 17, 2026

Summary

Adds a "Historical" trigger tab to the Test/Run Workflow modal, allowing users to re-run a workflow using input data from a previous execution.
Also introduces a "Run again" button in the execution detail panel, and cleans up trigger-related types, translations, and icons.

Changes

Historical trigger tab (new feature)

  • New WorkflowExecuteHistoricalForm component: lets the user pick a past execution from a combo box, fetches its context, and populates a JSON editor with the original input data.
  • New useWorkflowExecution hook for fetching a single execution by ID.
  • The modal now renders four trigger cards (Alert, Document, Manual, Historical) driven by a shared ENABLED_TRIGGER_TABS constant and a WorkflowTriggerTab type.
  • All four trigger forms share the same executionInput/executionInputErrors state — no special-cased branches for historical.

"Run again" button

  • Added a replay button (EuiButtonIcon with refresh icon) to WorkflowExecutionPanel, next to the existing "Done" button.
  • Clicking it stores the execution ID in Redux (replayExecutionId) and opens the test modal with the Historical tab pre-selected.
  • New Redux state (replayExecutionId), selector (selectReplayExecutionId), and action (setReplayExecutionId) in the workflow detail slice.

Trigger types & translations cleanup

  • Moved WorkflowTriggerTab from telemetry types into a dedicated features/run_workflow/ui/types.ts, derived from ENABLED_TRIGGER_TABS constant.
  • Removed old MANUAL_TRIGGERS_DESCRIPTIONS from common/translations.ts; replaced with feature-scoped TRIGGER_TABS_LABELS and TRIGGER_TABS_DESCRIPTIONS.
  • Renamed "Index" trigger label to "Document" for clarity.
  • Updated telemetry schema description to include 'historical'.

Icon & trigger type improvements

  • Extracted getTriggerTypeIconType() from getStepIconType() so trigger icons are resolved separately from step icons.
  • Added 'document' trigger type to workflow_pseudo_step_context.ts (distinguishes alert vs document events).
  • Added aria-hidden attributes to decorative icons.

Minor UI tweaks

  • Wrapped AlertsSearchBar in a transparent EuiPanel for consistent spacing.
  • Adjusted triggers forms gutterSize and padding for alignment.

Files touched

Area Files
Historical form workflow_execute_historical_form.tsx (new)
Data hook use_workflow_execution.ts (new)
Constants & types constants.ts (new), types.ts (new), translations.ts (new)
Modal workflow_execute_modal.tsx
Execution panel workflow_execution_panel.tsx
Redux store slice.ts, selectors.ts, types.ts
Test modal workflow_detail_test_modal.tsx
Workflow list workflow_list.tsx
Telemetry execution/types.ts, execution/index.ts, telemetry.ts
Trigger context workflow_pseudo_step_context.ts
Icons get_step_icon_type.ts, step_icon.tsx
Event form workflow_execute_event_form.tsx
Index form workflow_execute_index_form.tsx
Use workflow actions use_workflow_actions.ts
Removed translations common/translations.ts
Tests workflow_execute_modal.test.tsx, workflow_detail_test_modal.test.tsx

Screenshots

Before

Captura de pantalla 2026-02-17 a les 11 08 48

After

Gravacio.de.pantalla.2026-02-18.a.les.11.39.13.mov

@semd semd self-assigned this Feb 17, 2026
@semd semd added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting v9.4.0 labels Feb 17, 2026
@semd
Copy link
Copy Markdown
Contributor Author

semd commented Feb 19, 2026

/ci

@semd semd marked this pull request as ready for review February 20, 2026 10:13
@semd semd requested a review from a team as a code owner February 20, 2026 10:13
@semd
Copy link
Copy Markdown
Contributor Author

semd commented Feb 20, 2026

@elasticmachine merge upstream

@botelastic botelastic Bot added the Team:One Workflow Team label for One Workflow (Workflow automation) label Feb 20, 2026
@Kiryous
Copy link
Copy Markdown
Contributor

Kiryous commented Feb 20, 2026

Nice work @semd!

A few things I noticed locally:

  1. I expect the replay button to be visible not only then I play an execution from editor, but also if I just go to the detail view from executions list:
Screen.Recording.2026-02-20.at.15.21.40.mov
  1. I think it would be useful to user to see icon or text of execution status in the dropdown list, e.g. if I want to re-run only failed executions. cc @r4zr32d3k1l
Screenshot 2026-02-20 at 15 23 39

@semd
Copy link
Copy Markdown
Contributor Author

semd commented Feb 20, 2026

Hey @Kiryous
Thanks for the review and the suggestions 🙏

  1. I expect the replay button to be visible not only then I play an execution from editor, but also if I just go to the detail view from executions list:

Yes, that is planned.
However, I don't have any design for this screen yet. We could use the same small green icon-button, but it would be a bit weird in this flyout, since we don't have the Done button next to it; we have the "Back to executions" link at the top. Maybe we could render the Done button in this screen as well, for consistency, but I am not sure.
Also, the Executions flyout is going to be moved to its own page soon. So, I decided to put that on hold to not block this initial PR. We can discuss it with @r4zr32d3k1l separately and do it in a follow-up PR. Is that okay?
(Users can still find production executions in the historical execution selector in the modal.)

  1. I think it would be useful to user to see icon or text of execution status in the dropdown list, e.g. if I want to re-run only failed executions. cc @r4zr32d3k1l

That would be cool! I think users would also benefit from a status filter as well, and a time range filter would be even more important, imo. None of these was in the requirements, though.
We could probably do that as a follow-up as well; they are extensions to this implementation. Would you be okay with that? I don't want this PR to grow too much or get stuck because of that.

@r4zr32d3k1l
Copy link
Copy Markdown
Contributor

Hey, nice catch. I completely missed that case and updated the mocks accordingly.
https://www.figma.com/design/8fTMPWhL033B5YdSyfgSVG/One-Workflow?m=auto&node-id=5771-20966&t=y0JOJkkjlIWkxwkQ-1

@Kiryous
Copy link
Copy Markdown
Contributor

Kiryous commented Feb 20, 2026

Also, the Executions flyout is going to be moved to its own page soon. So, I decided to put that on hold to not block this initial PR. We can discuss it with @r4zr32d3k1l separately and do it in a follow-up PR. Is that okay?

Yes, I see, Pavel just added this variant, with just a wider Replay button, should be a little change, maybe we can squeeze it into this PR?

Copy link
Copy Markdown
Contributor

@Kiryous Kiryous left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Feb 23, 2026

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #3 / discover responsive sidebar should render buttons in data view picker correctly
  • [job] [logs] FTR Configs #170 / Journey[web_logs_dashboard_long_running] Return to dashboard
  • [job] [logs] Jest Tests #5 / WorkflowExecutionPanel replay button should dispatch setReplayExecutionId and setIsTestModalOpen on click
  • [job] [logs] Jest Tests #5 / WorkflowExecutionPanel replay button should dispatch setReplayExecutionId and setIsTestModalOpen on click

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
workflowsManagement 1289 1293 +4

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
workflowsManagement 1.5MB 1.5MB +6.3KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
workflowsManagement 20.3KB 20.3KB +11.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
workflowsManagement 99 98 -1

Total ESLint disabled count

id before after diff
workflowsManagement 134 133 -1

History

cc @semd

@semd semd merged commit 1615190 into elastic:main Feb 24, 2026
16 checks passed
mbondyra added a commit to rgodfrey-elastic/kibana that referenced this pull request Feb 24, 2026
…ps-config-rebase

* commit 'f135f030951237c5e9b0251931441aee3121b31d': (163 commits)
  [CPS] Support data view requests and do not sanitize project_routing in data plugin/resolve indices  (elastic#253654)
  [One Workflow] Execute workflow from historical (elastic#253396)
  [streams][background tasks] gracefully handle non existing stream (elastic#254683)
  [Lens API] Waffle/Mosaic get green as a default color (elastic#254304)
  [Security Solution] Remove prebuilt rules customization callout on Rule Management page (elastic#254386)
  [Workflows] support passing attachments to run_agent step (elastic#251291)
  [One Discover][Logs UX] Update OpenTelemetry Semantic Conventions (elastic#254367)
  [kbn-es] Add --docker flag to yarn es snapshot (elastic#254306)
  [Workplace AI] Remove Data Source Config (elastic#254521)
  [Entity Store v2] Add CRUD API (elastic#252052)
  [CI] Increase type checking machine (elastic#254676)
  [main] Sync bundled packages with Package Storage (elastic#254232)
  Skip flaky test elastic#254625 (elastic#254662)
  Upgrade `@elastic/elasticsearch` to 9.3.1 (elastic#253660)
  [One Workflow] Migrate http step to new connector (elastic#249004)
  [Entity Store] Store EUID Scripts (elastic#254515)
  [APM] Fix Otel missing fields undefined errors (elastic#254271)
  [Console] Add support for documentation links on Serverless (elastic#254489)
  Create edit ILM flow (elastic#253393)
  [Agent Builder] Mid term: minimal recommended model set elastic#12875 (elastic#254560)
  ...
nreese pushed a commit to nreese/kibana that referenced this pull request Feb 25, 2026
## Summary

Adds a "Historical" trigger tab to the Test/Run Workflow modal, allowing
users to re-run a workflow using input data from a previous execution.
Also introduces a "Run again" button in the execution detail panel, and
cleans up trigger-related types, translations, and icons.

### Changes

**Historical trigger tab (new feature)**
- New `WorkflowExecuteHistoricalForm` component: lets the user pick a
past execution from a combo box, fetches its context, and populates a
JSON editor with the original input data.
- New `useWorkflowExecution` hook for fetching a single execution by ID.
- The modal now renders four trigger cards (Alert, Document, Manual,
Historical) driven by a shared `ENABLED_TRIGGER_TABS` constant and a
`WorkflowTriggerTab` type.
- All four trigger forms share the same
`executionInput`/`executionInputErrors` state — no special-cased
branches for historical.

**"Run again" button**
- Added a replay button (`EuiButtonIcon` with refresh icon) to
`WorkflowExecutionPanel`, next to the existing "Done" button.
- Clicking it stores the execution ID in Redux (`replayExecutionId`) and
opens the test modal with the Historical tab pre-selected.
- New Redux state (`replayExecutionId`), selector
(`selectReplayExecutionId`), and action (`setReplayExecutionId`) in the
workflow detail slice.

**Trigger types & translations cleanup**
- Moved `WorkflowTriggerTab` from telemetry types into a dedicated
`features/run_workflow/ui/types.ts`, derived from `ENABLED_TRIGGER_TABS`
constant.
- Removed old `MANUAL_TRIGGERS_DESCRIPTIONS` from
`common/translations.ts`; replaced with feature-scoped
`TRIGGER_TABS_LABELS` and `TRIGGER_TABS_DESCRIPTIONS`.
- Renamed "Index" trigger label to "Document" for clarity.
- Updated telemetry schema description to include `'historical'`.

**Icon & trigger type improvements**
- Extracted `getTriggerTypeIconType()` from `getStepIconType()` so
trigger icons are resolved separately from step icons.
- Added `'document'` trigger type to `workflow_pseudo_step_context.ts`
(distinguishes alert vs document events).
- Added `aria-hidden` attributes to decorative icons.

**Minor UI tweaks**
- Wrapped `AlertsSearchBar` in a transparent `EuiPanel` for consistent
spacing.
- Adjusted triggers forms gutterSize and padding for alignment.

### Files touched

| Area | Files |
|------|-------|
| Historical form | `workflow_execute_historical_form.tsx` (new) |
| Data hook | `use_workflow_execution.ts` (new) |
| Constants & types | `constants.ts` (new), `types.ts` (new),
`translations.ts` (new) |
| Modal | `workflow_execute_modal.tsx` |
| Execution panel | `workflow_execution_panel.tsx` |
| Redux store | `slice.ts`, `selectors.ts`, `types.ts` |
| Test modal | `workflow_detail_test_modal.tsx` |
| Workflow list | `workflow_list.tsx` |
| Telemetry | `execution/types.ts`, `execution/index.ts`, `telemetry.ts`
|
| Trigger context | `workflow_pseudo_step_context.ts` |
| Icons | `get_step_icon_type.ts`, `step_icon.tsx` |
| Event form | `workflow_execute_event_form.tsx` |
| Index form | `workflow_execute_index_form.tsx` |
| Use workflow actions | `use_workflow_actions.ts` |
| Removed translations | `common/translations.ts` |
| Tests | `workflow_execute_modal.test.tsx`,
`workflow_detail_test_modal.test.tsx` |

## Screenshots

### Before
<img width="1212" height="756" alt="Captura de pantalla 2026-02-17 a les
11 08 48"
src="https://github.com/user-attachments/assets/5aef8910-1421-4470-be3e-a3da4dbd2c7b"
/>

### After


https://github.com/user-attachments/assets/28481963-7403-456b-9384-aae339e25a38

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tal <tal.borenstein@elastic.co>
qn895 pushed a commit to qn895/kibana that referenced this pull request Mar 11, 2026
## Summary

Adds a "Historical" trigger tab to the Test/Run Workflow modal, allowing
users to re-run a workflow using input data from a previous execution.
Also introduces a "Run again" button in the execution detail panel, and
cleans up trigger-related types, translations, and icons.

### Changes

**Historical trigger tab (new feature)**
- New `WorkflowExecuteHistoricalForm` component: lets the user pick a
past execution from a combo box, fetches its context, and populates a
JSON editor with the original input data.
- New `useWorkflowExecution` hook for fetching a single execution by ID.
- The modal now renders four trigger cards (Alert, Document, Manual,
Historical) driven by a shared `ENABLED_TRIGGER_TABS` constant and a
`WorkflowTriggerTab` type.
- All four trigger forms share the same
`executionInput`/`executionInputErrors` state — no special-cased
branches for historical.

**"Run again" button**
- Added a replay button (`EuiButtonIcon` with refresh icon) to
`WorkflowExecutionPanel`, next to the existing "Done" button.
- Clicking it stores the execution ID in Redux (`replayExecutionId`) and
opens the test modal with the Historical tab pre-selected.
- New Redux state (`replayExecutionId`), selector
(`selectReplayExecutionId`), and action (`setReplayExecutionId`) in the
workflow detail slice.

**Trigger types & translations cleanup**
- Moved `WorkflowTriggerTab` from telemetry types into a dedicated
`features/run_workflow/ui/types.ts`, derived from `ENABLED_TRIGGER_TABS`
constant.
- Removed old `MANUAL_TRIGGERS_DESCRIPTIONS` from
`common/translations.ts`; replaced with feature-scoped
`TRIGGER_TABS_LABELS` and `TRIGGER_TABS_DESCRIPTIONS`.
- Renamed "Index" trigger label to "Document" for clarity.
- Updated telemetry schema description to include `'historical'`.

**Icon & trigger type improvements**
- Extracted `getTriggerTypeIconType()` from `getStepIconType()` so
trigger icons are resolved separately from step icons.
- Added `'document'` trigger type to `workflow_pseudo_step_context.ts`
(distinguishes alert vs document events).
- Added `aria-hidden` attributes to decorative icons.

**Minor UI tweaks**
- Wrapped `AlertsSearchBar` in a transparent `EuiPanel` for consistent
spacing.
- Adjusted triggers forms gutterSize and padding for alignment.

### Files touched

| Area | Files |
|------|-------|
| Historical form | `workflow_execute_historical_form.tsx` (new) |
| Data hook | `use_workflow_execution.ts` (new) |
| Constants & types | `constants.ts` (new), `types.ts` (new),
`translations.ts` (new) |
| Modal | `workflow_execute_modal.tsx` |
| Execution panel | `workflow_execution_panel.tsx` |
| Redux store | `slice.ts`, `selectors.ts`, `types.ts` |
| Test modal | `workflow_detail_test_modal.tsx` |
| Workflow list | `workflow_list.tsx` |
| Telemetry | `execution/types.ts`, `execution/index.ts`, `telemetry.ts`
|
| Trigger context | `workflow_pseudo_step_context.ts` |
| Icons | `get_step_icon_type.ts`, `step_icon.tsx` |
| Event form | `workflow_execute_event_form.tsx` |
| Index form | `workflow_execute_index_form.tsx` |
| Use workflow actions | `use_workflow_actions.ts` |
| Removed translations | `common/translations.ts` |
| Tests | `workflow_execute_modal.test.tsx`,
`workflow_detail_test_modal.test.tsx` |

## Screenshots

### Before
<img width="1212" height="756" alt="Captura de pantalla 2026-02-17 a les
11 08 48"
src="https://github.com/user-attachments/assets/5aef8910-1421-4470-be3e-a3da4dbd2c7b"
/>

### After


https://github.com/user-attachments/assets/28481963-7403-456b-9384-aae339e25a38

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Tal <tal.borenstein@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:One Workflow Team label for One Workflow (Workflow automation) v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants