feat(ui): queue position, elapsed time, filename, CPU-mode notice #46

Merged
goldstein merged 1 commit from feat/ui-polish into main 2026-04-18 20:06:36 +00:00

1 commit

Author SHA1 Message Date
2d22b704b7 feat(ui): queue position, elapsed time, filename, CPU-mode notice
All checks were successful
tests / test (push) Successful in 1m18s
tests / test (pull_request) Successful in 1m21s
Address user confusion from "pending" jobs with no explanation:

* FileRef.display_name — optional UI-only metadata so the UI can show
  the client-provided upload filename instead of the on-disk UUID. The
  pipeline ignores it for execution; older stored rows stay valid
  because the field is optional.
* jobs_repo.queue_position — returns (ahead, total_active) so the
  fragment can render "Queue position: N ahead" for pending jobs and
  "About to start" when N == 0. Terminal jobs return (0, 0).
* Fragment polish — status / queue / elapsed / result panels; live dot
  via CSS animation; CPU-mode details block when /healthz reports
  ocr_gpu: false. Elapsed time formats as MM:SS (running or finished).
* /healthz gains an additive ocr_gpu key (true/false/null). Existing
  postgres/ollama/ocr gating is unchanged. Surya records CUDA availability
  on warm_up; FakeOCRClient has no attribute and probes to None.
* Persistent header with "Upload a new extraction" link and copy-to-
  clipboard button for the current job id; <title> includes job id.

Tests: +7 unit + +6 integration. Full suite 321 green (272 unit, 49
integration). Lint clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-18 22:03:30 +02:00