mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-09-30 12:39:42 +02:00
The --drop:console esbuild flag was silently stripping all diagnostic console.* calls from production builds, making crash investigation impossible. Remove it temporarily for debugging. Add server-side crash breadcrumb collection: - Frontend writes breadcrumbs to localStorage AND POSTs to /api/crash-diag - Server stores latest breadcrumbs in memory, readable via GET /api/crash-diag - Granular breadcrumbs in selectSession: CACHE_WRITE, FETCH_START, FETCH_DONE, REWRITE, FOCUS, SELECT_DONE - 2s heartbeat beacon so breadcrumbs survive tab freezes - text/plain content-type parser for navigator.sendBeacon compatibility Initial findings from breadcrumbs: - Crash happens during selectSession() for sessions with large buffers - Pattern: cached buffer exists from prior visit + live SSE data arriving - Backend is always stable (0 crashes); this is a pure frontend issue Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>