Skip to content

Availability rule + no-Animation video export (source-media issue 08) - #19

Merged
lenxism merged 1 commit into
feat/source-media-07-deterministic-video-exportfrom
feat/source-media-08-availability-no-animation-export
Jul 14, 2026
Merged

Availability rule + no-Animation video export (source-media issue 08)#19
lenxism merged 1 commit into
feat/source-media-07-deterministic-video-exportfrom
feat/source-media-08-availability-no-animation-export

Conversation

@lenxism

@lenxism lenxism commented Jul 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • The export panel now obeys 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.
  • With no Animation, the panel's Duration row (and the export itself, enforced by the Exporter since Deterministic video export: frame-accurate Source Video decode (source-media issue 07) #18) uses resolveVideoExportDuration: the video's own duration capped at 30 s, playing from its start.
  • A bound playable-but-undecodable Source Video pins a persistent "codec is not supported in this browser" notice on the export panel (not a transient toast — the condition holds while the file is bound); import and preview stay unaffected.
  • The sourceMediaFacts store→core projection the Exporter kept private moves to state/store.ts so the panel and the Exporter share one seam (red→green in state/source-media.test.ts).
  • CONTEXT.md's Exporter entry already reflects the availability rule (landed with the issue 06 policy module); verified, no remaining "requires an Animation" text.

Stacked on #18 (deterministic video export) — merge that first.

Test plan

  • Full Vitest suite (477), typecheck, lint, build green
  • Browser evidence (.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)
  • 45 s record clamps the panel to "30.0 s · 900 frames"
  • No media + no Animation renders disabled with the hint; canDecode: false renders the persistent codec notice with export blocked and the preview still advancing

Note

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 core via resolveVideoExportAvailability and resolveVideoExportDuration, with bound media projected through shared sourceMediaFacts in state/store.ts (moved out of Exporter.tsx so 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, VideoUnavailableNotice shows 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 sourceMediaFacts projection (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.

…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.
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mockstudio Ready Ready Preview, Comment Jul 14, 2026 4:27am

@lenxism
lenxism merged commit becd893 into feat/source-media-07-deterministic-video-export Jul 14, 2026
4 checks passed
lenxism added a commit that referenced this pull request Jul 14, 2026
…7-08) (#18)

Frame-accurate Source Video decode in the export loop (issue 07) and the core availability rule replacing the 'requires an Animation' gate, with no-Animation export capped at 30 s and the persistent codec notice (issue 08, merged in via #19).
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.

1 participant