FN-7383: refresh workflows after chat authoring
Chat-authored workflow changes now propagate immediately to workflow selectors and editors. - Emit workflow lifecycle SSE events when chat, planner, or room workflow tools create, update, select, configure, or delete workflows. - Force-refresh board workflow caches and the workflow editor list when workflow lifecycle events arrive. - Add cross-surface tests for chat workflow creation visibility and room/chat workflow tool event behavior. - Add a patch changeset for the published Fusion package. Files changed: .changeset/fn-7383-chat-workflow-authoring.md | 7 +++ .../workflow-selection-cross-surface.test.tsx | 23 +++++++++ packages/dashboard/app/api/legacy.ts | 9 ++-- .../app/components/WorkflowNodeEditor.tsx | 23 ++++++++- .../app/hooks/__tests__/useBoardWorkflows.test.ts | 27 +++++++--- packages/dashboard/app/hooks/useBoardWorkflows.ts | 22 +++++--- .../utils/__tests__/boardWorkflowsCache.test.ts | 12 ++++- .../dashboard/app/utils/boardWorkflowsCache.ts | 14 +++++ .../dashboard/src/__tests__/chat-manager.test.ts | 44 ++++++++++++++-- .../dashboard/src/__tests__/chat.rooms.test.ts | 44 ++++++++++++++++ packages/dashboard/src/chat.ts | 59 +++++++++++++++++++--- 11 files changed, 255 insertions(+), 29 deletions(-) Fusion-Task-Id: FN-7383 Fusion-Task-Lineage: ebe4c982-214b-402f-b829-a58ace19ffe0 Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -672,8 +672,9 @@ export function updateTaskCustomFields(
|
||||
|
||||
/** Fetch the multi-lane board metadata (U9). When the flag is OFF the server
|
||||
* returns `{ flagEnabled: false }` and the board renders its legacy form. */
|
||||
export function fetchBoardWorkflows(projectId?: string): Promise<BoardWorkflowsPayload> {
|
||||
return api<BoardWorkflowsPayload>(withProjectId("/tasks/board-workflows", projectId));
|
||||
export function fetchBoardWorkflows(projectId?: string, options?: FetchOptions): Promise<BoardWorkflowsPayload> {
|
||||
const path = withProjectId("/tasks/board-workflows", projectId);
|
||||
return dedupe(path, () => api<BoardWorkflowsPayload>(path), options);
|
||||
}
|
||||
|
||||
/** Manually promote a held card out of its hold column (U9). */
|
||||
@@ -5332,10 +5333,10 @@ export type {
|
||||
} from "@fusion/core";
|
||||
|
||||
/** List all workflow definitions for the project. */
|
||||
export function fetchWorkflows(projectId?: string, options?: { includeDisabledBuiltins?: boolean }): Promise<import("@fusion/core").WorkflowDefinition[]> {
|
||||
export function fetchWorkflows(projectId?: string, options?: { includeDisabledBuiltins?: boolean } & FetchOptions): Promise<import("@fusion/core").WorkflowDefinition[]> {
|
||||
const query = options?.includeDisabledBuiltins ? "?includeDisabledBuiltins=true" : "";
|
||||
const path = withProjectId(`/workflows${query}`, projectId);
|
||||
return dedupe(path, () => api<import("@fusion/core").WorkflowDefinition[]>(path));
|
||||
return dedupe(path, () => api<import("@fusion/core").WorkflowDefinition[]>(path), options);
|
||||
}
|
||||
|
||||
/** A trait catalog entry as returned by GET /api/traits (U10). Mirrors the
|
||||
|
||||
Reference in New Issue
Block a user