feat(ui): add browser UI at /ui #45

Merged
goldstein merged 1 commit from feat/ui into main 2026-04-18 19:31:24 +00:00
Owner

Minimal Jinja2 + HTMX + Pico CSS browser UI at /ui. Drop a PDF, pick a registered use case or define one inline (via the PR 1 use_case_inline field), tweak options, submit, watch the pretty-JSON result via 2s HTMX polling. LAN-only, no auth.

Uploads stream to {tmp_dir}/ui/<uuid>.pdf via aiofiles with the existing IX_FILE_MAX_BYTES cap. All submissions go through the same jobs_repo.insert_pending entry point as the REST adapter — no duplicated logic. REST API paths / shapes unchanged.

Tests: 8 integration tests (tests/integration/test_ui_routes.py) cover index, static mount, registered + custom use-case submissions (asserting stored use_case_inline for custom), HTMX redirect header, malformed fields_json rejection, fragment rendering for pending and done jobs. Full integration suite still green (41 passing locally against disposable pg container); unit suite 266 passing; ruff clean.

New pinned deps: jinja2, aiofiles, python-multipart.

Minimal Jinja2 + HTMX + Pico CSS browser UI at `/ui`. Drop a PDF, pick a registered use case or define one inline (via the PR 1 `use_case_inline` field), tweak options, submit, watch the pretty-JSON result via 2s HTMX polling. LAN-only, no auth. Uploads stream to `{tmp_dir}/ui/<uuid>.pdf` via aiofiles with the existing `IX_FILE_MAX_BYTES` cap. All submissions go through the same `jobs_repo.insert_pending` entry point as the REST adapter — no duplicated logic. REST API paths / shapes unchanged. Tests: 8 integration tests (`tests/integration/test_ui_routes.py`) cover index, static mount, registered + custom use-case submissions (asserting stored `use_case_inline` for custom), HTMX redirect header, malformed `fields_json` rejection, fragment rendering for pending and done jobs. Full integration suite still green (41 passing locally against disposable pg container); unit suite 266 passing; ruff clean. New pinned deps: `jinja2`, `aiofiles`, `python-multipart`.
goldstein added 1 commit 2026-04-18 19:28:09 +00:00
feat(ui): add browser UI at /ui for job submission
All checks were successful
tests / test (push) Successful in 1m43s
tests / test (pull_request) Successful in 1m21s
2e8ca0ee43
Minimal Jinja2 + HTMX + Pico CSS UI (all CDN, no build step) that lets
a user drop a PDF, pick a registered use case or define one inline,
tweak OCR/GenAI/provenance options, submit, and watch the pretty-JSON
result come back via 2s HTMX polling. Uploads land in
{tmp_dir}/ui/<uuid>.pdf via aiofiles streaming with the existing
IX_FILE_MAX_BYTES cap.

All submissions go through the same jobs_repo.insert_pending entry
point the REST adapter uses — no duplicated logic. The REST surface is
unchanged.

Tests: tests/integration/test_ui_routes.py — 8 cases covering GET /ui,
registered + custom use-case submissions (asserting the stored request
carries use_case_inline for the custom path), malformed fields_json
rejection, and the fragment renderer for pending vs. done.

New deps pinned explicitly in pyproject.toml:
jinja2, aiofiles, python-multipart (arrive transitively via FastAPI but
we own the import surface now).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
goldstein merged commit 136e31c82c into main 2026-04-18 19:31:24 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: goldstein/infoxtractor#45
No description provided.