chore(ST-806): cleanup debug-pages, document realtime, restore strict mode

M8 acceptance heeft de end-to-end pipeline bevestigd: trigger → NOTIFY →
SSE → store → View Transition. De cycling-symptomen waren een artefact
van testen via terminal (alt-tab triggert visibility-pause-by-design),
geen bug. Tijd om de tijdelijke instrumentatie en debug-pagina's weg te
halen en de architectuur op te schrijven.

- Verwijder /debug-realtime, /(app)/debug-realtime-app, /api/debug/*
- Strip debug-logs uit /api/realtime/solo (closed-reden alleen in dev)
- reactStrictMode weer aan
- CONNECTING_INDICATOR_DELAY_MS 2s → 4s (minder flikker bij micro-disconnects)
- Nieuwe sectie "Realtime updates (M8)" in scrum4me-architecture.md:
  diagram, NOTIFY-bron, server-filter, connection lifecycle inclusief
  visibility-pause + bekende beperking, animatie, auth
- DIRECT_URL env-rij uitgebreid met realtime-doel
- GET /api/realtime/solo gedocumenteerd in API.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-27 13:53:07 +02:00
parent 7e4b6a20fa
commit cefd54e56d
12 changed files with 125 additions and 899 deletions

View file

@ -24,7 +24,7 @@ import type { RealtimeEvent, RealtimeStatus } from '@/stores/solo-store'
const BACKOFF_START_MS = 1_000
const BACKOFF_MAX_MS = 30_000
const CONNECTING_INDICATOR_DELAY_MS = 2_000
const CONNECTING_INDICATOR_DELAY_MS = 4_000
export function useSoloRealtime(productId: string | null) {
const sourceRef = useRef<EventSource | null>(null)
@ -61,7 +61,7 @@ export function useSoloRealtime(productId: string | null) {
if (next === 'open') {
setStatus('open', false)
} else {
// Status meteen bijwerken, indicator pas na 2s — voorkomt flikker
// Status meteen bijwerken, indicator pas na 4s — voorkomt flikker
// bij microscopische disconnects.
setStatus(next, false)
indicatorTimerRef.current = setTimeout(() => {