# Sequencer Keyframe Editing

Task: `TODOS.phase-72.72.15.2.3`

The sequencer keyframe editing surface is represented by a V2Editor
TimelineVisualizer panel spec and a deterministic request/result model. It edits
`FV2SequencerTrackSpec::Keyframes` while preserving editor-only selection,
clipboard, and curve handle state for the timeline UI.

## Runtime API

- Panel spec: `FV2SequencerKeyframeEditPanelSpec`
- Request: `FV2SequencerKeyframeEditRequest`
- Editable row: `FV2SequencerEditableKeyframe`
- Result: `FV2SequencerKeyframeEditResult`
- Action enum: `EV2SequencerKeyframeEditActionType`
- Issue enum: `EV2SequencerKeyframeEditIssueType`

`BuildSequencerKeyframeEditPanelSpec` targets the `TimelineVisualizer` surface
and requires add/delete, move, multi-select, copy/paste, curve editor, preset
handle, and icon-button support.

`ApplySequencerKeyframeEditRequest` returns an updated sequence plus editable
keyframe rows, selected ids, clipboard contents, curve editor rows, and
validation issues.

## Behavior

- Add writes a new typed keyframe at `TargetFrame`, computes `TimeSeconds` from
  sequence tick resolution, sorts the track, and selects the new keyframe.
- Delete removes one or more keyframes and clears deleted ids from selection.
- Move updates one keyframe to `TargetFrame` or moves a multi-selection by
  `FrameDelta`, then re-sorts the track.
- Multi-select replaces or extends `SelectedKeyframeIds`.
- Copy fills `ClipboardKeyframes` from selected keyframe ids.
- Paste anchors clipboard frames at `TargetFrame`, generates stable pasted ids,
  inserts the copies, and selects the pasted keyframes.
- Curve edits update `InterpolationId` and expose `ArriveTangent` /
  `LeaveTangent` on selected curve-editor rows.

The default QA fixture uses `Seq.DataModel.CouncilIntro`, adds
`Key.Cassia.Transform.045`, moves `Key.HeroCamera.FOV.120`, multi-selects two
Cassia transform keys, pastes at frame `45`, and applies
`Interpolation.Custom.CameraEase`.

## QA Inventory

- Add/delete/move: add a valid keyframe, reject duplicate ids, delete a
  keyframe, move an existing keyframe, and reject out-of-range moves.
- Multi-select: select two keyframes and verify row selection state.
- Copy/paste: copy selected keyframes, paste clipboard contents at a new anchor
  frame, generate pasted ids, and select pasted rows.
- Curve editor: apply custom interpolation and tangent handles to a selected
  curve-editable keyframe.
- Off-path: empty clipboard paste reports `InvalidClipboard`, and missing 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-keyframe-editing.py`
- `V2.Editor.Sequencer.KeyframeEditing`
- `python3 V2/ue/Tools/check-v2-editor-module.py`
- `python3 V2/ue/Tools/check-v2-ci-workflow.py`
