Skip to content

feat(pipeline): Add completion view support to pipeline definitions#112603

Merged
evanpurkhiser merged 1 commit intomasterfrom
evanpurkhiser/feat-pipeline-add-completion-view-support-to-pipeline-definitions
Apr 9, 2026
Merged

feat(pipeline): Add completion view support to pipeline definitions#112603
evanpurkhiser merged 1 commit intomasterfrom
evanpurkhiser/feat-pipeline-add-completion-view-support-to-pipeline-definitions

Conversation

@evanpurkhiser
Copy link
Copy Markdown
Member

@evanpurkhiser evanpurkhiser commented Apr 9, 2026

Add a completionView property to PipelineDefinition that allows pipelines to render a custom view after completion before firing onComplete and closing the modal. When set, onComplete is deferred until the component calls finish(). When null, existing behavior is preserved.

@evanpurkhiser evanpurkhiser requested a review from a team as a code owner April 9, 2026 18:32
@evanpurkhiser evanpurkhiser requested review from a team and removed request for a team April 9, 2026 18:33
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 9, 2026
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-pipeline-add-completion-view-support-to-pipeline-definitions branch from cc56909 to 585549a Compare April 9, 2026 19:44
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 585549a. Configure here.

if (state.status === 'complete') {
onCompleteRef.current?.(state.data);
}
}, [state]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

finish lacks guard against repeated onComplete invocations

Medium Severity

The finish callback has no guard to prevent multiple invocations. Each call fires onCompleteRef.current, so a rapid double-click on the "Done" button fires onComplete twice. Unlike advance, which exposes isPending so step components can disable their buttons, PipelineCompletionProps provides no equivalent mechanism for completion views to prevent repeated submission. In the modal, each finish() call triggers handleComplete, which calls both the consumer's onComplete and closeModal(), potentially causing duplicate side effects before the modal unmounts.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 585549a. Configure here.

Add a completionView property to PipelineDefinition that allows
pipelines to render a custom view after completion before firing
onComplete. When set, onComplete is deferred until the component
calls finish(). When null, existing behavior is preserved.

Adds JSDoc comments to PipelineDefinition and PipelineStepDefinition.
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-pipeline-add-completion-view-support-to-pipeline-definitions branch from 585549a to 3f79427 Compare April 9, 2026 20:24
@evanpurkhiser evanpurkhiser enabled auto-merge (squash) April 9, 2026 20:35
@evanpurkhiser evanpurkhiser merged commit 2ce924b into master Apr 9, 2026
66 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/feat-pipeline-add-completion-view-support-to-pipeline-definitions branch April 9, 2026 20:41
george-sentry pushed a commit that referenced this pull request Apr 9, 2026
…112603)

Add a `completionView` property to `PipelineDefinition` that allows
pipelines to render a custom view after completion before firing
`onComplete` and closing the modal. When set, `onComplete` is deferred
until the component calls finish(). When null, existing behavior is
preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants