feat(F-139): completed feature

This commit is contained in:
chattie
2026-08-22 13:12:54 +02:00
parent 58b3fe5fa8
commit 5748c00623
11 changed files with 149 additions and 34 deletions

View File

@@ -0,0 +1,14 @@
# F-139 — Architect (bug fix)
## Bug
Admin `/admin/logs/stream` SSE connection drops with `ERR_NETWORK_IO_SUSPENDED`.
## Root causes
1. **Proxy** (`apps/admin/src/app/api/[...path]/route.ts`): did not set `X-Accel-Buffering: no`, which causes intermediate proxies (nginx) to buffer the SSE stream and kill it.
2. **Client** (`ServerLogViewer.tsx`): `connect()` goes to `reconnecting` status on drop but never actually reconnects — no retry loop.
3. **`LogBroadcaster.stream()`**: dead code — never used by the SSE route (uses `registerClient()` instead).
## Fixes
1. Proxy: add `X-Accel-Buffering: no` header; remove explicit `Connection: keep-alive` (default for HTTP/1.1).
2. Client: add exponential backoff reconnection loop (1s → 2s → 4s … max 30s).
3. Backend SSE endpoint already correct with proper headers.