veza/apps/web/src
senke 698859cc52 feat(backend,web): surface RTMP ingest health on the Go Live page
Fifth item of the v1.0.6 backlog. "Go Live" was silent when the
nginx-rtmp profile wasn't up — an artist could copy the RTMP URL +
stream key, fire up OBS, hit "Start Streaming" and broadcast into the
void with no in-UI signal that the ingest wasn't listening. The audit
flagged this 🟡 ("livestream sans feedback UI si nginx-rtmp down").

Backend (`GET /api/v1/live/health`)
  * `LiveHealthHandler` TCP-dials `NGINX_RTMP_ADDR` (default
    `localhost:1935`) with a 2s timeout. Reports `rtmp_reachable`,
    `rtmp_addr`, a UI-safe `error` string (no raw dial target in the
    body — avoids leaking internal hostnames to the browser), and
    `last_check_at`.
  * 15s TTL cache protected by a mutex so a burst of page loads can't
    hammer the ingest. First call dials; subsequent calls within TTL
    serve the cached verdict.
  * Response ships `Cache-Control: private, max-age=15` so browsers
    piggy-back the same quarter-minute window.
  * When the dial fails the handler emits a WARN log so an operator
    watching backend logs sees the outage before a user does.
  * Public endpoint — no auth. The "RTMP is up / down" signal has no
    sensitive payload and is useful pre-login too.

Frontend
  * `useLiveHealth()` hook: react-query with 15s stale time, 1 retry,
    then falls back to an optimistic `{ rtmpReachable: true }` — we'd
    rather miss a banner than flash a false negative during a transient
    blip on the health endpoint itself.
  * `LiveRtmpHealthBanner`: amber, non-blocking banner with a Retry
    button that invalidates the health query. Copy explicitly tells the
    artist their stream key is still valid but broadcasting now won't
    reach anyone.
  * `GoLivePage` wraps `GoLiveView` in a vertical stack with the banner
    above — the view itself stays unchanged (the key + instructions
    remain readable even when the ingest is down).

Tests
  * 3 Go tests: live listener reports reachable + Cache-Control header;
    dead address reports unreachable + UI-safe error (asserts no
    `127.0.0.1` leak); TTL cache survives listener teardown within
    window.
  * 3 Vitest tests: banner renders nothing when reachable; banner
    visible + Retry enabled when unreachable; Retry invalidates the
    right query key.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-16 23:52:36 +02:00
..
__tests__ chore(refactor/sumi-migration): commit pending changes — tests, stream server, dist_verification 2026-02-13 19:39:18 +01:00
app chore: apply pre-commit hook formatting and cleanup 2026-04-01 01:40:54 +02:00
components fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
config fix(backend,web): restore audio playback via /stream fallback 2026-04-16 14:52:26 +02:00
context chore: consolidate CI, E2E, backend and frontend updates 2026-02-17 16:43:21 +01:00
docs refactor(frontend): document chat store as single source of truth 2026-02-15 16:02:14 +01:00
features feat(backend,web): surface RTMP ingest health on the Go Live page 2026-04-16 23:52:36 +02:00
hooks fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
lib fix(a11y): fix heading hierarchy h1→h3 gaps on 8 pages 2026-03-25 10:14:18 +01:00
locales feat(ui): add SUMI design system components, seasonal hooks, and i18n updates 2026-03-31 19:15:54 +02:00
mocks fix(backend,web): restore audio playback via /stream fallback 2026-04-16 14:52:26 +02:00
providers refactor(frontend): simplify TokenStorage usage for httpOnly cookie auth 2026-02-15 16:04:42 +01:00
router fix(security): protect admin routes with role check 2026-04-05 16:19:16 +02:00
schemas fix(a11y): fix heading hierarchy h1→h3 gaps on 8 pages 2026-03-25 10:14:18 +01:00
services fix(backend,web): restore audio playback via /stream fallback 2026-04-16 14:52:26 +02:00
stores feat(v0.12.7): internationalisation i18n — FR/EN/ES avec formatage locale 2026-03-12 14:29:22 +01:00
stories fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
styles docs: update Welcome.mdx and deprecate Kodo references in docs 2026-02-17 17:05:33 +01:00
test fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
types chore(cleanup): J5 — defer GeoIP, rename v2-v3-types, document Storybook kill 2026-04-15 12:43:57 +02:00
utils fix(a11y): fix heading hierarchy h1→h3 gaps on 8 pages 2026-03-25 10:14:18 +01:00
index.css fix: stabilize builds, tests, and lint across all stacks 2026-04-05 16:48:07 +02:00
main.tsx chore(web): remove console.log in prod, address TODO/FIXME for v0.101 2026-02-19 19:01:42 +01:00
setupTests.ts refonte: backend-api go first; phase 1 2025-12-12 21:34:34 -05:00
vite-env.d.ts fix: stabilize frontend — 98 TS errors to 0, align API endpoints, optimize bundle 2026-03-24 21:18:49 +01:00