Skip to content

Precise clip times: HH:MM:SS:mmm fields, nudges, and re-trimming - #51

Merged
davior merged 1 commit into
mainfrom
claude/gallant-cori-05tugj
Oct 28, 2026
Merged

davior merged 1 commit into
mainfrom
claude/gallant-cori-05tugj

Conversation

@davior

@davior davior commented Oct 28, 2026

Copy link
Copy Markdown
Owner

What

  • Exact timecodes. The Clip tab's In and Out are now four numeric fields each: HH : MM : SS : mmm. Typing 90 in seconds counts as 1:30, and the field tidies itself up once you leave it.
  • Nudges. Each point has −1s / −10ms / +10ms / +1s buttons, plus set to playhead (keeps the "Set in point" / "Set out point" names) and play from here. Nudges stop at 0 and at the end of the media.
  • Re-trimming an existing clip.
    • From the parent: a pencil ("Edit times") on each live-clip row opens the same form inline.
    • From the clip itself: a new Trim tab on a clip's own page. A clip plays its parent's file, so the playhead is already measured on the parent's timeline.
  • Backend: new PUT /api/assets/{clip_id}/range.
    • Checks the range against the parent with the same rules as create_clip (shared _check_range).
    • Returns 400 not_a_clip for anything that isn't a live clip, and 409 while a promote is running.
    • Updates duration_seconds.
    • Renames a default …(m:ss–m:ss) name to the new range. A name the user chose is left alone.
  • Clip ranges are shown as HH:MM:SS:mmm in the clip rows and in the Info tab.

Tests

  • Backend: 8 new tests in test_clips_api.py. Full suite: 1405 passed.
  • Frontend: tests for timecode parsing and formatting, typed and nudged clip creation, the nudge clamp, re-trimming from a row, and the Trim tab. Full suite: 438 passed. npm run build is clean.

Generated by Claude Code

- In and out points are typed as HH:MM:SS:mmm, with ±1s / ±10ms nudge
  buttons, set-to-playhead and play-from buttons beside each.
- A live clip can be re-trimmed after it is saved, from its parent's Clip
  tab ("Edit times" on the row) or from the clip's own new Trim tab.
- New PUT /api/assets/{clip_id}/range validates against the parent the
  same way creating a clip does, refuses while a promote is running, and
  renames a default "(m:ss–m:ss)" name to the new range.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD6GoCf1ZjN16BxcEu2
@davior
davior marked this pull request as ready for review October 28, 2026 23:06
@davior
davior merged commit 4c67d07 into main Oct 28, 2026
3 checks passed
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.

2 participants