# ISIS v2 WS07-009: Sequence Timeline and Side-by-Side Diff UI

## Scope

`WS07-009` exposes sequence-aware cinematic controls in the ISIS web app and
adds timeline + side-by-side diff tooling so operators can author and review
multi-shot continuity workflows without dropping into raw JSON-only debugging.

## Research and Existing Implementation Alignment

- Reused existing `JobSubmissionStudio` form architecture and request builder so
  sequence controls are typed and validated like continuity controls.
- Reused existing `JobsPage` operational surface and `generation.getJob` data
  path to avoid introducing a disconnected UI for timeline review.
- Aligned timeline rendering with existing editorial output contracts
  (`editorialBundle.shotManifest` + `editorialBundle.timecodeMap`) implemented
  in `WS07-007`.
- Reused existing action-driven workflow (clone/report/support bundle) and added
  `Sequence Review` as a first-class operator action per job row.

## Deliverables

1. Added sequence plan controls to Job Submission Studio:

- Sequence enabled toggle, sequence ID, continuity carry mode.
- Timeline controls (start timecode, fps, drop-frame).
- Shot plan JSON controls.
- Forecasting overrides (enabled/provider/rate-card/queue-delay knobs).

2. Added sequence payload contracts in request utils:

- Parsing + validation for sequence shots and sequence forecasting controls.
- Sequence alias extraction and stripping helpers for clone/prefill workflows.
- Sequence prefill mapper for cloning existing sequence-configured jobs.

3. Added sequence timeline + diff tooling in Jobs page:

- On-demand job detail fetch via `generation.getJob` for selected review job.
- Timeline table sourced from editorial shot manifest/timecode map.
- Shot diff controls (left/right shot compare with field-level delta summary).
- Asset diff tool with side-by-side preview, MIME/resolution checks, and
  artifact size deltas.

4. Added reusable sequence utilities and tests:

- Asset collection utility across primary outputs, render passes, editorial
  bundle artifacts.
- Timeline normalization utility for shot ordering and merged timecode data.
- Shot diff computation utility for continuity/timing comparisons.

## Verification Commands

```bash
pnpm --filter @isis/web exec vitest run src/pages/job-submission-utils.spec.ts src/pages/jobs-sequence-utils.spec.ts src/pages/JobsPage.spec.tsx
node scripts/isis/validate-v2-compliance-gate.mjs
```

## Notes

- `pnpm --filter @isis/web exec tsc -p tsconfig.json --noEmit` still reports an
  existing workspace `rootDir` constraint (`TS6059`) unrelated to WS07-009 code
  paths.
