Bug
When viewing a workflow execution in the Web UI, the Graph tab shows "Loading graph..." indefinitely for any workflow run that has no associated project (codebase_id = null).
This affects:
- CLI-triggered workflow runs
- Web UI runs where "No project" was selected
- Any run where the codebase auto-registration failed
Root Cause
WorkflowExecution.tsx:240-245 - the workflowDef TanStack Query has an enabled gate that requires both workflowName AND codebaseCwd to be truthy:
```typescript
enabled: !!initialData?.workflowName && !!codebaseCwd,
```
When codebase_id is null on the run, codebaseCwd is never populated (it depends on fetching the codebase record), so the query never fires.
The server-side GET /api/workflows/:name route already handles missing cwd - it falls back to the first registered codebase, then to bundled defaults. The client just never lets the query fire.
Fix
Remove the !!codebaseCwd requirement from the enabled gate. Pass codebaseCwd ?? undefined to the query function (which it already does). The server fallback handles the rest.
Files
packages/web/src/components/workflows/WorkflowExecution.tsx - line 243 (enabled gate)
packages/server/src/routes/api.ts - lines 2082-2084 (server-side cwd fallback, already works)
Bug
When viewing a workflow execution in the Web UI, the Graph tab shows "Loading graph..." indefinitely for any workflow run that has no associated project (
codebase_id = null).This affects:
Root Cause
WorkflowExecution.tsx:240-245- theworkflowDefTanStack Query has anenabledgate that requires bothworkflowNameANDcodebaseCwdto be truthy:```typescript
enabled: !!initialData?.workflowName && !!codebaseCwd,
```
When
codebase_idis null on the run,codebaseCwdis never populated (it depends on fetching the codebase record), so the query never fires.The server-side
GET /api/workflows/:nameroute already handles missingcwd- it falls back to the first registered codebase, then to bundled defaults. The client just never lets the query fire.Fix
Remove the
!!codebaseCwdrequirement from the enabled gate. PasscodebaseCwd ?? undefinedto the query function (which it already does). The server fallback handles the rest.Files
packages/web/src/components/workflows/WorkflowExecution.tsx- line 243 (enabled gate)packages/server/src/routes/api.ts- lines 2082-2084 (server-side cwd fallback, already works)