feat: catch html5 JS syntax errors in validate and correct seek/merge docs#5
Merged
Merged
Conversation
… docs Validate now runs each html5 asset.js string through new Function() to catch syntax errors offline — a JS error renders a completely blank clip with no render error, so this is the only feedback loop before spending credits. Skill docs corrected with findings from real renders: - onUpdate callbacks do not fire under seek. The harness seeks the GSAP timeline to each frame without playing through, so DOM mutations in onUpdate (textContent, innerHTML) never appear. Replaced the count-up snippet with a bake-and-reveal pattern: final values in HTML, animate opacity/transform only. - Merge fields resolve in html5 css and js, not just html. Added an Edit-wide merge fields section to agent-core.md covering rules (UPPER_SNAKE_CASE, case sensitive, whitespace ignored), where they resolve (every string in the Edit), when to use merge vs baking at generation time, and the ?data=true&merged=true status check. - Documented silent blank-frame failure in troubleshooting and html5 common mistakes: JS errors produce blank clips with status done.
b5f714d to
c42a19a
Compare
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 changed
Validate now checks html5 JS syntax offline. Each
asset.jsstring is passed throughnew Function()duringshotstack validate. A syntax error renders a completely blank clip with no render error (status: "done", no error field) — this is the only feedback loop before spending credits.Skill docs corrected with findings from real renders:
onUpdatedoes not fire under seek. The harness seeks the GSAP timeline to each frame timestamp without playing through, so DOM mutations inonUpdatecallbacks (textContent,innerHTML, class swaps) never appear in the rendered video. The count-up snippet — the most referenced data-display pattern — usedonUpdateto mutatetextContentand produced$0in every frame. Replaced with a bake-and-reveal pattern: final values in HTML, animate opacity/transform only.html5cssandjs, not justhtml. Added an Edit-wide merge fields section toagent-core.mdcovering rules (UPPER_SNAKE_CASE, case sensitive, whitespace inside braces ignored), where they resolve (every string value in the Edit), when to use merge vs baking at generation time, and the?data=true&merged=truestatus check.troubleshooting.mdandhtml5.mdcommon mistakes: JS syntax or runtime errors produce blank clips withstatus: "done"and no error.How to verify
The
)varpattern that caused the original blank-frame bug is caught: