docling-studio/frontend
Pier-Jean Malandrino c878ee5f3b feat(#202): introduce Document lifecycle state machine
Adds a first-class lifecycle state to every document, distinct from
AnalysisJob.status. The lifecycle describes the document as a whole and
is the foundation for the doc-centric pivot in 0.6.0.

Domain
- DocumentLifecycleState enum (Uploaded/Parsed/Chunked/Ingested/Stale/Failed)
- Document.lifecycle_state and lifecycle_state_at fields
- Document.transition_to() validates against a transition table
  (domain/lifecycle.py) and returns a DocumentLifecycleChanged event
- InvalidLifecycleTransitionError on disallowed transitions

Persistence
- ALTER TABLE documents to add the two columns (default 'Uploaded')
- New index idx_documents_lifecycle_state for filter perf
- _COLUMN_MIGRATIONS refactored to support multiple tables
- _POST_MIGRATION_DDL list for indexes on freshly-added columns
- SqliteDocumentRepository.update_lifecycle()

Services
- AnalysisService drives transitions on parse / chunk / re-chunk / fail
  via _transition_document(); idempotent and resilient (logs WARN and
  continues if a stale state is somehow encountered)

API
- DocumentResponse exposes lifecycleState + lifecycleStateAt
  (additive — existing 'status' field kept for backwards compat)

Frontend
- Document type extended with lifecycleState and lifecycleStateAt
- DocumentLifecycleState union literal mirroring the backend enum

Tests
- 24 new tests in test_lifecycle.py covering transitions, idempotency,
  invariant preservation, and event emission
- test_repos.py: round-trip + every-enum-value check + update_lifecycle
- test_chunking.py: rechunk path now mocks document_repo correctly

Refs #202
2026-04-29 15:34:25 +02:00
..
public Update logo with final version 2026-04-02 17:28:22 +02:00
src feat(#202): introduce Document lifecycle state machine 2026-04-29 15:34:25 +02:00
.prettierignore Add qualityt check and contributing doc 2026-03-21 15:34:54 +01:00
.prettierrc Add qualityt check and contributing doc 2026-03-21 15:34:54 +01:00
Dockerfile Refacto and add cp paste btn 2026-03-21 15:03:10 +01:00
env.d.ts feat(reasoning): reasoning-trace viewer v1 with SQLite-backed graph 2026-04-29 14:00:00 +02:00
eslint.config.js fix: resolve CI warnings (Node.js 20 deprecation + ESLint formatting) 2026-04-08 14:54:56 +02:00
index.html Add logo across navbar, home hero, studio, and favicon 2026-04-02 17:11:31 +02:00
nginx.conf fix: limit upload to 5 MB / 20 pages max and increase conversion timeout 2026-04-07 10:56:16 +02:00
package-lock.json feat(reasoning): live docling-agent runner + UX polish 2026-04-29 14:00:00 +02:00
package.json chore(release): cut 0.5.0 — bump frontend version + complete CHANGELOG 2026-04-29 14:00:00 +02:00
tsconfig.json Migrate frontend in typescript 2026-03-21 15:58:43 +01:00
vite.config.js Add release process, dynamic versioning, and changelog catch-up 2026-04-02 16:08:37 +02:00