openreader/src/app/api
Richard R 62c913e96d feat(pdf): refactor parse operation orchestration and client readiness flow
Introduce startPdfParseOperation to encapsulate worker operation creation, job rate tracking, and parse state initialization for PDFs. Replace scattered operation setup logic in register-upload, docx-to-pdf upload, and parse-state-backfill with this unified helper. Update job enqueuing to propagate initial opId/jobId/status for accurate state tracking.

Change getParsedPdfDocument to throw on non-ready states and remove polling logic from usePdfDocument, shifting readiness detection to event streams. Switch API responses for non-ready parses from 202 to 409 to clarify client expectations and simplify error handling.

Add targeted tests to verify legacy backfill behavior and ensure no worker operation is created for pure data fetches of pending legacy PDFs.

BREAKING CHANGE: API now returns 409 Conflict for non-ready parsed PDFs instead of 202, and clients must subscribe to event streams for parse progress.
2026-06-04 10:52:49 -06:00
..
account/delete refactor(env): remove legacy no-auth mode and enforce required auth env vars 2026-05-31 12:09:37 -06:00
admin refactor: complete phase 7 error-contract rollout 2026-05-27 08:02:31 -06:00
audiobook refactor(api): remove all legacy unclaimed user scope logic and enforce strict userId scoping 2026-05-31 13:01:55 -06:00
auth/[...all] refactor(env): remove legacy no-auth mode and enforce required auth env vars 2026-05-31 12:09:37 -06:00
documents feat(pdf): refactor parse operation orchestration and client readiness flow 2026-06-04 10:52:49 -06:00
rate-limit/status refactor(auth): remove redundant authEnabled flag from contexts and components 2026-05-31 13:10:01 -06:00
tts refactor(api): remove all legacy unclaimed user scope logic and enforce strict userId scoping 2026-05-31 13:01:55 -06:00
user refactor: roll out phase 7 server error contract 2026-05-27 07:24:07 -06:00