All work

Analysis Mode & the Session

Analysis mode is the composition root for one categorisation session: on entry it constructs the session and wires every component with explicit Initialise calls, on exit it tears everything down, with no global statics. At its heart is the ComputerViewSession, a plain C# class that knows nothing about Unity, the single source of truth for which items exist, which are categorised, and which is active. It's testable in complete isolation from the presentation.

The session model

ComputerViewSession holds all items, their categorisations, and the active item, and exposes intent: CategoriseItem, DiscardItem, SetActiveItem, IsReadyToSubmit, plus events the UI subscribes to. Items come in two kinds behind a common key: a circled leaf the player flagged with the pen, and a general issue auto-listed from the candidate's aggregated errors. The model never renders, lerps a camera, or touches a GameObject.

Staging and the left pane

When documents are scanned they translate to an offscreen staging area, keeping all their state, including the circles drawn by the pen, because they're the same world objects. A staging camera renders that area to a RenderTexture, and the left pane is just a RawImage of it. A framing controller drives the camera between targets, the whole stage, one document, a single field, while a thin view object maps session changes to framing requests.

The right pane and submission

A small state machine flips the right pane between the item list (every issue plus the submit button) and category browsing (the picker, with the camera zoomed to the active item). Selected issues come from leaves in the Selected state; general issues come from the candidate's aggregated errors and appear whether or not the player noticed them. On submit, the session is validated against what was actually wrong, each pick scored as caught, missed, false positive, or miscategorised, and the report goes to the scoring system.