Commit graph

68 commits

Author SHA1 Message Date
Pier-Jean Malandrino
babd710d90 fix: resolve CI warnings (Node.js 20 deprecation + ESLint formatting)
Force Node.js 24 in all GitHub Actions workflows to suppress the
upcoming Node.js 20 deprecation warnings. Disable vue/html-indent and
vue/html-closing-bracket-newline ESLint rules that conflict with
Prettier formatting.

Closes #122
2026-04-08 14:54:56 +02:00
Pier-Jean Malandrino
704ba550d4 feat: make document max size configurable via MAX_FILE_SIZE_MB env var
Replace hardcoded 5 MB upload limit with a configurable setting.
Backend exposes the value via /api/health, frontend reads it
dynamically for validation and UI messages.

Closes #48
2026-04-08 10:27:38 +02:00
Pier-Jean Malandrino
fc866ce229 feat: batch large documents with page_range and progress reporting
Use Docling's native page_range parameter to split large PDFs into
sequential batches, preventing memory exhaustion and timeouts.
Progress is reported via existing polling mechanism.

Closes #56
2026-04-07 17:54:40 +02:00
Pier-Jean Malandrino
4b1a15f49a fix: add retry tolerance to frontend polling (H3)
A single transient network error (502, timeout) no longer kills the
polling loop. The frontend now tolerates up to 3 consecutive errors
before abandoning. Successful fetches reset the counter.

Also aligns frontend polling timeout (15 min) with backend timeout.

Ref #57 (H3, M5)
2026-04-07 15:32:38 +02:00
Pier-Jean Malandrino
09145206d2 fix: limit upload to 5 MB / 20 pages max and increase conversion timeout
Prevents PyTorch/Docling pipeline crashes on HF Spaces CPU by:
- Reducing max file size from 50 MB to 5 MB
- Adding configurable MAX_PAGE_COUNT setting (env var, default unlimited)
- Increasing conversion timeout from 600s to 900s
- Adding frontend upload validation with explicit error messages
- Exposing maxPageCount via /api/health for dynamic UI hints
2026-04-07 10:56:16 +02:00
Pier-Jean Malandrino
af4400b1f7 Add Github badge 2026-04-07 08:57:39 +02:00
Pier-Jean Malandrino
e1ccc7a6e0 Add document size limit (50 MB) to disclaimer banner 2026-04-07 08:35:39 +02:00
Pier-Jean Malandrino
ee57b04f84 Add disclaimer banner for shared deployments (HuggingFace)
Feature-flagged via DEPLOYMENT_MODE env var and /api/health endpoint.
Disabled by default (self-hosted), enabled when deploymentMode=huggingface.
2026-04-04 21:06:38 +02:00
Pier-Jean Malandrino
76e8c55b7c Fix BboxOverlay inline handler breaking production build
Vue template compiler in production mode rejects multi-statement
inline handlers without semicolons. Extract to a named function.
2026-04-03 16:17:23 +02:00
Pier-Jean Malandrino
226ae5994e Format all frontend files with Prettier
Batch reformat to eliminate 23 files with inconsistent formatting
that were accumulating across feature branches.
2026-04-03 15:50:32 +02:00
Pier-Jean Malandrino
6a791cec48 Fix i18n placeholder replacement to handle repeated occurrences
Use replaceAll instead of replace to substitute all instances of
a placeholder in translation strings, not just the first one.
2026-04-03 13:05:44 +02:00
Pier-Jean Malandrino
87269b9393 Add PDF type validation to file picker upload
The drop handler validated PDF type but the file picker did not,
allowing non-PDF files to bypass client-side validation.
2026-04-03 13:03:48 +02:00
Pier-Jean Malandrino
c28f734e71 Add missing security headers to docker-compose nginx config
Align frontend/nginx.conf with the root nginx.conf by adding
X-Frame-Options, X-Content-Type-Options, X-XSS-Protection,
and Referrer-Policy headers.
2026-04-03 13:02:24 +02:00
Pier-Jean Malandrino
abe59c3cb7 Fix health endpoint not reachable through nginx proxy
Move /health to /api/health on backend and update the frontend
feature flag store to match. Without this, the combined Docker
image nginx proxy could not reach the endpoint and feature flags
(chunking/prepare mode) failed to load.
2026-04-03 12:14:15 +02:00
Pier-Jean Malandrino
1331582e22 Update logo with final version 2026-04-02 17:28:22 +02:00
Pier-Jean Malandrino
f6fa6907d7 Add logo across navbar, home hero, studio, and favicon
Replace generic orange "D" placeholders with the duck mascot logo
in all branding touchpoints: navbar header, home page hero, studio
import view, and browser favicon.
2026-04-02 17:11:31 +02:00
Pier-Jean Malandrino
598b370e1a Add icons to home stats cards with accent hover
Add document and clock icons above the stat numbers for better visual
context. Accent border and icon color on hover for consistent
interactive feedback across the app.
2026-04-02 16:42:04 +02:00
Pier-Jean Malandrino
8ed0e33313 Compact settings toggles as segmented controls
Reduce toggle width to fit-content with inner padding and individual
border-radius, matching the studio tabs design. Narrower max-width
for a tighter settings layout.
2026-04-02 16:41:34 +02:00
Pier-Jean Malandrino
e4bbffe258 Redesign history list as cards with subtle completed badges
Replace flat rows with rounded cards matching documents page style.
Reduce COMPLETED badge to a green dot so exceptions (FAILED, RUNNING)
stand out visually instead of blending into a wall of green badges.
2026-04-02 16:41:06 +02:00
Pier-Jean Malandrino
a78c9ec415 Redesign documents page rows as cards with accent hover
Replace flat border-bottom rows with rounded cards that have a subtle
border and accent-colored border on hover for better visual hierarchy.
2026-04-02 16:40:20 +02:00
Pier-Jean Malandrino
126c41a033 Fix studio topbar title wrapping when sidebar is open
Prevent multi-line title by adding ellipsis truncation and min-width
constraints on the topbar-left container.
2026-04-02 16:39:08 +02:00
Pier-Jean Malandrino
4b0bb55cfe Redesign studio mode tabs with icons and accent highlight
Add contextual icons (gear, checkmark, grid) to Configure, Verify,
and Prepare tabs. Replace flat white/shadow active state with accent
color background for clearer visual feedback. Use inner padding and
individual border-radius for a modern segmented control look.
2026-04-02 16:27:02 +02:00
Pier-Jean Malandrino
1ed9552224 Dim non-highlighted bboxes in Verify mode for visual consistency
Apply the same dimming strategy used in Prepare mode: when an element
is highlighted, reduce stroke and fill opacity of all other bboxes
so the focused element stands out clearly.
2026-04-02 16:19:43 +02:00
Pier-Jean Malandrino
1ff8c5108f Add release process, dynamic versioning, and changelog catch-up
Replace hardcoded version strings with build-time injection:
- Frontend: Vite __APP_VERSION__ from env or package.json
- Backend: APP_VERSION env var exposed via /health endpoint
- Docker: build arg propagated through both stages
- CI: release workflow extracts version from git tag

Document branching strategy and release process in CONTRIBUTING.md.
Catch up CHANGELOG with v0.2.0 and Unreleased sections.
Sync package.json version to 0.3.0.
2026-04-02 16:08:37 +02:00
Pier-Jean Malandrino
82059ec0b1 Add tests for ChunkBbox domain, schema, and API serialization
Cover ChunkBbox construction and serialization, ChunkBboxResponse
camelCase output, rechunk endpoint bbox propagation, and frontend
store test data alignment with the new bboxes field.
2026-04-02 14:47:40 +02:00
Pier-Jean Malandrino
4af6b5b231 Add chunk-to-bbox hover highlighting in Prepare mode
Extract bounding boxes from chunk doc_items provenance in the chunker,
propagate through domain/service/API layers, and render highlighted
bboxes on canvas when hovering a chunk card. Reset highlights on
mode and page changes to prevent stale visual state.
2026-04-02 14:47:31 +02:00
Pier-Jean Malandrino
ace37429bd Improve Prepare mode with page filtering, collapsible config, and bbox overlay
Filter chunks by current PDF page for consistency with Verify mode.
Add collapsible chunking config section and paginated chunk list.
Show BboxOverlay in Prepare mode so users see element bounding boxes.
Fix scroll containment on prepare panel.
2026-04-02 13:41:59 +02:00
Pier-Jean Malandrino
102a11765a Add reusable pagination composable and PaginationBar component
Generic usePagination composable with page navigation, size control,
and auto-reset on data change. PaginationBar renders prev/next with
page size selector. Both support i18n.
2026-04-02 13:41:50 +02:00
Pier-Jean Malandrino
13ac8a11f0 Fix feature flag health check blocked by CORS
Use relative /health path through Vite proxy instead of absolute URL
to localhost:8000, matching the pattern used by all other API calls.
2026-04-02 12:44:08 +02:00
Pier-Jean Malandrino
ebdf9ae1be Add frontend chunking feature with Prepare mode
Chunk/ChunkingOptions types, rechunkAnalysis API, store actions
(currentChunks, rechunk), ChunkPanel UI, Prepare tab in StudioPage
gated by chunking feature flag, i18n keys (FR/EN), and tests.
2026-04-02 12:33:07 +02:00
Pier-Jean Malandrino
2e086cc4f3 Add feature flipping mechanism
Introduce a feature-flags module in the frontend that detects
the backend conversion engine via /health and exposes typed
feature flags. Chunking is enabled only in local engine mode.
2026-04-02 11:25:23 +02:00
Pier-Jean Malandrino
b93cf43c2a Move @vitest/mocker from dependencies to devDependencies
Test utility was incorrectly listed as a production dependency,
adding unnecessary weight to the production Docker image.
2026-04-01 14:55:31 +02:00
Pier-Jean Malandrino
001cf6807c Fix audit findings: security, robustness, and dead code
- Remove dead get_analysis_service() function in main.py
- Scope file deletion to UPLOAD_DIR to prevent path traversal
- Parse datetime strings back to datetime objects in repos
- Add 10-minute polling timeout in frontend analysis store
- Accept .pdf extension (not just MIME type) on drag-and-drop
- Guard localStorage access for private browsing compatibility

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:52:36 +02:00
Pier-Jean Malandrino
6b0fc45e5d Fix upload error not displayed in DocumentUpload component
Wrap store.upload() calls in try-catch in both onFileSelect and onDrop
so thrown errors (e.g. file too large) don't bubble up unhandled.
Display store.error inline below the upload hint so users see why
their upload was rejected.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 16:52:36 +02:00
Pier-Jean Malandrino
fe4e792885 Fix audit findings: remove domain→infra violation, align Serve API, fix DI
- Delete domain/parsing.py (broke hexagonal layering by importing infra)
- Migrate all tests to import directly from domain.value_objects and
  infra.local_converter
- Rewrite ServeConverter to match real Docling Serve v1 API contract:
  options sent as individual form fields (not JSON blob), response
  parsed from document.json_content (DoclingDocument), proper bbox
  coord_origin handling (TOPLEFT/BOTTOMLEFT)
- Transmit all conversion options including generate_picture_images
- Replace fragile lazy import circular dep with FastAPI Depends() +
  app.state for AnalysisService injection
- Add frontend file size validation (50MB) before upload

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 10:58:58 +02:00
Pier-Jean Malandrino
c9de4bbd8a Fix esbuild vulnerability by upgrading Vite 5 → 6 and vitest
Update vite 5.4.21 → 6.4.1, @vitejs/plugin-vue and vitest to resolve
Dependabot alert #1 (esbuild dev server request forgery, now at 0.25.12)
2026-03-28 15:16:09 +01:00
Pier-Jean Malandrino
19125d4230 Fix picomatch vulnerability by updating typescript-eslint
Update typescript-eslint 8.57.1 → 8.57.2 to resolve Dependabot alert #3
(POSIX Character Classes method injection in picomatch, now at 4.0.4)
2026-03-28 15:15:01 +01:00
Pier-Jean Malandrino
40cba0f036 Fix type in emit 2026-03-24 08:38:55 +01:00
Pier-Jean Malandrino
079595b57d Fix evetn listening redirection on doc upload 2026-03-23 10:59:52 +01:00
Pier-Jean Malandrino
1edd0668d1 Fix Ruff errror, update node and fix buttton breakline 2026-03-23 10:13:24 +01:00
pjmalandrino
b45bb87339 COnsolidation of bbox pipelin and add tests 2026-03-21 19:45:04 +01:00
pjmalandrino
8871c9162c Migrate frontend in typescript 2026-03-21 15:58:43 +01:00
pjmalandrino
577225d10e Add qualityt check and contributing doc 2026-03-21 15:34:54 +01:00
pjmalandrino
2db251182f Refacto and add cp paste btn 2026-03-21 15:03:10 +01:00
pjmalandrino
7bb4f8e298 Split the results of OCR 2026-03-20 21:45:26 +01:00
pjmalandrino
d28dfd6d81 Add slide on side bar in Studio mode 2026-03-20 16:24:38 +01:00
pjmalandrino
20e79f4361 Change document tab place and add landing page 2026-03-20 13:57:05 +01:00
pjmalandrino
ad1f1a81d3 Mke some fixes and refacto 2026-03-20 12:36:26 +01:00
pjmalandrino
ea71f7247c Add tests 2026-03-20 09:42:14 +01:00
pjmalandrino
7821cd397b Allow History consultaiton on click, add documents management tab 2026-03-20 09:37:40 +01:00