Skip to content

Add point-driven automation clip editing utilities#369

Open
smcga wants to merge 2 commits intomainfrom
codex/make-automation-clips-editable-in-timeline
Open

Add point-driven automation clip editing utilities#369
smcga wants to merge 2 commits intomainfrom
codex/make-automation-clips-editable-in-timeline

Conversation

@smcga
Copy link
Copy Markdown
Owner

@smcga smcga commented Apr 28, 2026

Motivation

  • Provide a deterministic, point-driven model for editable automation clips so the timeline UI can implement direct-manipulation editing (add/remove/move points), per-segment curve type and tension, snapping, and slide-mode temporal transforms.

Description

  • Add src/editor/automationClip.ts which defines AutomationClip, ControlPoint, SegmentMeta, CurveType, and implements helpers: createAutomationClip, snapTime, insertPoint, removePoint, movePoint (with slide-mode), setSegmentTension, and setSegmentCurveType with clamping and segment metadata normalization.
  • Enforce a minimum of two control points (MIN_POINTS) and clamp point values/tension ranges to valid bounds in the model operations.
  • Add unit tests in src/editor/automationClip.test.ts covering grid snapping, insertion/removal with minimum-point safety, move behavior with and without slide mode, and per-segment tension/curve-type updates.
  • Update README.md timeline/editor notes to document the new automation-clip editing foundations for UI integration.

Testing

  • Ran npm test -- src/editor/automationClip.test.ts src/editor/EditorRoot.test.ts and all tests passed.
  • Test run summary: 2 test files executed and 67 tests passed (no failures).

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
codexperimental Ready Ready Preview, Comment Apr 28, 2026 10:56pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant