Fix remaining API route mismatches from OpenAPI migration#532
Fix remaining API route mismatches from OpenAPI migration#532
Conversation
- `/channels/inspect` → `/channels/prompt/inspect` - `/channels/inspect/capture` → `/channels/prompt/capture` - `/channels/inspect/snapshots` → `/channels/prompt/snapshots` - `/channels/inspect/snapshot` → `/channels/prompt/snapshots/get` - `/channels/cancel` → `/channels/cancel-process` - `/update/check` → `/update-check` - `/update/apply` → `/update-apply` - `/groups` → `/links/groups` - `/humans` → `/links/humans` Also adds scripts/audit-routes.sh to diff frontend vs backend routes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
WalkthroughAPI endpoint paths in the client were updated to match new backend routing conventions, including prompt inspection, process cancellation, update checks, and agent topology endpoints. Additionally, a modal dialog's width styling was adjusted from max-width constraints to explicit viewport-relative sizing. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@scripts/audit-routes.sh`:
- Around line 13-30: The extract_frontend_routes function is missing fetchJson
template-literal routes and the later presence check uses substring matching;
update extract_frontend_routes to also match fetchJson`...` backtick template
literals (in addition to fetchJson<...>("...")) and normalize those captures the
same way, and change any downstream presence test that uses grep -qF to an
exact-line match (e.g., full-line/exact-string check) so routes like
/links/groups don't falsely match /links/groups/{param}; reference
extract_frontend_routes and all grep/grep -qF usages in the script to update the
regexes and the presence-check behavior accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 02f5c379-b085-4ac0-b5db-b47db5c9904e
📒 Files selected for processing (2)
interface/src/api/client.tsscripts/audit-routes.sh
Summary
/channels/inspect/*→/channels/prompt/*/channels/cancel→/channels/cancel-process/update/check→/update-check,/update/apply→/update-apply/groups→/links/groups,/humans→/links/humansTest plan
Note
This PR consolidates 9 API route fixes across the prompt inspection, process cancellation, update management, and topology management endpoints. The new audit script extracts and compares frontend routes against backend route annotations to prevent future divergence. Changes are isolated to the frontend client and the new audit tooling—no backend route changes are included.
Written by Tembo for commit eba3c4a. This will update automatically on new commits.