docling-studio/frontend/src/shared
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
..
api feat(#251): expose backend error detail in apiFetch errors 2026-05-05 09:38:39 +02:00
breadcrumb feat(#208): doc workspace breadcrumb (Studio > <doc> > <mode>) 2026-05-05 09:38:39 +02:00
composables Add reusable pagination composable and PaginationBar component 2026-04-02 13:41:50 +02:00
routing feat(#257): surface gating via STUDIO_MODE + RAG_PIPELINE master flags 2026-05-11 16:18:34 +02:00
storage refactor(audit): remediate 0.5.0 audit findings — clean architecture, security, DRY, SOLID, perf 2026-04-29 14:00:00 +02:00
ui feat(#209): rework sidebar nav (Home / Docs / Stores / Runs / Settings) 2026-05-05 09:38:39 +02:00
appConfig.ts fix(decoupling): eliminate cross-feature imports and add typed health endpoint 2026-04-10 13:11:29 +02:00
format.test.ts feat(#211): E3 — Document library (/docs), filters, bulk actions, multi-file import, StatusBadge 2026-05-05 09:38:39 +02:00
format.ts feat(#211): E3 — Document library (/docs), filters, bulk actions, multi-file import, StatusBadge 2026-05-05 09:38:39 +02:00
i18n.test.ts feat(#257): surface gating via STUDIO_MODE + RAG_PIPELINE master flags 2026-05-11 16:18:34 +02:00
i18n.ts feat(#257): surface gating via STUDIO_MODE + RAG_PIPELINE master flags 2026-05-11 16:18:34 +02:00
types.ts feat(#225,#224): vocabulary rename index→ingest + stale stores strip 2026-05-05 09:38:39 +02:00