Commit graph

166 commits

Author SHA1 Message Date
Pier-Jean Malandrino
ab6d42aecd Move bbox.py from domain/ to infra/ and unify coordinate logic
domain/ must be pure with no external dependencies. bbox.py imports
docling_core and belongs in infra/. Also refactor ServeConverter to
use the canonical to_topleft_list via BoundingBox instead of
duplicated manual coordinate conversion. Move docling-core to base
requirements since it is now needed in both modes.
2026-04-03 13:17:26 +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
afc9b2e9f2 Document CONVERSION_MODE build variable in .env.example
Clarify the difference between CONVERSION_MODE (docker-compose
build target) and CONVERSION_ENGINE (runtime variable set
automatically by the Docker target).
2026-04-03 13:05:00 +02:00
Pier-Jean Malandrino
dbcd9dfa4c Fix naive datetime fallbacks in repository layer
Use UTC-aware datetimes consistently to prevent TypeError when
comparing aware and naive datetime objects.
2026-04-03 13:04: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
8856daf3c9 Force .pdf extension on uploaded files regardless of user input
The file content is already validated as PDF, so the user-supplied
extension should not be trusted or written to disk.
2026-04-03 13:03:21 +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
ac4a98e204 Fix GHA cache collision between remote and local release builds
Both matrix targets were sharing the same cache scope, causing
overwrites and cache misses. Scope caches per target.
2026-04-03 13:02:07 +02:00
Pier-Jean Malandrino
2cbef859e7 Fix generate_page_images option silently dropped in remote mode
The form data builder was not forwarding generate_page_images to
Docling Serve, so page image generation was silently ignored.
2026-04-03 13:01:50 +02:00
Pier-Jean Malandrino
e1636e710d Fix ServeConverter not returning document_json for chunking
The remote converter never set document_json in ConversionResult,
silently preventing chunking from working in remote mode.
2026-04-03 13:00:43 +02:00
Pier-Jean Malandrino
b34b56aba2
Merge pull request #39 from scub-france/feature/docker-split-local-remote
Feature/docker split local remote
2026-04-03 12:19:16 +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
48c5e4ea6b Fix RapidOCR model download permission in local image
Grant appuser write access to rapidocr/models directory so OCR
models can be downloaded at runtime.
2026-04-03 10:44:20 +02:00
Pier-Jean Malandrino
48b7d5d3e8 Use CPU-only torch in local image to reduce size from 5.8GB to 1.9GB
Install torch and torchvision from the CPU-only index before docling
to avoid pulling CUDA/nvidia/triton dependencies. Update documentation
with measured image sizes (270MB remote, 1.9GB local).
2026-04-03 09:52:22 +02:00
Pier-Jean Malandrino
aa7c539cc3 Update documentation for remote/local image variants
Reflect the two Docker targets across README, getting-started,
contributing guides, and .env.example with new configuration
variables (CONVERSION_ENGINE, DOCLING_SERVE_URL, DOCLING_SERVE_API_KEY).
2026-04-03 09:24:41 +02:00
Pier-Jean Malandrino
3dd7470562 Split release pipeline into remote and local image builds
Matrix strategy builds both targets in parallel. Tags follow the
pattern: v0.3.0-remote, v0.3.0-local, latest-remote, latest-local.
2026-04-03 09:24:41 +02:00
Pier-Jean Malandrino
9ac0840607 Add multi-target Dockerfiles for remote and local builds
Both root and backend Dockerfiles now use a shared base stage with
two targets: remote (lightweight, ~300MB) and local (full Docling,
~2-3GB). docker-compose uses CONVERSION_MODE to select the target.
2026-04-03 09:24:41 +02:00
Pier-Jean Malandrino
8dd917b6ed Split requirements into base and local variants
Remote mode only needs FastAPI, httpx and lightweight deps.
Local mode adds docling and docling-core for in-process conversion.
2026-04-03 09:24:41 +02:00
Pier-Jean Malandrino
b9c701b711
Merge pull request #38 from scub-france/feature/branding
Feature/branding
2026-04-02 17:32:43 +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
199785aa29
Merge pull request #37 from scub-france/feature/ui-polish
Feature/UI polish
2026-04-02 17:02:53 +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
c60407f7a2
Merge pull request #35 from scub-france/feature/studio-tabs-redesign
Redesign studio mode tabs with icons and accent highlight
2026-04-02 16:28:19 +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
4df91b41d5
Merge pull request #34 from scub-france/fix/harmonize-bbox-highlight
Dim non-highlighted bboxes in Verify mode for visual consistency
2026-04-02 16:21:12 +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
84645f0d70
Merge pull request #33 from scub-france/feature/include-chunking
Feature/include chunking
2026-04-02 15:21:15 +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
e74c788ad4
Merge pull request #32 from scub-france/feature/include-chunking
Feature/include chunking
2026-04-02 12:38: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
05de0cc774 Add chunking tests and update existing test assertions
16 new chunking tests (domain, schemas, API endpoints).
Update existing tests for chunkingOptions parameter and document_json mock.
2026-04-02 12:33:07 +02:00
Pier-Jean Malandrino
a9517d38eb Add chunking service orchestration, API endpoints, and wiring
AnalysisService gains rechunk() and inline chunking during conversion.
ChunkingOptionsRequest/ChunkResponse schemas, POST rechunk endpoint,
and conditional chunker injection in main.py (local engine only).
2026-04-02 12:33:07 +02:00
Pier-Jean Malandrino
4b1ec364f4 Add LocalChunker adapter and DoclingDocument serialization
LocalChunker implements DocumentChunker port using docling-core chunkers.
LocalConverter now serializes DoclingDocument to JSON for re-chunking support.
2026-04-02 12:33:07 +02:00
Pier-Jean Malandrino
f5b31f809f Add document_json and chunks_json persistence layer
Schema migration for new columns, repository read/write support,
and dedicated update_chunks method for re-chunking operations.
2026-04-02 12:33:07 +02:00
Pier-Jean Malandrino
78c27b087d Add chunking domain objects and DocumentChunker port
ChunkingOptions and ChunkResult value objects, document_json/chunks_json
fields on AnalysisJob, and DocumentChunker protocol for adapter injection.
2026-04-02 12:33:07 +02:00
Pier-Jean Malandrino
d42c97160d Format backend codebase with ruff 2026-04-02 12:33:07 +02:00
Pier-Jean Malandrino
29d36b9fc2
Merge pull request #31 from scub-france/feature/feature-flipping
Add feature flipping mechanism
2026-04-02 11:29:57 +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
0e302c30ea
Merge pull request #30 from scub-france/fix/move-vitest-mocker-to-devdeps
Fix/move vitest mocker to devdeps
2026-04-02 10:56:16 +02:00
Pier-Jean Malandrino
8319b45f25 Add excalidraw folder to gitignore 2026-04-02 10:55:25 +02:00