Files
Stirling-PDF/frontend/editor
posthog-eu[bot]andGitHub a835e68ac2 Recover from PDF engine load failures instead of spinning forever
The viewer gated on `isLoading || !engine || !pdfUrl` and only rendered an
error when the `usePdfiumEngine` hook rejected. When the WASM engine load
hung (never resolving or rejecting), the center pane stayed on
"Loading PDF Engine..." indefinitely with no error and no way to recover, so
no selected/dropped PDF ever rendered for the whole session.

- Add `PdfEngineBoundary`, which owns the engine load, times it out, and
  surfaces an error state with a Retry button (nudging the user to update the
  app) instead of an infinite spinner. Retry remounts the boundary so the
  load re-runs from scratch.
- Harden `wasmPrecompiler` to fall back to fetch + `arrayBuffer()` +
  `WebAssembly.compile` when `compileStreaming` is unavailable or fails
  (e.g. wrong MIME type / content-encoding under the `tauri://` protocol).
- Add component tests reproducing the hang → error + retry transition.

Generated-By: PostHog Code
Task-Id: 3aa5a9d0-e661-4860-8e51-4610b2599780
2026-07-15 11:17:55 +00:00
..
2026-07-11 12:48:53 +01:00