Skip to content

Commit a09d198

Browse files
coleam00claude
andcommitted
fix(web): allow workflow graph view to load without a codebase (#958)
The useQuery for workflow definitions required both workflowName and codebaseCwd to be truthy. For CLI-triggered runs or "No project" web runs where codebase_id is null, codebaseCwd stays undefined and the query never fires — showing "Loading graph..." forever. The server already handles missing cwd by falling back to bundled defaults, so the client gate only needs workflowName. Fixes #958 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 018e8b9 commit a09d198

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/web/src/components/workflows/WorkflowExecution.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,12 +235,12 @@ export function WorkflowExecution({ runId }: WorkflowExecutionProps): React.Reac
235235
}, [codebaseId]);
236236

237237
// Fetch workflow definition for DAG topology (depends_on edges).
238-
// Enabled whenever we have a workflow name and cwd — isDag is derived from the result,
239-
// not used as a gate, to avoid a circular dependency.
238+
// Only gated on workflowName — codebaseCwd is optional; the server falls back to bundled
239+
// defaults when cwd is absent (handles CLI runs and "No project" web runs).
240240
const { data: workflowDef } = useQuery({
241241
queryKey: ['workflowDefinition', initialData?.workflowName, codebaseCwd],
242242
queryFn: () => getWorkflow(initialData?.workflowName ?? '', codebaseCwd ?? undefined),
243-
enabled: !!initialData?.workflowName && !!codebaseCwd,
243+
enabled: !!initialData?.workflowName,
244244
staleTime: Infinity,
245245
});
246246
const dagDefinitionNodes = workflowDef?.workflow?.nodes ?? null;

0 commit comments

Comments
 (0)