Repository navigation
frontend: 77 dead UI calls hit non-existent backend routes (browser automation, dev-speedup, code-intelligence, knowledge_base) — audit_api_wiring.py reports 0 because it can't see getApiBase() paths #12326
Description
Activity
Verified all 77 against the authoritative route table (
app.openapi()= 2155 HTTP + 25 WS routes) in PR #12376. The premise was partly mis-diagnosed — the split is:- 12 genuinely-dead-and-fixable (drifted paths) -> fixed in fix(frontend): repoint drifted dead API paths + teach audit to see getApiBase() (#12326) #12376 (batch templates/schedules, KB fact update/delete + reindex + health, research, updates-check).
- ~26 false positives (not fixed, evidence in PR): base-URL constants and cache-key maps, a
.includes('/auth/')string op, live routes the audit's normaliser mis-collapsed (system-docs/*,verification/{id}/approve|reject,connectors/oauth/{provider}/authorize,advanced-control/takeover/*,agent-terminal/tasks/{id}/steer,user-management/users/{id}/activate|deactivate), the live/wswebsocket, and 5tls/nodescalls that target the SLM backend (slmFetch/getSLMUrl()) — the audit only inspected the autobot backend, so these were never dead. - 9 deferred to analytics root cause: Codebase Analytics runs on two non-shared data mechanisms (indexed store vs live filesystem walk) — explains empty panels, cross-project leak (#12330), and 10-279s latency (#12341) as one problem #12364 (analytics/code-intelligence redesign):
code-intelligence/*,analytics/bug-prediction,cost/by-agent. - Remainder flagged for an owner build-vs-remove decision (no backend,
aspirational/futurecomments — kept, not deleted): browser-automation panel (9), dev-speedup panel (8), system restart/shutdown/backup (6), batch schedule PATCH toggle (no backend route),multimodal/health,service-monitor/resources,knowledge/verification/approve, KBcategory/{id}+documents/{id}(+/similar), transcriber progress SSE.
Audit blind spot fixed (the issue's highest-value item):
scripts/audit_api_wiring.pynow resolves${getApiBase()}->/api. Frontend paths it can see went 208 -> 691; unwired findings 0 -> 44. Known remaining limitation: it still inspects only the autobot backend, so SLM-served calls (tls/nodes) show as unwired — SLM-backend awareness is a sensible follow-up before gating CI with--fail-on-unwired.Leaving this open (Refs, not Closes) until the deferred/flagged buckets are dispositioned.
- added 7 commits that reference this issue
on Jul 24, 2026 Status split: the highest-value half — the api-wiring audit gate being blind to
getApiBase()/backend-URL idioms — is already fixed:scripts/audit_api_wiring.py:84(GETAPIBASE_CALL_RE) and:91(BACKEND_URL_CALL_RE) now resolve those idioms (comments cite this issue). The remaining 77 dead UI calls persist and are heterogeneous (prefix/name mismatches vs genuinely-absent routes vs research_browser/dev-speedup routers) — each group is a per-feature product decision (rewire-to-existing / build-backend / remove-UI), tracked alongside #12378. Keeping open for that half.- addedarea: api-contractWave 2 · cluster C — Frontend↔backend API contractWave 2 · cluster C — Frontend↔backend API contract
on Sep 1, 2026 Re-measured today against the running instance after the owner reported dead buttons in codebase analytics and elsewhere. The issue holds. Five things to add, one of which is a working model for the fix that exists in this repo already.
I filed #17611 before finding this issue — my search was for "route reachability" and missed "dead UI calls". Closing that as a duplicate; its content is below.
Current count: 45, not 77
Production call sites only (excluding
*.test.ts,*.spec.ts,*.stories.tsandsrc/test/), matched against the liveopenapi.jsonwith${...}and{...}normalised:File Unserved paths composables/useDevSpeedup.ts8 models/repositories/SystemRepository.ts6 composables/useBrowserAutomation.ts5 composables/useCodeIntelligence.ts5 composables/useTLSCredentials.ts3 23 further files 1–2 each I have not established why this differs from 77 — it may be calls fixed since, a stricter exclusion of test files, or a normalisation difference. The two numbers should be reconciled before either is used for progress tracking.
The routers are healthy — this is not load failure
/api/health/feature-routersreports 122 loaded, 0 failed. The mount exists; the specific path does not.Prefix Served live Called by the frontend /api/code-intelligence37 routes quality-score,trends,history,compare,batch-analyze— none served/api/dev-speedup12 format,lint-fix,boilerplate— none served/api/browser19, all under /mcp/launch,close,execute,type,automation/run— none served/api/tls0 three calls /api/tlsserving zero routes is a different shape from the others — the router is absent entirely rather than the path renamed. Worth separating when this is triaged.The discriminator that makes triage cheap
FastAPI matches the route before the auth gate, so on an unauthenticated probe:
- 404 — no such route. Dead.
- 401 — the route exists and auth fired. Wired correctly.
That separates "never built" from "needs a session" without credentials.
It is also how I established WorkflowBuilder is not in this set, though the owner named it:
useWorkflowBuilder.tscalls seven/api/orchestrator/*paths and all seven return 401. Whatever fails there is not a missing route.The fix already exists — for the other GUI
repo_tests/slm_frontend_calls_reach_served_routes_test.pyasserts exactly this property forautobot-slm-frontend, and its docstring calls itself the fifth instance of the class: #15198, #15199, #15230, #15236, #15533. Its words:The button works, the modal opens, the request 404s, and the caller swallows it.
It scans
autobot-slm-frontend/srconly. There is no equivalent forautobot-frontend/src— this issue is the sixth instance of a class already guarded in the sibling package. The remedy is to model that guard rather than to repairaudit_api_wiring.py, and the SLM one documents why the OpenAPI contract alone is insufficient: FastAPI omits@router.websockethandlers fromopenapi.json, so the served set must be the contract unioned with WebSocket routes parsed from the backend.The generated contract is a usable oracle
autobot-frontend/src/types/generated/api.tsholds 2,215 paths; the live app serves 2,219; zero contract paths are absent live. It is a faithful subset, so a guard can use it without a running backend.I checked this because I had assumed the opposite — that the contract was stale — after seeing
code-intelligenceregistered infeature_routers.pywhile its called paths 404'd. Registration of a prefix is not service of a path, and the contract was right.
Summary
77 distinct frontend API calls hit paths no backend route serves. Every one is a UI control that renders normally and fails when used — dead buttons and panels that error, across 30 frontend files.
Each was verified live against the running deployment: 404 on both GET and POST. False positives from path normalisation (query-string artifacts, trailing-slash redirects) were tested and excluded — 14 candidates were dropped this way.
The repo's own audit gate cannot see any of this
scripts/audit_api_wiring.pyreports a clean bill:Zero findings — while 77 calls are broken. The script matches literal
/api/...strings, but the dominant idiom in this codebase composes the path from a helper:Counting distinct occurrences in
autobot-frontend/src:'/api/...'`${getApiBase()}/...``${getBackendUrl()}/...`So the gate inspects roughly 42% of calls and is blind to the majority. This is the highest-value fix in this issue — without it, every finding below can silently regress.
Confirmed dead paths, grouped by feature
/knowledge_base— 11 dead/knowledge_base/category/{p}composables/knowledge/useKnowledgeCategories.ts:130/knowledge_base/connectors/oauth/{p}models/repositories/KnowledgeRepository.ts:704/knowledge_base/documents/{p}models/repositories/KnowledgeRepository.ts:450/knowledge_base/documents/{p}/similarmodels/repositories/KnowledgeRepository.ts:489/knowledge_base/facts/{p}models/repositories/KnowledgeRepository.ts:459models/repositories/KnowledgeRepository.ts:468/knowledge_base/healthmodels/repositories/KnowledgeRepository.ts:537/knowledge_base/suggestionsmodels/repositories/KnowledgeRepository.ts:515/knowledge_base/system-docs/categoriescomposables/knowledge/useKnowledgeSystemDocs.ts:66/knowledge_base/system-docs/category/{p}composables/knowledge/useKnowledgeSystemDocs.ts:73/knowledge_base/system-docs/{p}composables/knowledge/useKnowledgeSystemDocs.ts:81/knowledge_base/verification/{p}models/repositories/KnowledgeRepository.ts:586models/repositories/KnowledgeRepository.ts:601/browser— 9 dead/browser/automation/runcomposables/useBrowserAutomation.ts:310/browser/clickcomposables/useBrowserAutomation.ts:253/browser/closecomposables/useBrowserAutomation.ts:183/browser/executecomposables/useBrowserAutomation.ts:296/browser/launchcomposables/useBrowserAutomation.ts:167/browser/navigatecomposables/useBrowserAutomation.ts:238/browser/screenshotcomposables/useBrowserAutomation.ts:281/browser/session/{p}composables/useBrowserAutomation.ts:223composables/useBrowserAutomation.ts:324/browser/typecomposables/useBrowserAutomation.ts:267/dev-speedup— 8 dead/dev-speedup/boilerplatecomposables/useDevSpeedup.ts:162/dev-speedup/formatcomposables/useDevSpeedup.ts:209/dev-speedup/lint-fixcomposables/useDevSpeedup.ts:225/dev-speedup/optimizecomposables/useDevSpeedup.ts:193/dev-speedup/quick-searchcomposables/useDevSpeedup.ts:98/dev-speedup/refactor-suggestcomposables/useDevSpeedup.ts:147/dev-speedup/snippet-generatecomposables/useDevSpeedup.ts:113/dev-speedup/test-generatecomposables/useDevSpeedup.ts:178/system— 8 dead/system/backup/createmodels/repositories/SystemRepository.ts:353/system/backup/listmodels/repositories/SystemRepository.ts:358/system/backup/restore/{p}models/repositories/SystemRepository.ts:363/system/backup/{p}models/repositories/SystemRepository.ts:368/system/health/probescomposables/useHealthProbeRegistry.ts:49/system/restartmodels/repositories/SystemRepository.ts:270/system/shutdownmodels/repositories/SystemRepository.ts:276/system/updates/checkmodels/repositories/SystemRepository.ts:387/code-intelligence— 6 dead/code-intelligence/analysis/{p}composables/useCodeIntelligence.ts:194composables/useCodeIntelligence.ts:324/code-intelligence/batch-analyzecomposables/useCodeIntelligence.ts:341/code-intelligence/comparecomposables/useCodeIntelligence.ts:293/code-intelligence/historycomposables/useCodeIntelligence.ts:309/code-intelligence/quality-scorecomposables/useCodeIntelligence.ts:211/code-intelligence/trendscomposables/useCodeIntelligence.ts:278/api— 3 dead/api/heartbeatcomponents/agents/HeartbeatPanel.vue:314/api/transcriber/recordings/{p}/progresscomposables/transcriber/useSseProgress.ts:17/api/user-management/users/{p}/{p}views/AdminUsersView.vue:438/tls— 3 dead/tls/credentials/{p}composables/useTLSCredentials.ts:273composables/useTLSCredentials.ts:301/tls/endpointscomposables/useTLSCredentials.ts:342/tls/expiringcomposables/useTLSCredentials.ts:361/advanced-control— 2 dead/advanced-control/takeover/sessions/{p}utils/AdvancedControlApiClient.ts:332utils/AdvancedControlApiClient.ts:345/advanced-control/takeover/{p}utils/AdvancedControlApiClient.ts:318/batch-schedules— 2 dead/batch-schedulescomposables/useBatchProcessing.ts:142composables/useBatchProcessing.ts:152/batch-schedules/{p}composables/useBatchProcessing.ts:162composables/useBatchProcessing.ts:172/batch-templates— 2 dead/batch-templatescomposables/useBatchProcessing.ts:112composables/useBatchProcessing.ts:122/batch-templates/{p}composables/useBatchProcessing.ts:132/cost— 2 dead/cost/by-agentcomponents/analytics/AgentCostPanel.vue:195/cost/by-agent/{p}/budgetcomponents/analytics/AgentCostPanel.vue:222/knowledge— 2 dead/knowledge/searchcomposables/useApi.ts:336/knowledge/verification/approvecomponents/knowledge/KnowledgeResearchPanel.vue:318/nodes— 2 dead/nodescomposables/useTLSCredentials.ts:196/nodes/{p}/tls-credentialscomposables/useTLSCredentials.ts:221composables/useTLSCredentials.ts:245/agent-terminal— 1 dead/agent-terminal/tasks/{p}services/LiveEventService.ts:315/analytics— 1 dead/analytics/bug-predictioncomposables/analytics/useBugPrediction.ts:31/auth— 1 dead/authutils/ApiClient.ts:354/batch-jobs— 1 dead/batch-jobs/{p}/cancelcomposables/useBatchProcessing.ts:92/conversation-files— 1 dead/conversation-files/conversation/{p}composables/useConversationFiles.ts:112/errors— 1 dead/errorscomposables/useErrorMonitoring.ts:192/knowledge-graph— 1 dead/knowledge-graphcomposables/useKnowledgeGraph.ts:145/multimodal— 1 dead/multimodal/healthutils/VisionMultimodalApiClient.ts:493/playwright— 1 dead/playwrightcomponents/desktop/PopoutChromiumBrowser.vue:527/rebuild_index— 1 dead/rebuild_indexmodels/repositories/KnowledgeRepository.ts:529/research— 1 dead/research/comprehensiveservices/api.ts:144/sandbox— 1 dead/sandbox/filescomposables/useFileSandbox.ts:57/service-monitor— 1 dead/service-monitor/resourcesmodels/repositories/SystemRepository.ts:346services/api.ts:263/user— 1 dead/user/profileservices/CacheService.ts:49/vision— 1 dead/visioncomposables/useVisionAutomation.ts:56/ws— 1 dead/wsservices/GlobalWebSocketService.ts:146services/GlobalWebSocketService.ts:153/{p}— 1 dead/{p}services/CacheService.ts:107Notable clusters
/browser(9 dead) — the entire browser-automation control surface (launch,navigate,click,type,screenshot,execute,close,automation/run,session/{id}) is unwired. The backend does implement browser control, but only under/api/browser/mcp/*(19 routes, for agent/MCP consumption). There is no HTTP surface behind the human UI at all, souseBrowserAutomation.tsis dead end to end./dev-speedup(8 dead) —format,lint-fix,optimize,refactor-suggest,test-generate,snippet-generate,boilerplate,quick-search. The backend has 12/api/dev-speedup/*routes, none of which are these — the panel and the API were built to different lists./code-intelligence(6 dead) —quality-score,trends,history,compare,batch-analyze,analysis/{id}, against 37 existing/api/code-intelligence/*routes. Same pattern: a real, well-populated backend, and a frontend calling names that were never part of it./knowledge_base(11 dead) — includeshealth,suggestions,documents/{id},facts/{id}, and the wholesystem-docs/*family. Note/api/knowledge_base/facts/by_categorydoes work, so this is not a mounting problem — individual paths drifted.Recommendation
getApiBase()/getBackendUrl()template prefixes, then run it in CI with--fail-on-unwired. Everything else here is a consequence of that gap.src/types/generated/api.ts— the generated contract already holds the correct paths for much of this.Method
Live spec: 2150 routes from the running deployment. Frontend:
autobot-frontend/srcatDev_new_gui.Impact
High. Whole panels error on use — browser automation, dev-speedup, code-intelligence quality/trends, batch templates and schedules, TLS credentials, cost-by-agent, and the Knowledge System Docs page. The audit that exists to prevent exactly this reports clean.
Environment
install.shdeploy at/opt/autobot; deployed tree matchesorigin/Dev_new_gui.