修复:项目组分类仅补齐未分类并在完成后刷新列表

This commit is contained in:
2026-10-31 20:04:24 +08:00
parent cbe7fc17bb
commit 572873c6b8
21 changed files with 257 additions and 64 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { useCallback, useEffect, useRef, useState } from 'react';
import { api } from './api';
import { WORKSPACE_INVALIDATED } from './pageCache';
import type { DataWorkflowOperation } from './NoCodeDataTypes';
type StoredOperation = { operationId: string; startedAt: string };
@@ -39,7 +40,7 @@ export function useDataWorkflowOperation(slot: string, onComplete?: (value: Data
setOperation(current);
const status = String(current.status || '').toUpperCase();
if (status === 'COMPLETED' || status === 'FAILED') {
if (status === 'COMPLETED') { savePendingId(null); callbackRef.current?.(current); }
if (status === 'COMPLETED') { savePendingId(null); window.dispatchEvent(new Event(WORKSPACE_INVALIDATED)); callbackRef.current?.(current); }
else setError(operationError(current));
return;
}