Repository navigation
fix(cli): retain metadata when Lottie previews exceed the size limit - #5307
Merged
jrusso1020 merged 1 commit intoOct 24, 2026
Merged
Conversation
jrusso1020
approved these changes
Oct 24, 2026
jrusso1020
left a comment
Collaborator
There was a problem hiding this comment.
Main still has if (fileSize > 2_000_000) continue; in renderLottiePreviews, which skips the manifest push along with the thumbnail, so saved Lottie files between 2 MB and the 10 MiB save limit vanish from lottie-manifest.json. The change scopes the size guard to the preview block only, the manifest entry is pushed without preview as the type already allows, and the budget breaks behave as before. The regression builds a real >2 MB embedded-image animation, asserts no page is opened, and checks the full manifest entry. The diff is mostly re-indentation; the logic change is the guard inversion.
Need: yes · Size: ok · Reuse: nothing to reuse · Simpler: already minimal
— Rames
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.
What
Keep metadata for saved Lottie animations larger than the 2 MB thumbnail limit in
extracted/lottie-manifest.json.Why
A valid Lottie file can embed a raster image and exceed the thumbnail limit while staying inside capture's 10 MiB validation limit. Capture saves the animation, but the preview size guard skips the entire file, so its dimensions, duration and file path disappear from the manifest.
Related work
#3811 established the existing capture validation and preview policy. #5293 fixes content deduplication in the save step; this correction concerns metadata after saving and can land independently. No matching open issue or competing implementation was found.
How
Apply the size guard only around thumbnail generation, then append the normal metadata entry with no
previewproperty. The size limit, capture budgets and preview request policy keep their existing behavior.Test plan
GitHub CI is passing, including Windows render. The later successful run supersedes the earlier dependency-installation timeout.