Availability rule + no-Animation video export (source-media issue 08) - #19
Merged
Conversation
…dia issue 08) The export panel now obeys core's availability verdict instead of its own "requires an Animation" gate: video export is offered with an Animation OR a decodable bound Source Video, shows core's resolved duration (the video's own length capped at 30 s when no Animation exists), and pins a persistent "codec not supported in this browser" notice when the bound video is preview-only. The store<->core facts projection the Exporter kept private is promoted to state/ so panel and Exporter share one seam.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
lenxism
merged commit Jul 14, 2026
becd893
into
feat/source-media-07-deterministic-video-export
4 checks passed
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
core's availability verdict (resolveVideoExportAvailability) instead of its UI-local "requires an Animation" gate: video export is offered when the document has an Animation OR the bound Source Media is a decodable Source Video, and disabled otherwise.resolveVideoExportDuration: the video's own duration capped at 30 s, playing from its start.sourceMediaFactsstore→core projection the Exporter kept private moves tostate/store.tsso the panel and the Exporter share one seam (red→green instate/source-media.test.ts).Stacked on #18 (deterministic video export) — merge that first.
Test plan
.scratch/source-media/evidence/08/, system Chrome): bare 8 s frame-counter clip with no Animation exports an 8.000 s MP4, no audio, frames 0/1/60/150/238/239 exactly matching source frames (plays from start)canDecode: falserenders the persistent codec notice with export blocked and the preview still advancingNote
Medium Risk
Changes user-visible export eligibility and messaging for video; logic is delegated to tested core policy but mis-synced facts would block or allow exports incorrectly.
Overview
The export panel stops gating video on a local “has Animation” check and instead uses
coreviaresolveVideoExportAvailabilityandresolveVideoExportDuration, with bound media projected through sharedsourceMediaFactsinstate/store.ts(moved out ofExporter.tsxso the panel and exporter stay aligned).Video export is enabled when the document has an Animation or a decodable bound Source Video; duration and frame counts follow
resolveVideoExportDuration(including source-only clips capped at 30s). When export is blocked,VideoUnavailableNoticeshows either a hint to import video or add motion (nothing-to-export) or a persistent amber codec warning for preview-only undecodable video (undecodable-video), while import/preview stay available.Unit tests cover the
sourceMediaFactsprojection (null, image, video,canDecode: false).Reviewed by Cursor Bugbot for commit 113d25c. Bugbot is set up for automated code reviews on this repo. Configure here.