pcbjam/web/standalone
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gergő Törcsvári 0d2f88b437
feat(standalone): OOM tab recovery (0002)
Automatically recover from an out-of-memory by respawning a fresh browsing
context (fresh wasm heap) and discarding the dead one — the manual "duplicate
tab, close the OOM'd one" fix, automated and capped at 2 retries so a too-small
machine stops instead of looping.

- recovery/oom-watch.ts: the recover() state machine with the retry counter in
  the URL (?oomRetry=N, cap 2). Mode A soft detection — Module.onAbort plus
  window error/unhandledrejection matched against an OOM signature, behind an
  idempotent latch. Mode B hard-kill detection — a per-tab localStorage
  heartbeat sentinel; a stale sentinel on the next load continues the retry
  chain (heartbeat keys avoid mistaking a second live tab for a crash). Healthy
  session (alive HEALTHY_RESET_MS) resets the chain. Default strategy is
  location.replace; window.open+close is behind ?oomStrategy=newtab. Platform
  access goes through injectable win/storage seams for testability.
- recovery/MemoryExhaustedDialog.tsx: terminal "out of memory" UI, reusing
  0001's BlockingDialog; copy is honest about lost unsaved edits.
- wasm/boot.ts: forward emscripten Module.onAbort to the watcher (optional
  BootOptions.onAbort).
- WasmTool: install the watcher, gate boot on its proceed flag (skip when the
  chain is already exhausted), and render the terminal dialog.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-12 14:05:39 +02:00
..
scripts refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
src feat(standalone): OOM tab recovery (0002) 2026-06-12 14:05:39 +02:00
.env.example refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
index.html refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
package.json feat(standalone): env-selected Yjs provider abstraction (ysync 0004) 2026-06-10 14:37:30 +02:00
postcss.config.js refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
tailwind.config.js refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
tsconfig.json refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00
vite.config.ts refactor(web): split into GPL standalone editor + thin reference backend 2026-06-09 12:35:46 +02:00