feat(workflow-executor): accept approval request id on native trigger submit#1782
Merged
Conversation
…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>
|
Coverage Impact This PR will not change total coverage. 🚦 See full report on Qlty Cloud »🛟 Help
|
matthv
approved these changes
Jul 24, 2026
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))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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, strictapprovalRequest: { id }. It's persisted verbatim inuserConfirmation(viasaveFrontendResult's...existingExecution), soGET /runs/:runIdreturns 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 withapprovalRequest.id; rejects an empty id and extra keys (strict).fixes PRD-820
🤖 Generated with Claude Code
Note
Accept optional
approvalRequestid on native trigger submitAdds an optional
approvalRequestfield to thetriggerActionPatchSchemavalidator in pending-data-validators.ts. When present, the field must be a strict object with a non-empty stringid; payloads with an emptyidor extra keys are rejected. New tests cover acceptance and rejection cases for this field.Macroscope summarized 292e9ba.