Skip to content

fix(skills): stage SVGs that capture wrote into capture/assets/svgs/ - #3336

Open
miguel-heygen wants to merge 1 commit into
mainfrom
fix/stage-captured-svgs
Open

fix(skills): stage SVGs that capture wrote into capture/assets/svgs/#3336
miguel-heygen wants to merge 1 commit into
mainfrom
fix/stage-captured-svgs

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

What

stageAssets now searches capture/assets/svgs/, so an SVG that hyperframes capture extracted can be staged into assets/ like any other captured asset.

Why

capture writes inline SVGs to capture/assets/svgs/ (packages/cli/src/capture/assetDownloader.ts), 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.

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-video end to end.

How

One entry added to captureDirs.

lib/assets.mjs is byte-identical across product-launch-video, faceless-explainer and pr-to-video, so the fix lands in all three.

Not covered: the triplication itself. Folding lib/assets.mjs into hyperframes-core/scripts/lib/, where frame-packets-core.mjs already 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/ plus asset "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)

`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>
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