# Sequencer Track Management

Task: `TODOS.phase-72.72.15.2.2`

The sequencer track management surface is represented by a V2Editor
TimelineVisualizer panel spec and a deterministic request/result model. It edits
`FV2SequencerSequenceSpec` track order and per-track mute state while keeping
editor-only state for expanded groups and soloed tracks.

## Runtime API

- Panel spec: `FV2SequencerTrackManagementPanelSpec`
- Request: `FV2SequencerTrackManagementRequest`
- Managed row: `FV2SequencerManagedTrackRow`
- Result: `FV2SequencerTrackManagementResult`
- Action enum: `EV2SequencerTrackManagementActionType`
- Issue enum: `EV2SequencerTrackManagementIssueType`

`BuildSequencerTrackManagementPanelSpec` targets the `TimelineVisualizer`
surface and requires add/remove, reorder, expand/collapse, mute, solo, icon
controls, and locked-track visibility.

`BuildSequencerTrackManagementRequest` captures one track operation: `AddTrack`,
`RemoveTrack`, `ReorderTrack`, `SetTrackExpanded`, `SetTrackMuted`, or
`SetTrackSolo`.

`ApplySequencerTrackManagementRequest` returns an updated sequence plus the
managed track rows that the editor can render immediately.

## Behavior

- Add inserts a new editable track at `TargetIndex`, selects it, and seeds its
  expanded and solo state from the request.
- Remove deletes an unlocked track, clears its expanded and solo state, and
  selects the neighboring row when available.
- Reorder moves an existing track to a valid row index and regenerates stable
  row indices.
- Expand/collapse stores editor-only group state in `ExpandedTrackIds` and
  `CollapsedGroupTrackIds`.
- Mute writes `bMuted` into the updated sequence and marks the managed row
  inaudible.
- Solo stores editor-only solo state and marks all non-solo rows `bSoloMuted`,
  so the panel can render suppressed tracks distinctly.

The default QA fixture uses `Seq.DataModel.CouncilIntro`, adds
`Track.Cassia.Opacity` at row `1`, reorders `Track.Global.Event`, and solos
`Track.HeroCamera.FOV`.

## QA Inventory

- Add/remove: add a valid track, reject duplicate ids, reject missing ids,
  remove an existing unlocked track, and block locked-track removal.
- Reorder: move an existing row and reject out-of-range target indices.
- Expand/collapse: collapse a track group and expose the collapsed id.
- Mute: mark the track muted, collect `MutedTrackIds`, and set `bAudible=false`.
- Solo: collect `SoloTrackIds`, keep the solo row audible, and mark other rows
  `bSoloMuted`.
- Off-path: missing target tracks report `TrackNotFound`.

`js_repl` Playwright interaction was unavailable in this session and the
affected surface is Unreal editor data rather than browser-rendered UI, so
verification is through UE editor automation and contract gates.

## Verification

- `python3 V2/ue/Tools/check-v2-sequencer-track-management.py`
- `V2.Editor.Sequencer.TrackManagement`
- `python3 V2/ue/Tools/check-v2-editor-module.py`
- `python3 V2/ue/Tools/check-v2-ci-workflow.py`
