FN-6304: add optional workflow steps

Allow workflows to define default-on optional steps and expose browser verification as a togglable workflow option.

- Add core optional-step helpers, IR metadata, compiler support, exports, and regression coverage.
- Mark browser verification optional in the built-in coding workflow and document optional workflow-step behavior.
- Add dashboard/API support for optional step defaults and enabled-state presentation with localized label cleanup.
- Add a patch changeset for the published Fusion package.

Files changed:
 .changeset/fn-6304-optional-workflow-steps.md      |  5 ++
 docs/task-management.md                            |  2 +-
 docs/workflow-steps.md                             |  8 ++
 packages/core/src/__tests__/workflow-ir.test.ts    | 45 +++++++++++
 .../src/__tests__/workflow-optional-steps.test.ts  | 88 ++++++++++++++++++++++
 packages/core/src/builtin-coding-workflow-ir.ts    |  1 +
 packages/core/src/index.ts                         |  3 +
 packages/core/src/store.ts                         |  3 +
 packages/core/src/workflow-compiler.ts             | 30 +++++++-
 packages/core/src/workflow-ir-types.ts             | 11 +++
 packages/core/src/workflow-ir.ts                   | 32 +++++++-
 packages/core/src/workflow-optional-steps.ts       | 46 +++++++++++
 packages/dashboard/app/api/legacy.ts               | 10 +++
 .../dashboard/app/components/InlineCreateCard.css  | 20 +++++
 .../dashboard/app/components/InlineCreateCard.tsx  | 87 ++++++++++++++++-----
 .../app/components/WorkflowResultsTab.tsx          | 44 +++++++++--
 .../components/__tests__/InlineCreateCard.test.tsx | 41 +++++++++-
 .../__tests__/WorkflowResultsTab.test.tsx          | 58 +++++++++++++-
 .../src/__tests__/workflow-routes.test.ts          | 22 ++++++
 .../src/routes/register-workflow-routes.ts         | 16 +++-
 packages/i18n/locales/en/app.json                  |  6 +-
 packages/i18n/locales/es/app.json                  |  3 -
 packages/i18n/locales/fr/app.json                  |  3 -
 packages/i18n/locales/ko/app.json                  |  3 -
 packages/i18n/locales/zh-CN/app.json               |  3 -
 packages/i18n/locales/zh-TW/app.json               |  3 -
 packages/i18n/src/resources.d.ts                   |  6 +-
 27 files changed, 543 insertions(+), 56 deletions(-)

Fusion-Task-Id: FN-6304

Fusion-Task-Lineage: 385f8ae1-494f-4e2b-a6e9-3a2d2bbe7f71
This commit is contained in:
gsxdsm
2026-06-12 17:57:19 -07:00
parent 4faeed1cda
commit bd87ce7d7e
27 changed files with 543 additions and 56 deletions

View File

@@ -5111,6 +5111,16 @@ export function fetchWorkflow(id: string, projectId?: string): Promise<import("@
return api<import("@fusion/core").WorkflowDefinition>(withProjectId(`/workflows/${encodeURIComponent(id)}`, projectId));
}
/** Fetch resolved optional step declarations for a workflow. */
export function fetchWorkflowOptionalSteps(
workflowId: string,
projectId?: string,
): Promise<import("@fusion/core").ResolvedWorkflowOptionalStep[]> {
return api<import("@fusion/core").ResolvedWorkflowOptionalStep[]>(
withProjectId(`/workflows/${encodeURIComponent(workflowId)}/optional-steps`, projectId),
);
}
/** Create a workflow definition. */
export function createWorkflow(
input: import("@fusion/core").WorkflowDefinitionInput,