feat(timeline): make an audio resize read as the crop it is - #564
Merged
Conversation
An audio pill is the only timeline object that edits hidden media: the other pills hold values over spans, a clip's crop produces a visible clip, but resizing an audio pill crops an invisible file - and nothing on screen said where in that file the edges were, or stopped them at its content. Three additions, all renderer-side: - Ghost extent: the file's waveform is drawn dimmed around the pill, bounded by its own start and end, so the pill reads as a window onto a tape and a resize shows what is still available on each side (audioGhostExtent). - Hard stops: the left edge stops where the in-point would hit the file's start, the right edge where the window would run off its end (audioContentBounds). Null duration = no stop, so a failed probe never freezes a pill. - Readout: while an edge is pulled, a chip pinned to the pointer shows in -> out over the file's length; in 0:00.0 and out = duration are the boundary states, self-evident without copy (which is why this prototype adds no locale keys). The left-edge trim keeps its NLE semantics: the ghost follows the in-point live during the drag.
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
EtienneLescot
marked this pull request as ready for review
September 1, 2026 17:15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Draft — UX prototype, not a finished feature. Opened against
feat/imported-audioso it can be looked at and argued with, not merged as-is.An audio pill is the only timeline object that edits media you cannot see. Every other pill holds a value over a span; a clip's crop produces a clip that is right there on screen. Resizing an audio pill crops an invisible file — and nothing said where in that file the edges had landed, or stopped them at its content. You could pull an edge past the end of the recording and get silence, with no way to know that is what you had done.
Three additions, all renderer-side:
audioGhostExtent). The pill reads as a window onto a tape, and a resize shows what is still available on each side.audioContentBounds). A null duration means no stop — a failed probe must never freeze a pill it cannot measure.in → outover the file's length.0:00.0andout = durationare the boundary states; they are self-evident, which is why this prototype adds no locale keys — nothing to translate until the wording is settled.The left-edge trim keeps its NLE semantics: the ghost follows the in-point live during the drag.
What to argue with
Related issue
Refs #350, and stacked on the audio work in #543. Requires the region model that PR introduced (
placeAudioRegions, the pill lanes).Type of change
Release impact
Desktop impact
Screenshots / video
Not captured. The three additions are only visible mid-drag, so a still frame under-sells them; worth a short capture before this leaves draft.
Testing
npm run test— 2346 passed, 5 skipped, 0 failed (190 files)npx tsc --noEmitandnpx tsc -p tsconfig.test.json --noEmit— cleannpm run lint(Biome) — clean (15 pre-existing warnings in untouched files)audio-placement.test.tscoversaudioGhostExtentandaudioContentBounds, including the null-duration case where the stops must not engage.Not done: any pass in the real app. The behaviour is a drag gesture, so the unit tests pin the maths and nothing else.
🤖 Generated with Claude Code