Skip to content

Accelerated Annotation Form v2 — Stage-review workflow

This page describes the current accelerated AF2 delivery. It is intentionally narrower than the future versioned-question design elsewhere in this feature folder.

What reviewers see

For an eligible stage, AF2 uses the existing stage-review page and current backend session. Questions are organised into Study, Cohort, Disease Model Induction, Treatment, and Outcome Assessment workspaces. Only the current bounded unit page and question window are mounted, so large stages do not put every form control in the browser at once. Each mounted answer row owns one small Signal Form; off-screen drafts remain in the shared form store and regain their field state when their row is mounted again.

Reviewers can:

  • answer all six existing control types and follow conditional questions;
  • add notes and repeated answers where the question permits them;
  • page, expand, rename, duplicate, hide, or delete supported units;
  • open a unit in a focused full-screen workspace;
  • view the study title, authors, publication, year, abstract, and secure PDF link beside the form;
  • use keyboard navigation and first-error focus across paginated or virtualised content; and
  • save, complete, edit, revert, and delete through the existing whole-session persistence contract.

AF2 does not save each keystroke to the server. Draft changes remain local until the reviewer uses the existing save or completion boundary. If the reviewer navigates away with dirty answers, the normal confirmation dialog can save, discard, or keep them on the page.

When AF2 is selected

The generated global annotationFormV2 flag must be enabled outside the repository, and all of these conditions must be known and true:

  • the route is ordinary stage review;
  • the current project and annotation-capable stage are fully loaded and match;
  • the stage is not an extraction stage; and
  • every selected stage question resolves inside the current project and uses Study, Hidden, Cohort, Disease Model Induction, Treatment, or Outcome Assessment; and
  • each selected mutable-unit category has exactly one visible scalar string label question, with every selected structural child's parent chain also selected; and
  • ordinary root questions have no parent target. The legacy built-in Disease Model Induction and Treatment control questions are accepted as children only when their exact system identity and label-control structure match the current backend convention; malformed or unknown root/target combinations stay on v1.

The decision fails closed. The existing v1 form remains in use while data is loading, when the flag is off, for extraction or Experiment questions, and for reconciliation. AF2 and v1 are never mounted together on the ordinary review route.

Question-management preview host

AF2 Phase 4 adds a second host behind the same flag and the same eligibility function, discriminated by a 'preview' host value: the question-management stage preview. A preview mounts AF2 only when the flag is on and the previewed stage passes exactly the checks listed above, so extraction-stage previews and any unsupported question graph keep rendering the v1 preview unchanged. Exactly one of the two forms is ever mounted.

The preview host swaps both adapters by DI token. Its data source is study-less: it builds the question and unit snapshot from the previewed stage's configured questions using the same V1 mapping helpers, with no study source, no drafts, and no outcome data. Its persistence is a no-op that resolves without any server call, matching v1's preview, which reports "Annotation in Preview Mode, nothing is being saved." and never saves, updates, or deletes a session.

Rollout boundary

The repository keeps annotationFormV2 default-off. Merging the host does not enable the form in preview, staging, or production and does not change project data. Flag activation and environment rollout require separate operational authority.

Experiment/outcome-data parity, extraction-stage previews, and the reconcile host belong to the rest of AF2 Phase 4. App-wide zoneless change detection belongs to Phase 5.