Conversation
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>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workflow definition fetching in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Comprehensive PR ReviewPR: #959 — fix(web): allow workflow graph view to load without a codebase SummaryThis is a clean, minimal one-line bug fix. Removing Verdict: ✅
🟡 Medium Issue — Comment wording (optional fix)Location: The updated comment says the server "falls back to bundled defaults when cwd is absent" — but the actual server behavior has an intermediate step: it first tries the first registered codebase's Current: // Only gated on workflowName — codebaseCwd is optional; the server falls back to bundled
// defaults when cwd is absent (handles CLI runs and "No project" web runs).Suggested: // Only gated on workflowName — codebaseCwd is optional; when absent the server tries the
// first registered codebase before falling back to bundled defaults (handles CLI runs and
// "No project" web runs).Server reference: This is purely a wording improvement — the logic is correct. Fix or skip as you prefer. 🟢 Low Issues (informational)View 3 low-priority observations
✅ What's Good
Next Steps
Reviewed by Archon comprehensive-pr-review workflow |
Update inline comment to accurately describe the two-step server fallback: when cwd is absent the server first tries the first registered codebase before falling back to bundled defaults. The previous comment skipped the intermediate step, which could confuse developers debugging unexpected workflow resolution for "No project" runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Self-Fix ReportCommit: 688aeea — pushed to `dev` Applied FixMEDIUM — Comment Oversimplifies Server Fallback Chain The inline comment described the server fallback as going directly to bundled defaults when `cwd` is absent, skipping the intermediate step where the server first tries the first registered codebase's `default_cwd`. Updated to accurately describe the two-step chain: Before: After: Accepted As-Is
ValidationAll checks passed: |
…-pr-number-extraction fix: extract PR number from URL path, not first digits in message
…-pr-number-extraction fix: extract PR number from URL path, not first digits in message
…m00#959) * fix(web): allow workflow graph view to load without a codebase (coleam00#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 coleam00#958 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(web): clarify server fallback chain comment for absent codebaseCwd Update inline comment to accurately describe the two-step server fallback: when cwd is absent the server first tries the first registered codebase before falling back to bundled defaults. The previous comment skipped the intermediate step, which could confuse developers debugging unexpected workflow resolution for "No project" runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…-pr-number-extraction fix: extract PR number from URL path, not first digits in message
…m00#959) * fix(web): allow workflow graph view to load without a codebase (coleam00#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 coleam00#958 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(web): clarify server fallback chain comment for absent codebaseCwd Update inline comment to accurately describe the two-step server fallback: when cwd is absent the server first tries the first registered codebase before falling back to bundled defaults. The previous comment skipped the intermediate step, which could confuse developers debugging unexpected workflow resolution for "No project" runs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
codebase_id = null).codebase_id = null, making the Graph tab permanently unusable for a significant portion of workflow runs.&& !!codebaseCwdfrom theuseQueryenabledgate inWorkflowExecution.tsx. The server already falls back to bundled defaults whencwdis absent — the client now trusts that fallback.GET /api/workflows/:name),getWorkflowAPI client, all other queries inWorkflowExecution.tsx.UX Journey
Before
After
Architecture Diagram
Before
After
Connection inventory:
WorkflowExecution.tsxGET /api/workflows/:namecwdquery param now optional instead of requiredGET /api/workflows/:nameLabel Snapshot
risk: lowsize: XSwebweb:workflow-executionChange Metadata
bugwebLinked Issue
Validation Evidence (required)
bun run build:web) has a pre-existing Windows/Bun path resolution issue withmdast-util-gfmunrelated to this change; it is not part of the CI pipeline.Security Impact (required)
Compatibility / Migration
cwdparam; we're just allowing the client to omit it.Human Verification (required)
enabledgate change and thatgetWorkflowalready acceptscwdas optional. Server route confirmed to have fallback logic.workflowNamestill guards against firing when name is unknown. Server 404 for unknown names results in an error state rather than infinite loading.Side Effects / Blast Radius (required)
WorkflowExecution.tsxonly.codebaseCwdis still passed as before — no change in behavior. For no-project runs, the server falls back to the first registered codebase then bundled defaults; the returned definition may not match a project-specific override, but this is a strict improvement over infinite loading.Rollback Plan (required)
WorkflowExecution.tsx— restore&& !!codebaseCwdto theenabledgate.Risks and Mitigations
cwdis absent (falls back to first registered codebase instead of the run's project).cwdto use anyway — any result is better than infinite loading.Summary by CodeRabbit
Release Notes