Skip to content

Add timeline track and clip creation controls - #141

Open
Egoistian wants to merge 1 commit into
jbilcke-hf:mainfrom
Egoistian:codex/clapper-10-local-spike
Open

Add timeline track and clip creation controls#141
Egoistian wants to merge 1 commit into
jbilcke-hf:mainfrom
Egoistian:codex/clapper-10-local-spike

Conversation

@Egoistian

Copy link
Copy Markdown

Summary

  • add optional ClapTrack.category metadata and timeline store actions for creating tracks, setting empty-track categories, creating typed clips, and moving clips only to compatible tracks
  • add left-track controls for + Track, category selection, and + Clip
  • preserve explicit startTimeInMs when adding segments and keep track occupancy in sync when clips are assigned

Validation

  • npx --yes bun@latest run --cwd packages/clap build
  • npx --yes bun@latest run --cwd packages/timeline build
  • git diff --check
  • local browser QA harness: verified visible track controls, locked dropdown and store guard for occupied tracks, category change on an empty track, typed clip creation, and appending a new track

Notes

I could not complete packages/app build locally because its prepare step expects ../../node_modules/mediainfo.js/dist/MediaInfoModule.wasm, while the local Bun install layout placed that dependency under node_modules/.bun/.... The failure occurs before app compilation and appears unrelated to this timeline patch.

@MyTH-zyxeon

Copy link
Copy Markdown

Review assist for #10 / Boss bounty:

I checked this diff because it is one of the still-unreviewed timeline authoring attempts. The scope is useful and focused: it adds typed track creation, typed clip creation, track-category metadata, and compatible cross-track moves without introducing another broad app rewrite.

Acceptance points I would verify before choosing a canonical PR:

  • Track identity: createTrack({ track: tracks.length }) can collide with sparse/deleted/reordered track arrays unless the app guarantees dense ids forever. A regression around delete/reorder/add would make this safer.
  • Occupancy/category state: moving a segment updates occupied flags, but category changes are blocked only by occupied; tests should cover moving the last clip away, then changing the newly empty track type.
  • Pointer math: drag-to-track uses canvas bounds plus scrollX/scrollY, leftBarTrackScaleWidth, and topBarTimeScaleHeight; a focused fixture for scroll/zoom/camera-offset behavior would reduce merge risk.
  • Rejected moves: moveSegmentTo returns false on incompatible track type, but the UI path does not appear to surface why the drag was rejected. Maintainers may want a visible snap-back or disabled target state.
  • UI integration: the absolute TrackControlsOverlay sits inside the timeline root at zIndex: 20; check it does not cover existing left-bar controls, time scale, or pointer interaction on narrow layouts.
  • Build evidence: the package builds listed in the PR body are useful, but the app-level mediainfo.js prepare blocker should be separated from timeline acceptance so maintainers know exactly what remains unrelated.

This looks like a plausible timeline-native base or comparison point for #10, especially if the above cases are backed by store-level tests and one browser smoke path. It should be compared against #134/#136/#139/#140/#142/#145 before merging to avoid picking overlapping implementations.

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.

3 participants