fix(skills): stage SVGs that capture wrote into capture/assets/svgs/ - #3336
Open
miguel-heygen wants to merge 1 commit into
Open
fix(skills): stage SVGs that capture wrote into capture/assets/svgs/#3336miguel-heygen wants to merge 1 commit into
miguel-heygen wants to merge 1 commit into
Conversation
`hyperframes capture` extracts inline SVGs into capture/assets/svgs/, and the
capture manifest advertises them to the agent as `assets/svgs/<name>.svg`, so a
frame names one in `asset_candidates` exactly the way it names a screenshot.
stageAssets searched only capture/{assets,assets/videos,screenshots}, so every
captured SVG resolved to nothing: logged as a non-fatal anomaly, and the frame
404'd the brand mark it had been told to use.
Add the directory to the search list, and cover it with a test that fails
without the fix.
lib/assets.mjs is byte-identical across product-launch-video,
faceless-explainer and pr-to-video, so the fix lands in all three. Folding it
into hyperframes-core/scripts/lib/, where frame-packets-core.mjs already lives,
is a separate change.
Co-Authored-By: anikam13 <22992075+anikam13@users.noreply.github.com>
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
stageAssetsnow searchescapture/assets/svgs/, so an SVG thathyperframes captureextracted can be staged intoassets/like any other captured asset.Why
capturewrites inline SVGs tocapture/assets/svgs/(packages/cli/src/capture/assetDownloader.ts), and the capture manifest advertises them to the agent asassets/svgs/<name>.svg. So a frame names one inasset_candidatesexactly the way it names a screenshot.The staging search list covered
capture/{assets,assets/videos,screenshots}only. Every captured SVG resolved to nothing: logged as a non-fatal anomaly, and the frame 404'd the brand mark it had been told to use. Found running/product-launch-videoend to end.How
One entry added to
captureDirs.lib/assets.mjsis byte-identical acrossproduct-launch-video,faceless-explainerandpr-to-video, so the fix lands in all three.Not covered: the triplication itself. Folding
lib/assets.mjsintohyperframes-core/scripts/lib/, whereframe-packets-core.mjsalready lives, is a separate change and not in this PR.Test plan
New
skills/product-launch-video/scripts/stage-assets.test.mjs, covering both the captured-SVG case and an asset that genuinely exists nowhere (so the anomaly path is still exercised).Verified it fails on the parent commit and passes here.
Manual: a fixture project with a captured SVG, a screenshot and a root capture asset, all three named by one frame.
Before:
✓ staged 2/3 asset(s) into assets/plusasset "brand-mark.svg" named by a frame but not found under capture/After:
✓ staged 3/3 asset(s) into assets/Unit tests added/updated
Manual testing performed
Documentation updated (if applicable)