Repository navigation
feat(agentic-workflow): replay webhook runs from run details - #3106
fabienfleureau wants to merge 3 commits into
Conversation
|
View your CI Pipeline Execution ↗ for commit 7f9a055
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
🟡 Changes recommended
Pending replays permit duplicate keyboard submissions, and CORS failures can incorrectly imply that no run started.
2 open findings
What changed in this PR
Adds browser-side replay of stored webhook payloads from agent-task run details.
Changes:
- Adds replay mutation/hook with content-type inference, toasts, and history invalidation.
- Adds a conditional Replay button with loading and disabled states.
- Covers payload, trigger, success, and failure scenarios.
| File | Description |
|---|---|
domains-services-data-access.ts |
Implements webhook replay request. |
use-replay-agentic-workflow-run.ts |
Handles mutation feedback and cache invalidation. |
use-replay-agentic-workflow-run.spec.tsx |
Tests replay mutation behavior. |
agentic-workflow-runs.tsx |
Adds Replay action to run details. |
agentic-workflow-runs.spec.tsx |
Tests Replay UI states and interactions. |
index.ts |
Exports the replay hook. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## staging #3106 +/- ##
===========================================
- Coverage 52.40% 52.28% -0.12%
===========================================
Files 1296 1353 +57
Lines 28962 30757 +1795
Branches 8782 9299 +517
===========================================
+ Hits 15177 16081 +904
- Misses 11368 12135 +767
- Partials 2417 2541 +124
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
All reported issues were addressed across 4 files (changes from recent commits).
Requires human review: Auto-approval blocked because this review re-detected 1 unresolved issue already reported by Cubic.
View guided diff | Turn on auto-fix | Re-trigger cubic
| }} | ||
| > | ||
| <Icon iconName="rotate-right" iconStyle="regular" /> | ||
| Replay |
There was a problem hiding this comment.
Could we make this an icon-only button with rotate-right and a “Replay” tooltip on hover?
| async replayAgenticWorkflowRun({ webhookUrl, payload }: { webhookUrl: string; payload?: string | null }) { | ||
| let response: Response | ||
| try { | ||
| response = await fetch(webhookUrl, { |
There was a problem hiding this comment.
Could we keep this behind our usual API flow instead of posting directly to the webhook from the browser? CORS and replay delivery should be handled by the backend or infra. We shouldn't need to infer the content type with isJson or handle uncertain delivery here

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.
WEBHOOK,MANUALandSCHEDULEruns, with or without a stored payload.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.null/missing payload,POSTs an empty body (noContent-Type).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):
Screenshots / Recordings
Testing
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
.cursor/rules)feat(service): add new Terraform service) - required for semantic-releaseSummary 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.
application/jsonif it parses as JSON, otherwisetext/plain; for runs without a payload it posts an empty body with no content type.Written for commit 7f9a055. Summary will update on new commits.