Skip to content

Contract analysis

Contract analysis

What this area does

Contract analysis is the repository’s document-understanding workflow for contract-like inputs. It combines upload, multi-file processing, conversation style review, batch status tracking, and result inspection.

Primary implementation

The main implementation lives in src/pages/contractanalysis/:

  • ContractAnalysis.jsx
  • ContractUploadPanel.jsx
  • ChatInterface.jsx
  • MultiFileChat.jsx
  • ResultsGrid.jsx
  • AllFilesResults.jsx
  • BatchProgressGrid.jsx
  • DocumentHistory.jsx
  • image.png

Core runtime shape

The page coordinates multiple views instead of a single static result panel:

  • upload panel for document submission,
  • chat interface for follow-up analysis,
  • results grid for extracted values,
  • batch progress for multi-document jobs,
  • document history for prior runs,
  • all-files view for aggregated inspection.

Dependencies

The contract analysis flow depends on the shared chat/document services, the file preview system, and the processing/document state that underpins workspace-level workflows.

Invariants

  • Multi-document state must stay grouped by batch so results are traceable.
  • History and current results must remain distinguishable.
  • The page should preserve a clear boundary between chat-driven interaction and structured extraction display.

Validation

Use the contract/service tests that cover the data and API layer plus the workflow Playwright specs that exercise the portal-level contract-analysis journeys.