You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
frontend: one client per backend concern — 5 chat-session clients, 7 health probes, 2 cross-GUI SLM clients #18723
Part of #18717 (API surface dedup), on the frontend side, and of M07 (GUI convergence). This came from an external API-duplication report that the coordinator verified on origin/main 0196c7c. I re-checked group 2 below.
1. Five clients for chat sessions
autobot-frontend/src/stores/useChatStore.ts, utils/ApiClient.ts, services/api.ts, composables/useSessionSync.ts, and the SDK's libs/autobot-sdk-ts client each call the chat-session endpoints themselves. Not re-measured here.
2. Seven separate health probes (re-checked on origin/main)
Each of these files references the health endpoint on its own (reference counts in brackets):
composables/useNetworkStatus.ts (1);
composables/useConnectionTester.ts (3);
services/GlobalWebSocketService.ts (2);
services/BatchApiService.ts (4);
composables/systemStatusServices.ts (5);
utils/HealthMonitor.js (1);
composables/useProbeBackedHealth.ts (5).
That is seven pollers with seven sets of intervals, timeouts and verdicts, for one fact.
3. Cross-GUI SLM clients in the main app
composables/useTLSCredentials.ts and composables/useHostInventory.ts call the SLM control plane, duplicating the SLM's useSlmApi. #12614 (closed) covered SLM-control-plane calls in the main app; these two remain.
The fix: one owner per concern
Chat sessions: one client. The SDK client, or ApiClient plus one session composable. The store and the views use it.
Health: one probe service, owning interval, timeout and verdict vocabulary; the others subscribe to it. useProbeBackedHealth is the natural owner. This follows the measurement rule: a failed probe is "unknown", never "down".
Activity