feat(metadata): allow up to 3 previews per device type#3593
Draft
feat(metadata): allow up to 3 previews per device type#3593
Conversation
Apple supports up to 3 video previews per device type, but the metadata:push/pull pipeline previously hard-coded a single preview per PreviewType. Lift that limitation by accepting an array of preview configs alongside the existing single-config form (which still works for backwards compat). Sync semantics now mirror screenshots: match by filename + size, upload only changed entries, delete removed ones, and reorder the set to match config order. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
✅ Thank you for adding the changelog entry! |
|
Subscribed to pull request
Generated by CodeMention |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3593 +/- ##
==========================================
+ Coverage 54.26% 54.30% +0.05%
==========================================
Files 821 821
Lines 35327 35383 +56
Branches 7363 7381 +18
==========================================
+ Hits 19166 19212 +46
- Misses 16074 16084 +10
Partials 87 87 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
PreviewTypelimit inmetadata:push/metadata:pull. Apple supports up to 3 video previews per device type; we now sync all of them.ApplePreviewsaccepts either a singleApplePreviewConfig(legacy form, still works) or an array of configs. Existingstore.config.jsonfiles using the single-object form continue to parse and push without changes.metadata:pullmirrors how screenshots are emitted: 0 -> omitted, 1 -> single object (back-compat), 2+ -> array. Order is preserved.metadata:pushnow mirrors the screenshots sync pipeline for previews: match existing previews byfileName+fileSize+ completion state, upload only changed entries, delete removed ones, and reorder viaAppPreviewSet.reorderPreviewsAsyncto match config order. Existing previews with only apreviewFrameTimeCodechange are patched in place.schema/metadata-0.json) updated to allow either form for each preview type.Test plan
yarn jest src/metadata/apple/tasks/__tests__/previews.test.ts— 16 passing, including new cases:previewFrameTimeCode(legacy)yarn jest src/metadata/apple/config— reader/writer tests still pass (63)yarn linton changed files — no errors (only the same pre-existingno-unnecessary-type-assertionwarning that already exists inscreenshots.ts)yarn fmtappliedmetadata:pullagainst an app that has multiple previews per device typemetadata:pushwith both single-object and array forms instore.config.json🤖 Generated with Claude Code