openreader/tests/unit
Richard R fe59685454 feat(worker): add granular PDF progress reporting and abort error handling
Introduce per-page progress events for PDF parsing by adding onPageStarted
hooks throughout the compute worker and core PDF pipeline. Add
compute/worker/src/pdf-progress.ts to encapsulate progress event builders.
Update server logic to emit page start and page parsed events, improving
client feedback during long-running PDF jobs.

Add src/lib/server/compute/abort-like-error.ts and integrate isAbortLikeError
to robustly detect and suppress expected aborts in API event streaming.
Update API route to ignore abort-like errors on worker proxy crash.

Add unit tests for abort-like error detection and PDF progress event
generation. Refactor PDF parse logic to allow empty merged regions without
throwing, ensuring downstream flows remain resilient to edge cases.

These changes improve observability, error handling, and reliability for
document parsing and event streaming.
2026-05-29 20:13:59 -06:00
..
admin-providers-validation.spec.ts refactor(tts,config,admin): update provider resolution logic and ordering for consistency 2026-05-13 12:08:39 -06:00
admin-tts-instructions.spec.ts feat(admin,config,ui,db): introduce runtime-editable site config and admin-managed TTS providers 2026-05-12 22:39:24 -06:00
audiobook-scope.spec.ts feat: Refactor server-side document, audiobook, and authentication logic, introduce new client-side APIs and caching, and update related tests. 2026-02-17 19:30:12 -07:00
audiobook-settings.spec.ts feat(audiobook): integrate settings coercion utility and migrate metadata handling 2026-05-14 11:34:16 -06:00
audiobook.spec.ts feat: Refactor server-side document, audiobook, and authentication logic, introduce new client-side APIs and caching, and update related tests. 2026-02-17 19:30:12 -07:00
audiobooks-blobstore.spec.ts feat: Refactor server-side document, audiobook, and authentication logic, introduce new client-side APIs and caching, and update related tests. 2026-02-17 19:30:12 -07:00
auth-config.spec.ts feat: Refactor server-side document, audiobook, and authentication logic, introduce new client-side APIs and caching, and update related tests. 2026-02-17 19:30:12 -07:00
canonicalize-epub-segment.spec.ts feat(tts,epub,db): enforce stable EPUB segment locators and add segmentKey identity 2026-05-12 16:18:36 -06:00
changelog-check.spec.ts refactor(settings): extract changelog check logic to reusable utility 2026-05-14 10:58:32 -06:00
changelog.spec.ts feat(changelog): add changelog feed support and settings integration 2026-05-14 09:45:04 -06:00
compute-abort-like-error.spec.ts feat(worker): add granular PDF progress reporting and abort error handling 2026-05-29 20:13:59 -06:00
compute-control-plane.spec.ts refactor(control-plane): hard-cut worker events and shared SSE helpers 2026-05-26 11:41:33 -06:00
compute-worker-control-plane-jetstream.spec.ts test: fix JetStream mock typing for tsc 2026-05-26 16:39:40 -06:00
compute-worker-op-key.spec.ts Add force-token cache bust for worker PDF op keys 2026-05-21 10:32:18 -06:00
compute-worker-pdf-progress.spec.ts feat(worker): add granular PDF progress reporting and abort error handling 2026-05-29 20:13:59 -06:00
docstore.spec.ts feat: Refactor server-side document, audiobook, and authentication logic, introduce new client-side APIs and caching, and update related tests. 2026-02-17 19:30:12 -07:00
document-cache.spec.ts feat: Refactor server-side document, audiobook, and authentication logic, introduce new client-side APIs and caching, and update related tests. 2026-02-17 19:30:12 -07:00
document-previews-render.spec.ts feat: Refactor server-side document, audiobook, and authentication logic, introduce new client-side APIs and caching, and update related tests. 2026-02-17 19:30:12 -07:00
epub-audiobook-hook.spec.ts refactor epub reader hooks and add unit coverage 2026-05-13 16:56:13 -06:00
epub-location-controller.spec.ts refactor epub reader hooks and add unit coverage 2026-05-13 16:56:13 -06:00
epub-spine-coordinates.spec.ts feat(tts,epub,db): enforce stable EPUB segment locators and add segmentKey identity 2026-05-12 16:18:36 -06:00
epub-word-highlight.spec.ts fix(api,rate-limit): centralize daily quota exceeded response and update imports 2026-05-12 18:24:39 -06:00
html-audiobook-adapter.spec.ts chore(config): remove smartSentenceSplitting option and related code paths 2026-05-20 04:51:10 -06:00
html-blocks.spec.ts feat(html): add HTML/TXT/MD sentence and word highlighting, settings, and audiobook export support 2026-05-17 11:14:02 -06:00
kokoro.spec.ts refactor(tts): update Replicate model defaults and voice resolution 2026-04-16 12:52:08 -06:00
nlp.spec.ts feat(tts,config,ui): add advanced segment preloading and block length controls 2026-05-07 12:26:08 -06:00
onboarding-flow.spec.ts refactor(onboarding): modularize onboarding flow logic and improve testability 2026-05-29 18:03:17 -06:00
onboarding-state.spec.ts refactor(onboarding): introduce onboarding state coordinator and central registry 2026-05-23 17:07:50 -06:00
pdf-audiobook-adapter.spec.ts chore(config): remove smartSentenceSplitting option and related code paths 2026-05-20 04:51:10 -06:00
pdf-build-page-text.spec.ts feat(pdf): migrate to PP-DocLayoutV3 ONNX model and update PDF block taxonomy 2026-05-18 04:26:39 -06:00
pdf-force-reparse.spec.ts Add force-reparse confirmation flow in PDF UI 2026-05-21 10:34:29 -06:00
pdf-merge-text-with-regions.spec.ts refactor(compute-core): collapse to root/local-runtime entrypoints 2026-05-21 21:30:44 -06:00
pdf-parse-normalize-text-items.spec.ts refactor(compute-core): collapse to root/local-runtime entrypoints 2026-05-21 21:30:44 -06:00
pdf-stitch-cross-page-blocks.spec.ts refactor(compute-core): collapse to root/local-runtime entrypoints 2026-05-21 21:30:44 -06:00
pdf-tts-planning.spec.ts chore(config): remove smartSentenceSplitting option and related code paths 2026-05-20 04:51:10 -06:00
server-error-contract.spec.ts refactor: roll out phase 7 server error contract 2026-05-27 07:24:07 -06:00
server-error-response.spec.ts refactor: roll out phase 7 server error contract 2026-05-27 07:24:07 -06:00
server-route-error-mappings.spec.ts refactor: complete phase 7 error-contract rollout 2026-05-27 08:02:31 -06:00
sha256.spec.ts feat: Refactor server-side document, audiobook, and authentication logic, introduce new client-side APIs and caching, and update related tests. 2026-02-17 19:30:12 -07:00
signup-policy.spec.ts feat(auth): add runtime toggle for user sign-ups and enforce signup policy 2026-05-14 12:47:05 -06:00
transfer-user-documents.spec.ts feat(pdf): implement granular PDF parse progress tracking and migrate to parseState 2026-05-21 10:27:16 -06:00
tts-audio-warm-cache.spec.ts Warm segment audio during preload before playback 2026-05-13 23:39:29 -06:00
tts-epub-handoff.spec.ts fix(api,rate-limit): centralize daily quota exceeded response and update imports 2026-05-12 18:24:39 -06:00
tts-epub-preload.spec.ts chore(config): remove smartSentenceSplitting option and related code paths 2026-05-20 04:51:10 -06:00
tts-generate.spec.ts refactor(tts): extract voice resolution logic to server module and update imports 2026-04-16 15:46:55 -06:00
tts-locator.spec.ts feat(html): add HTML/TXT/MD sentence and word highlighting, settings, and audiobook export support 2026-05-17 11:14:02 -06:00
tts-provider-catalog.spec.ts chore(config): remove Deepinfra model gating and related admin setting 2026-05-13 18:42:40 -06:00
tts-segment-audio-urls.spec.ts Use direct signed segment audio URLs in ensure/manifest 2026-05-13 23:33:00 -06:00
tts-segment-plan-leading.spec.ts refactor(tts,epub,locator): introduce canonical segment keys and locator comparison utilities 2026-05-11 05:17:41 -06:00
tts-segment-plan.spec.ts feat(pdf): improve cross-page block stitching and enforce TTS segment source boundaries 2026-05-18 13:21:43 -06:00
tts-segment-retry-policy.spec.ts Retry errored TTS segments with cooldown and retry-after 2026-05-14 08:31:40 -06:00
tts-segments-audio-cache.spec.ts Remove dead segment audio presign route and legacy helpers 2026-05-14 08:01:53 -06:00
tts-segments-manifest.spec.ts refactor(tts,db,manifest): split tts_segments into normalized entry and variant tables 2026-05-12 17:44:57 -06:00
tts-segments.spec.ts feat(tts,config,types): migrate to providerRef/providerType model and add centralized TTS provider policy 2026-05-13 10:11:05 -06:00
tts-settings-admin-view-model.spec.ts chore(config): remove Deepinfra model gating and related admin setting 2026-05-13 18:42:40 -06:00
walker-theme.spec.ts feat(tts,epub,db): enforce stable EPUB segment locators and add segmentKey identity 2026-05-12 16:18:36 -06:00
whisper-alignment-mapping.spec.ts refactor(core,config,tests): update ONNX model manifest loading and test imports 2026-05-21 23:49:56 -06:00
whisper-spectral.spec.ts refactor(core,config,tests): update ONNX model manifest loading and test imports 2026-05-21 23:49:56 -06:00
whisper-token-timestamps.spec.ts refactor(core,config,tests): update ONNX model manifest loading and test imports 2026-05-21 23:49:56 -06:00