Skip to content

feat(workflow-executor): accept approval request id on native trigger submit#1782

Merged
Scra3 merged 1 commit into
mainfrom
fix/prd-820-approval-id-native-trigger
Jul 24, 2026
Merged

feat(workflow-executor): accept approval request id on native trigger submit#1782
Scra3 merged 1 commit into
mainfrom
fix/prd-820-approval-id-native-trigger

Conversation

@Scra3

@Scra3 Scra3 commented Jul 24, 2026

Copy link
Copy Markdown
Member

What

Let a frontend-native (manual / AI-assisted) Trigger Action submit carry the id of the approval request it just filed, so the workflow run panel can deep-link to it — parity with the Full-AI path, where the executor files the approval and its id already flows through the step outcome.

triggerActionPatchSchema (pending-data validator) now accepts an optional, strict approvalRequest: { id }. It's persisted verbatim in userConfirmation (via saveFrontendResult's ...existingExecution), so GET /runs/:runId returns it and the front renders the copiable link.

Why

PRD-688 specced "note + copiable link to the approval request" but only wired it for Full AI. In manual / AI-assisted the front creates the approval natively and had no way to hand its id to the executor (the strict validator rejected the field), so the run panel showed "This action requires approval…" without the link. This closes that gap.

Compatibility

Optional field — older frontends that don't send it are unaffected. The paired frontend change (forestadmin PR #9860) sends the id but retries without it if an older executor rejects the payload, so deploy order is not load-bearing.

Tests

pending-data-validators.test.ts: accepts a pending-approval submit with approvalRequest.id; rejects an empty id and extra keys (strict).

fixes PRD-820

🤖 Generated with Claude Code

Note

Accept optional approvalRequest id on native trigger submit

Adds an optional approvalRequest field to the triggerActionPatchSchema validator in pending-data-validators.ts. When present, the field must be a strict object with a non-empty string id; payloads with an empty id or extra keys are rejected. New tests cover acceptance and rejection cases for this field.

Macroscope summarized 292e9ba.

…rigger submit

A frontend-native (manual / AI-assisted) trigger-action files the approval
request itself; accept its id on the pending-data patch so it is persisted in
userConfirmation and the run panel can deep-link to it — parity with the Full-AI
path, whose approval id already flows through the outcome. Strict, optional.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jul 24, 2026

Copy link
Copy Markdown

PRD-820

@qltysh

qltysh Bot commented Jul 24, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@Scra3
Scra3 merged commit 843b98b into main Jul 24, 2026
37 checks passed
@Scra3
Scra3 deleted the fix/prd-820-approval-id-native-trigger branch July 24, 2026 13:53
forest-bot added a commit that referenced this pull request Jul 24, 2026
# @forestadmin/workflow-executor [1.23.0](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/workflow-executor@1.22.0...@forestadmin/workflow-executor@1.23.0) (2026-07-24)

### Features

* **workflow-executor:** accept approval request id on native trigger submit ([#1782](#1782)) ([843b98b](843b98b))
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.

2 participants