Skip to content

Live Test

Live Test

What this area does

Live Test is the high-fidelity extraction playground used to inspect how a model behaves on uploaded files. It combines upload, preview, configuration, rerun, and mismatch review in one workspace.

Primary implementation

The route lives in src/pages/livetest/:

  • LiveTest.jsx
  • FileUpload.jsx
  • LiveTestConfigSidebar.jsx
  • LiveTestResultCard.jsx
  • LiveTestStrategyPanel.jsx
  • MismatchModal.jsx
  • SaveAsDraftModal.jsx
  • utils/dataFiltering.js

Runtime shape

LiveTest.jsx orchestrates multiple state domains:

  • uploaded files and current processing queue,
  • model selection and rerun state,
  • schema/prompt strategy selection,
  • confidence thresholds and file-type restrictions,
  • snapshots of successful runs,
  • mismatch dialogs and draft saving.

Important dependencies

The page pulls together shared contexts and hooks for:

  • live test results,
  • shared schema/model/country data,
  • global sub-agent state,
  • processing hub integration,
  • document service file-type metadata,
  • extraction hooks and configuration hooks.

Key invariants

  • Supported file types and size limits should be loaded from the backend when possible, with a local fallback list as backup.
  • A rerun with a different model should be recorded as a new snapshot.
  • The same model should not be silently re-used without surfacing the conflict dialog logic.
  • Strategy selection can be required or optional depending on the runtime flag.

Evidence-backed tests

tests/unit/dataFiltering.test.js proves the extraction-filtering behavior used by Live Test. The page also depends on the broader document/schema/service contract tests because it orchestrates their request shapes.