docling-studio/document-parser/api
Pier-Jean Malandrino 27e3323bff
Some checks failed
Auto-close issues on release branch merge / Close referenced issues (push) Has been cancelled
feat(#257): surface gating via STUDIO_MODE + RAG_PIPELINE master flags
Introduces two master feature flags that select which UI surface is
exposed, replacing the previous "delete legacy pages" approach with a
softer isolation:

- STUDIO_MODE_ENABLED  (default false) — legacy OCR-debug surface
- RAG_PIPELINE_ENABLED (default true)  — new doc-centric ingestion + viz

At least one master must be enabled (validated server-side at startup).
Sub-flags (inspect / linked / ask) are effective only when the RAG
pipeline master is on.

CHUNKS_MODE_ENABLED renamed to LINKED_MODE_ENABLED in anticipation of
T3 (Linked view replaces the Chunks tab). The DocMode union value
'chunks' is preserved for now and will be renamed in T3 alongside the
route segment, to keep this PR scoped.

Router-level guard added: requests to a route whose surface is disabled
are redirected to the other surface's landing page (or /home as a
defensive fallback). Logic extracted into a pure resolveSurface helper
with full test coverage.

i18n strings that pointed users to "Studio" rewritten to be surface-
agnostic ("from the library" / "depuis la bibliothèque") since Studio
is hidden by default in 0.6.1.

Backend:
- infra/settings.py: add studio_mode_enabled + rag_pipeline_enabled;
  rename chunks_mode_enabled → linked_mode_enabled; add at-least-one
  master validation in __post_init__
- api/schemas.py: HealthResponse exposes both master flags + renamed
  sub-flag
- main.py: health endpoint wires the new fields
- tests: surface-flag + renamed sub-flag assertions

Frontend:
- features/feature-flags/store: add studioMode + ragPipeline registry
  entries; rename chunksMode → linkedMode; sub-flags now require
  ragPipeline enabled; modeFlags() maps linkedModeEnabled → key 'chunks'
  (transitional)
- shared/routing/resolveSurface: pure helper + tests
- app/router: beforeEach guard consumes resolveSurface
- shared/i18n: Studio-pointing strings rewritten (en + fr) + test sync
- features/reasoning: stale "from StudioPage" comment generalized
2026-05-11 16:18:34 +02:00
..
__init__.py Radical architecture change, migration to a more lightweight 2026-03-17 16:06:27 +01:00
analyses.py fix(analyses): filter list endpoint by documentId — prevent cross-doc bbox leak 2026-05-11 15:00:57 +02:00
document_chunks.py feat(#256): add /api/documents/{id}/chunks routes + ChunkService 2026-05-11 15:00:57 +02:00
documents.py feat(#202): introduce Document lifecycle state machine 2026-05-05 09:38:39 +02:00
graph.py feat(reasoning): reasoning-trace viewer v1 with SQLite-backed graph 2026-04-29 14:00:00 +02:00
ingestion.py refactor(audit): remediate 0.5.0 audit findings — clean architecture, security, DRY, SOLID, perf 2026-04-29 14:00:00 +02:00
reasoning.py refactor(audit): remediate 0.5.0 audit findings — clean architecture, security, DRY, SOLID, perf 2026-04-29 14:00:00 +02:00
schemas.py feat(#257): surface gating via STUDIO_MODE + RAG_PIPELINE master flags 2026-05-11 16:18:34 +02:00
stores.py feat(#251): /api/stores router + wiring + schemas Pydantic + tests API 2026-05-05 09:38:39 +02:00