feat(agentic-workflow): replay webhook runs from run details
FA
15h ago+385+385+012345678901234567890123456789-1-1-0123456789
Summary
Issue: N/A (no ticket supplied)
Adds a Replay button to every row of the agent task run history table, in a new Actions column. It resends a past run to the agent task webhook straight from the browser (no backend endpoint), so CORS behavior can be tested. The button is not in the run details panel anymore.
- Shown on every row:
WEBHOOK,MANUALandSCHEDULEruns, with or without a stored payload. - With a stored payload (an empty string counts),
POSTs the exact original raw payload (no parse/re-serialize) toservice.webhook.urlwithcredentials: 'omit'.Content-Typeisapplication/jsonwhen the payload parses as JSON, otherwisetext/plain, since run history does not store request headers. - With a
null/missing payload,POSTs an empty body (noContent-Type). - Disabled until the service (webhook URL) is loaded. Loading state only on the activated row. Click does not bubble, so the run details do not open.
- Unchanged feedback: success toast + run history refetch, error toast on a non-2xx status (shows the status) or a network/CORS failure.
mutations.replayAgenticWorkflowRun(services data-access) now accepts an optional/null payload;useReplayAgenticWorkflowRunhook in the services feature lib.
How to test (staging, agent task with a webhook that allows the Console origin via CORS):
- Open the service Runs page. Every row has a Replay button in the Actions column.
- Click Replay on a webhook run with a payload. Expect a new run with the same payload in the list and a "Run replayed" toast; the details panel stays closed.
- Click Replay on a manual/scheduled run. Expect a new run triggered by the webhook with an empty payload.
- Point at a webhook without CORS headers or a failing one. Expect a "Replay failed" toast and no new run.
Screenshots / Recordings
Testing
- Changes tested locally in the relevant Console's pages and Storybooks
-
yarn testoryarn test -u(if you need to regenerate snapshots) — focused run only:npx jest -c libs/domains/services/feature/jest.config.ts libs/domains/services/feature/src/lib/agentic-workflow-runs libs/domains/services/feature/src/lib/hooks/use-replay-agentic-workflow-run(2 suites, 59 tests passed). Fullyarn testnot run. -
yarn format(prettier check on changed files clean) -
yarn lint(nx run-many --target=lint --projects=domains-services-feature,domains-services-data-accesspassed; not all projects)
PR Checklist
- I followed naming, styling, and TypeScript rules (see
.cursor/rules) - I performed a self-review (diff inspected, dead code removed)
- I titled the PR using Conventional Commits with a scope when possible (e.g.
feat(service): add new Terraform service) - required for semantic-release - I only kept necessary comments, written in English (watch for useless AI comments)
- I involved a designer to validate UI changes if I am not a designer
- I covered new business logic with tests (unit)
- I confirmed CI is green (Codecov red can be accepted)
- I reviewed and executed locally any AI-assisted code (unit tests only; the feature was not exercised in a running app)
Summary by cubic
Adds a Replay action to the agent task run history table that resends the stored webhook payload from the browser, so webhook CORS behavior can be tested.
- Replay is now an Actions column on every run row, shown regardless of trigger or payload, instead of being limited to the run details sheet.
- Posts the exact original payload to the service webhook URL with
application/jsonif it parses as JSON, otherwisetext/plain; for runs without a payload it posts an empty body with no content type. - Shows a per-row loading state that disables the row until the request finishes, then a success toast with run-history refetch, or an error toast with the HTTP status or an indeterminate-delivery message for network/CORS failures.
- Disabled until the webhook URL is loaded.