3248607790
Backend polls each registered service's /health endpoint every 30 s via a background asyncio task. GET /api/services exposes the live status snapshot. The Apps page now renders from this endpoint — showing "Unavailable" (dimmed, non-clickable) when a service is registered but its container is unreachable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
2026-04-17 — Service health checks and dynamic Apps page
Timestamp: 2026-04-17T00:00:00Z
Summary
Added a background health-check system to the backend that polls each registered feature service every 30 seconds. The Apps page now renders dynamically based on live service status — showing "Unavailable" when a service is registered but its container is unreachable.
Files Added / Modified / Deleted
Added
backend/app/services/__init__.py— package initbackend/app/services/service_health.py— service registry, background polling loop (POLL_INTERVAL=30s),get_all_statuses()read APIbackend/app/routers/services.py—GET /api/servicesendpoint (requires auth)
Modified
backend/app/core/config.py— addedDOC_SERVICE_URLsetting (defaulthttp://doc-service:8001)backend/app/main.py— added FastAPIlifespancontext manager: registers services, runs initial health check, starts background polling loop; mounts/api/servicesrouterfrontend/src/api/client.ts— addedServiceStatusinterface andgetServices()API functionfrontend/src/pages/AppsPage.tsx— replaced hardcodedAPPSarray with dynamic query toGET /api/services; adds "Unavailable" state with dimmed card and explanation textbackend/STATUS.md— documented/api/servicesendpoint and health-check architecturefrontend/STATUS.md— documented dynamic Apps page behaviour