feat(webv2): video conditioning media — keyframes, initial video, and trim - #128
Merged
Merged
Conversation
lstein
requested review from
JPPhoto,
Pfannkuchensack and
blessedcoolant
as code owners
August 20, 2026 02:24
lstein
force-pushed
the
feat/video-panel-04-panel
branch
from
August 21, 2026 00:50
f4d236a to
70962c4
Compare
lstein
force-pushed
the
feat/video-panel-05-media
branch
from
August 21, 2026 00:50
11ff3b4 to
c75cc30
Compare
… trim Adds the conditioning inputs to the Video panel (PR 5 of the stack): - Initial Video Frames: first- and last-frame fields (gallery drag, file upload, clear), shown per the capability matrix — both for I2V-A14B and MiniMax H3, first-only for TI2V-5B, neither for T2V. - Initial Video: gallery/upload video intake with start/end trim sliders and a live frame preview (a muted <video> seeked to the active trim bound, the workflow scrubber's trick). The default trim drops the source's final frame, matching the bundled extend templates' end_frame: -2 seam handling. - The mutual exclusion lives in the setters: a first frame clears the initial video and vice versa; whichever is set disables the other's field with an explanation. A last frame combines with either — FLF2V interpolation with a first frame, the extension's destination with a source video. - Dimensions lock while conditioning media is present: the aspect preset and orientation swap disable and the derived-size readout names its source; Wan's FPS control disables in extend mode (the extension inherits the source clip's rate). - Deleted gallery media reconciles out of the panel (images and videos), and the optimistic-rollback registry covers the three new media slots. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…edia Capture this branch's editor/launchpad footprint on top of the re-based parent baseline; platform-ui barrel importer budget raised to the actual count (158). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
lstein
force-pushed
the
feat/video-panel-05-media
branch
from
August 21, 2026 02:37
c75cc30 to
b8c17bd
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JYSJ8DZR42nUUhZagaga2z
…m UI Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JYSJ8DZR42nUUhZagaga2z
The preview's video surface gets a corner grip handle carrying the same gallery-item drag payload as gallery thumbnails, closing the image/video drag parity gap (the video element itself cannot be the handle without breaking native seek-bar scrubbing). Review hardening: the grip is deliberately unfocusable — a focusable activator would let the shell's KeyboardSensor start an invisible Enter/Space drag that Tab then drops on the closest-center droppable (silently replacing e.g. a configured initial video). The source-clip memo comparator now also compares fps, which the new bound thumbnails consume for seek times. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JYSJ8DZR42nUUhZagaga2z
Top-center instead of a corner: every corner belongs to some browser's own video overlays (fullscreen, picture-in-picture). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JYSJ8DZR42nUUhZagaga2z
… grip Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JYSJ8DZR42nUUhZagaga2z
… media - Compile tail-window trim STARTS as negative indices too: a keep-the-tail trim start stayed a positive estimate-based index and landed out of range exactly when the end's negative conversion saved it. - Skip a rollback restore of firstFrameImage/sourceVideo when the rival exclusive slot was claimed while the delete was in flight — the restore was the one write path that could recreate the forbidden pair, which normalization then masked into a silently wrong generation mode. - Run the deleted-media sweep against RAW widget slots: normalizing first let a masked reference survive deletion as a dangling media name. - Validate the source clip's frame rate (1-120) for Wan extension up front: an out-of-range clip enqueued, ran the whole denoise, then died assigning fps to wan_l2v. - Record fps and the source-clip trim bounds in Wan video metadata so parameter recall can restore them (recall reads them in the 08 branch). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LUjUcPHzQCoL7dqgsVzi63
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.
PR 5 of the Video generation panel stack — stacked on #127. All five conditioning modes now work from the panel.
What this adds
Initial Video Frames — first- and last-frame fields (gallery drag, file upload with account-scope-guarded async, clear), rendered per the capability matrix: both for I2V-A14B and MiniMax H3, first-only for TI2V-5B, neither for T2V-A14B.
Initial Video — gallery/upload intake building the source-clip record (frame count estimated from duration × fps — the records store no exact count), start/end trim sliders with a live frame preview (one long-lived muted
<video>seeked viacurrentTime, the frame-scrubber trick — no per-drag-tick refetches), and a 2-frame minimum trim enforced in the setters, the defaults, and validation (the crossfade join consumes a 2-frame tail; a 1-frame trim would fail mid-encode).Estimate-proof trim compilation — a trim end at or near the estimated ceiling compiles as a negative index, which the backend resolves against the clip's real frame count, so "keep to the end" can never land past it on a VFR upload whose estimate overshoots (the bundled templates'
end_frame: -2robustness, preserved). Mid-clip picks stay positive.Mutual exclusion — as designed in the stack's kickoff: first frame ⊻ initial video (each setter clears the other; whichever is set disables the other's field with an explanation), while a last frame combines with either — FLF2V interpolation with a first frame, the extension's destination with a source video.
Dimension/FPS locking — conditioning media disables the aspect preset and orientation swap, and the derived-size readout names its source ("from the first frame"); Wan's FPS control disables in extend mode and the duration readout switches to the source clip's rate (the extension inherits it).
Housekeeping — deleted gallery images/videos reconcile out of the panel (patching only the cleared slots), the optimistic-rollback registry covers the three media slots, and a media value the current model can't consume (persisted from another model, or restored by a rollback) renders as a visible clear-stub instead of blocking invoke invisibly.
Smoke-test follow-ups (added during review)
<video controls>surface itself can't be the handle (drag activation would fight the native seek bar), and the grip is deliberately unfocusable: a focusable activator would let the KeyboardSensor start an invisible Enter/Space drag that Tab then drops on the closest-center droppable — a defect the follow-up's own adversarial review caught, fixed, and pinned with a browser-test assertion.Verification
tsc/oxlint/formatclean; browser perf baseline regenerated.🤖 Generated with Claude Code