Summary
Server-beta serves the shared viewer UI via ServerViewerRoutes but does not register the backend routes the viewer needs. The UI loads on the server-beta port but is broken:
- "Loading more..." spinner stuck permanently — the feed never resolves because the SSE
/stream endpoint and /api/observations are missing.
- Console error:
⚠ Failed to fetch logs: Not Found — the logs modal calls /api/logs, which is not registered.
Evidence
Confirmed via curl against the running server-beta on port 37877:
curl http://127.0.0.1:37877/api/logs → 404 NotFound
curl http://127.0.0.1:37877/stream → 404 NotFound
curl http://127.0.0.1:37877/api/observations → 404 NotFound
Root Cause
src/server/runtime/ServerBetaService.ts (lines ~178–212) only registers a minimal set of routes. Worker mode registers many more, including LogsRoutes, the SSE /stream endpoint, ObservationsRoutes, SummariesRoutes, etc. The viewer UI assumes those routes exist.
Affected Files
src/server/runtime/ServerBetaService.ts — route registration (the gap)
src/services/worker/http/routes/LogsRoutes.ts — reads from local log files (~/.claude-mem/logs/); should work as-is in server-beta
src/ui/viewer/components/LogsModal.tsx — frontend calling /api/logs
src/ui/viewer/components/Feed.tsx — renders the stuck "Loading more..." state
Proposed Fix
- Register
LogsRoutes in ServerBetaService.ts (fixes the logs console error).
- For the feed: register Postgres-backed observation/SSE routes if equivalents exist, OR have the viewer show a graceful "not available in server-beta mode" empty state instead of an infinite spinner.
Summary
Server-beta serves the shared viewer UI via
ServerViewerRoutesbut does not register the backend routes the viewer needs. The UI loads on the server-beta port but is broken:/streamendpoint and/api/observationsare missing.⚠ Failed to fetch logs: Not Found— the logs modal calls/api/logs, which is not registered.Evidence
Confirmed via
curlagainst the running server-beta on port 37877:Root Cause
src/server/runtime/ServerBetaService.ts(lines ~178–212) only registers a minimal set of routes. Worker mode registers many more, includingLogsRoutes, the SSE/streamendpoint,ObservationsRoutes,SummariesRoutes, etc. The viewer UI assumes those routes exist.Affected Files
src/server/runtime/ServerBetaService.ts— route registration (the gap)src/services/worker/http/routes/LogsRoutes.ts— reads from local log files (~/.claude-mem/logs/); should work as-is in server-betasrc/ui/viewer/components/LogsModal.tsx— frontend calling/api/logssrc/ui/viewer/components/Feed.tsx— renders the stuck "Loading more..." stateProposed Fix
LogsRoutesinServerBetaService.ts(fixes the logs console error).