Skip to content

Add timeline track and clip creation controls - #150

Open
elianguitarra wants to merge 2 commits into
jbilcke-hf:mainfrom
elianguitarra:codex/timeline-create-tracks-clips
Open

Add timeline track and clip creation controls#150
elianguitarra wants to merge 2 commits into
jbilcke-hf:mainfrom
elianguitarra:codex/timeline-create-tracks-clips

Conversation

@elianguitarra

@elianguitarra elianguitarra commented Jun 6, 2026

Copy link
Copy Markdown

Summary

  • Adds timeline store actions for creating typed tracks and clips.
  • Adds a small timeline overlay with a track-type selector, target-track selector, and buttons to add tracks/clips.
  • Creates new clips at the current timeline cursor with valid Clap segment defaults.
  • Enables clip dragging on the timeline with step snapping, zero-time clamping, collision rejection, and compatible cross-track moves.

Details

This is a focused first pass for issue #10. It enables dynamic track creation and dynamic clip creation from the editor UI:

  • New tracks can be created with a selected Clap segment category.
  • New clips can be created on a new track or an existing visible track.
  • Clips created on an existing track use the track category as the source of truth.
  • Timeline metrics are recalculated after track/clip creation and clip drag moves.
  • Dragging a clip horizontally preserves its duration and clamps it at time zero.
  • Dragging a clip onto another track is accepted only when that track has the same category.
  • Drag moves are rejected when they would collide with another clip on the target track.

Verification

  • git diff --check passes.
  • Local Bun runtime found at .tools/bun/bin/bun.exe.
  • bun build packages/timeline/src/index.tsx --outfile=packages/timeline/dist/index.js ... passes.
  • Timeline declaration emission passes when invoking TypeScript directly through bundled Node:
    node ./node_modules/typescript/lib/tsc.js --emitDeclarationOnly --project packages/timeline/tsconfig.types.json
  • bun build packages/app/src/components/core/timeline/index.tsx --outfile=.tools/timeline-component-check.js ... passes.

Patch

Public patch link: https://paste.rs/dMU4V

Related issue

Closes #10

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Timeline - Create new Tracks and Clips

1 participant