Commit graph

606 commits

Author SHA1 Message Date
Richard R
7a88dabc53 refactor(doclist): redesign document list with new views, DnD, and windowed UI
Revamp the document list experience by introducing a Finder-style window
interface with multiple views (icons, list, columns, gallery) and a new
sidebar filter system. Remove legacy folder and list item components in
favor of modular, windowed views. Integrate react-dnd-touch-backend and
custom DnD context for improved drag-and-drop, including mobile support.
Update uploader and dialog styles for consistency. Extend document types
to support new view modes, icon sizing, and sidebar state.
2026-05-27 18:59:13 -06:00
Richard R
3db193e012 feat(hooks): introduce useUnmountCleanupRef for effect cleanup abstraction
Add useUnmountCleanupRef custom hook to centralize and simplify unmount
cleanup logic in document page components. Refactor EPUB, HTML, and PDF
page components to utilize this hook, replacing repetitive ref and effect
patterns for invoking cleanup functions on unmount. This reduces code
duplication and improves maintainability.
2026-05-27 16:22:14 -06:00
Richard R
139a227aa4 fix(html): use ref to ensure latest clearCurrDoc on unmount 2026-05-27 16:12:09 -06:00
Richard R
f27b5e6504 fix(epub): prevent stale clearCurrDoc reference on unmount in EPUB page 2026-05-27 16:03:34 -06:00
Richard R
a00caa9052 refactor(ui): streamline document cleanup and navigation logic in doc pages
Remove redundant clearCurrDoc calls from navigation links and ensure document cleanup occurs on component unmount for EPUB, HTML, and PDF pages. Simplify PDF back navigation by eliminating sidebar delay logic. Refactor DocumentListItem to avoid unnecessary router usage and consolidate document link handling. These changes improve maintainability and consistency in document lifecycle management across the UI.
2026-05-27 15:48:46 -06:00
Richard R
5305b896c6 refactor: complete phase 7 error-contract rollout 2026-05-27 08:02:31 -06:00
Richard R
00ce39ed74 refactor: roll out phase 7 server error contract 2026-05-27 07:24:07 -06:00
Richard R
3da13c2970 chore(logging): remove redundant errorCode fields from server logs and error contracts
Eliminate the errorCode property from server logger calls, error contract types, and API error bodies throughout the codebase. This reduces duplication and streamlines error reporting, relying on structured event names and error classes for identification. All affected API routes, server logic, and logging utilities have been updated for consistency. Documentation directory added for future reference.
2026-05-27 06:33:14 -06:00
Richard R
5de9069c20 refactor(logging): finalize phase 6 error contract and pretty output 2026-05-27 06:17:25 -06:00
Richard R
f78d066434 refactor(api): enhance tts segment error handling and logging patterns
Update TTS segment ensure route to distinguish aborted and failed segment generation, providing more granular logging and context. Replace ambiguous message variables with clearer detail fields, and improve log event naming for abort scenarios. Adjust ESLint logger call selectors for maintainability and consistency, consolidating selector logic and enforcing stricter server logger usage patterns. These changes improve observability and error traceability in TTS segment operations.
2026-05-27 05:58:48 -06:00
Richard R
034c1f03a4 logging: complete phase 5 contract and enforce via eslint rules 2026-05-27 04:54:52 -06:00
Richard R
29cc4fa42d logging: apply phase 4 warn/error level tuning 2026-05-27 04:28:35 -06:00
Richard R
59d0101c0c feat(server): implement unified structured logging with pino and enforce usage
Introduce `serverLogger` utility based on pino for consistent, structured logging across all server and API modules. Replace direct console logging with `serverLogger` and add request-scoped logging helpers. Update environment variable handling, documentation, and deployment guides to reflect new logging configuration (`LOG_FORMAT`, `LOG_LEVEL`, `COMPUTE_LOG_LEVEL`). Enforce no-console in server code via ESLint and add pino/pino-pretty dependencies.

This change standardizes log output, improves observability, and prepares the codebase for ingestion by log platforms.
2026-05-27 04:20:17 -06:00
Richard R
7732426963 feat(pdf): enable opId tracking and propagation for layout parsing operations
Integrate opId handling throughout PDF layout parsing by updating client hooks, API routes, and event streams to support operation ID propagation. Add server utility for worker operation creation to centralize opId management. Enhance polling and SSE subscription utilities to accept and return opId, improving traceability and coordination of parse operations across the client and server.
2026-05-27 02:35:46 -06:00
Richard R
1ec9632d4b feat(api): set maxDuration for document parsed events route
Define maxDuration as 300 seconds for the parsed events API route to explicitly
control execution timeouts during long-running PDF layout processing. This
ensures more predictable serverless behavior for streaming operations.
2026-05-27 01:41:29 -06:00
Richard R
956ecf5f4a refactor(api): add structured logging for worker op and SSE error states
Introduce detailed console logging across document parsing API routes and worker
operation state fetches. Logs now capture stream openings, error conditions,
worker state unavailability, and invalid responses, improving observability and
debuggability for PDF parsing and ONNX layout processing flows.
2026-05-27 01:32:14 -06:00
Richard R
5c24ea5763 docs(env): clarify env var ownership split for external compute worker mode
Expand documentation and example env files to explicitly distinguish which
environment variables belong in the app/root `.env` versus the `compute/worker/.env*`
files when deploying in external worker mode. This clarifies routing/auth
settings versus worker runtime configuration, reducing misconfiguration risk.
2026-05-27 01:19:37 -06:00
Richard R
93ae9f3082 orchestrate privacy modal in onboarding flow 2026-05-27 00:50:10 -06:00
Richard R
22f132bbc8 hard-cut onboarding modal flow orchestration 2026-05-27 00:40:12 -06:00
Richard R
14b1b5602f fix(parse-progress): persist opId only after worker op exists 2026-05-27 00:08:42 -06:00
Richard R
c717f7e33e fix(storage): restore main-like upload path without pre-presign bucket scan 2026-05-26 20:08:02 -06:00
Richard R
ebc1dbcda0 ci(playwright): install nats-server from linux tarball asset 2026-05-26 19:48:55 -06:00
Richard R
16e94a1587 build(docker): include compute/core and worker package manifests for deps
Add compute/core/package.json and compute/worker/package.json to Docker build
context to ensure all workspace dependencies are correctly installed during
image creation. This change prevents missing dependency issues for subpackages
when building in isolated environments.
2026-05-26 19:33:41 -06:00
Richard R
cd530a365d refactor(whisper): migrate default ONNX model references to q4 variant
Update all configuration, manifest, and documentation references to use the q4
Whisper ONNX model files instead of int8. Adjust expected file names, hashes,
and environment variable descriptions to reflect this new default. This aligns
runtime, deployment, and developer documentation with the updated model artifact
expectations for improved consistency.
2026-05-26 19:22:07 -06:00
Richard R
b2cf4aa7aa ci(playwright): install nats for embedded worker startup 2026-05-26 19:00:07 -06:00
Richard R
1de7ed67b4 refactor(worker): extract op helpers and shared parse mapping 2026-05-26 18:54:11 -06:00
Richard R
0b1ce1c8dc refactor(worker): remove unused job_state kv writes 2026-05-26 18:47:53 -06:00
Richard R
e6e029cf8a cleanup compute core/server dead paths 2026-05-26 18:43:05 -06:00
Richard R
6f68c169b6 feat(compute): integrate worker operation state polling for document parsing
Add worker operation state polling to document parse routes, enabling real-time
status and progress updates from the ONNX layout worker. Introduce
`fetchWorkerOperationState` utility and status mapping logic to synchronize
parse status with worker job state, improving accuracy for pending, running,
and failed operations.
2026-05-26 18:38:50 -06:00
Richard R
bfea95aa35 fix(entrypoint): ensure fatal shutdown on critical embedded service exit
Add robust fatal shutdown handling for embedded services (weed mini,
nats-server, compute-worker) to ensure all services are terminated if any
critical process exits unexpectedly. Introduce flags to prevent duplicate
shutdowns and improve error reporting for better reliability in process
management.
2026-05-26 18:05:57 -06:00
Richard R
e5ee621288 refactor(docstore): improve docstore directory resolution for monorepo setups
Refactored docstore directory logic to dynamically locate the monorepo
root by searching for a pnpm-workspace.yaml marker. If found, the
docstore directory is anchored at the monorepo root; otherwise, it
defaults to the current working directory. This enhances consistency
when running in different environments.

Also updated process shutdown and SeaweedFS launch arguments in the
entrypoint script for improved reliability and log filtering.
2026-05-26 18:05:45 -06:00
Richard R
02979a98af refactor(config): remove START_EMBEDDED_COMPUTE_WORKER env and enforce nats-server for embedded mode
Eliminates the START_EMBEDDED_COMPUTE_WORKER environment variable from configuration,
documentation, and entrypoint logic. Embedded compute worker startup is now strictly
determined by the absence of COMPUTE_WORKER_URL. If embedded mode is triggered,
the presence of the nats-server binary is mandatory; otherwise, an error is thrown.
Documentation and example env files have been updated to reflect this streamlined
behavior and clarify requirements for both embedded and external compute worker setups.
2026-05-26 17:37:18 -06:00
Richard R
e3ac1b1dac docs/env: clarify embedded vs external worker env ownership 2026-05-26 17:16:38 -06:00
Richard R
a073fb63a3 runtime: default embedded worker startup when worker url is unset 2026-05-26 17:00:41 -06:00
Richard R
943e547836 test: fix JetStream mock typing for tsc 2026-05-26 16:39:40 -06:00
Richard R
0e6f966e3a hard-cut batch C: worker projection ownership finalized 2026-05-26 16:38:22 -06:00
Richard R
012cb63de6 hard-cut batch F: remove COMPUTE_MODE docs and env references 2026-05-26 16:28:40 -06:00
Richard R
c0f0438fff hard-cut batch E: embedded nats+worker startup in single-container entrypoint 2026-05-26 16:25:39 -06:00
Richard R
fb0c95dfb1 hard-cut batch D: enforce worker bundle isolation and CI guard 2026-05-26 16:00:26 -06:00
Richard R
f77ee8cfd4 hard-cut batch B: worker-proxy parsed SSE and remove app progress bus 2026-05-26 15:58:14 -06:00
Richard R
f5eb593554 hard-cut batch A: worker-only app compute backend 2026-05-26 15:56:39 -06:00
Richard R
821d0fdc6b build(tsconfig): add path alias for compute-core control-plane module 2026-05-26 15:45:19 -06:00
Richard R
df05a7d7a3 refactor(control-plane): hard-cut worker events and shared SSE helpers 2026-05-26 11:41:33 -06:00
Richard R
084cbdfac1 refactor(worker-control-plane): route ops through core orchestrator 2026-05-26 11:16:54 -06:00
Richard R
00fc2d5e36 feat(control-plane): add shared orchestrator and in-memory adapters 2026-05-26 11:09:43 -06:00
Richard R
cd06201f5c refactor(parse-progress): rely on sse reconnect and document mode behavior 2026-05-25 21:37:43 -06:00
Richard R
be7ec2c254 feat(worker-events): stream op events via jetstream and proxy in app 2026-05-25 21:37:27 -06:00
Richard R
2df49b54de feat(parse-progress): add local in-memory realtime bus 2026-05-25 21:06:18 -06:00
Richard R
52083c6a09 build(config): add path alias for api-contracts in compute-core
Update tsconfig.json to include a path mapping for
@openreader/compute-core/api-contracts, enabling cleaner imports and
improving modularity for API contract usage across the codebase.
2026-05-25 12:00:31 -06:00
Richard R
e70b3619e0 tests: harden pdf readiness waits and extend tts/pdf timeouts 2026-05-24 20:58:57 -06:00