feat(videos): swap-clip drawer — pick a different clip in a beat slot#458
Merged
Conversation
The backend op (set-clip-asset) and the frontend op type already
shipped. This wires up the UI:
- New ClipPickerPanel renders every alias in spec.manifest as a
thumbnail-tile grid. Current alias is sorted first with a "Current"
badge. Click a different one → dispatch set-clip-asset → drawer
closes. Existing trim values on the slot are preserved.
- ClipSlotWidget header gets a "↔ Swap" button next to "✏ Edit trim".
Both stop propagation so the card's catch-all onClick (which still
opens trim) doesn't double-fire.
- WidgetRef union extended with a clip-picker variant; EditDrawer
routes to the new panel.
Tested on chc/run-001 Field-footage clip 1:
- Swap button opens picker (6 swap buttons total — 3 scene-clip +
3 product-beat slots)
- 8 manifest aliases listed as 2-column grid with video thumbnails
- Current alias has the "Current" badge
- Clicking @mobile-learn swaps the slot's asset; card header
updates from @field-group-around-woman to @mobile-learn
Future work (not in this PR):
- Browse the wider video library (more than the 8 manifest entries)
and auto-add to manifest on pick.
- Hover-preview that plays the muted clip.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
@jjackson: "I want to be able to switch a video to a different one in the template library."
The backend op (
set-clip-asset) and the frontend op type already shipped — this wires up the UI to dispatch it.What changed
ClipPickerPanelrenders every alias inspec.manifestas a thumbnail-tile grid. Current alias is sorted first with a "Current" badge. Click a different one → dispatchset-clip-asset→ drawer closes. Existing trim values on the slot are preserved.ClipSlotWidgetheader gets a↔ Swapbutton next to✏ Edit trim. Both stop propagation so the card's catch-all onClick (which still opens trim) doesn't double-fire.WidgetRefunion extended with aclip-pickervariant;EditDrawerroutes to the new panel.Tested
On chc/run-001 Field-footage clip 1:
@mobile-learn→ first slot's header updates from@field-group-around-womanto@mobile-learn(dispatched as aset-clip-assetop into the dirty buffer; saves with the next batch like any other edit)Future
mobile-screencast/web-screencast/field-broll; today's picker is limited to whatever a particular spec already references.🤖 Generated with Claude Code