* fix(core): give the preview bundler the render's expansion budget
The preview bundler inlined every sub-composition mount with only a depth
limit, so a few small files that mount each other many times assembled a
page without bound. The producer's expansion budget now lives in core, and
the bundler charges every mount and the scripts and styles generated for
it to that budget, and checks each file's size before reading it. Studio
preview shows the refusal instead of falling back to the raw page, whose
mounts the browser would expand the same way.
* refactor: drop comments the names already carry
* test(core): give the preview fan-out budget test a 30 s timeout
The flake gate saw it pass 9 of 10 runs under CPU contention, timing out
at the default 5 s. The neighbouring scoper bound tests use 30 s too.
* test(studio): text fields and text edits in a sealed preview
* fix(studio): text fields and text edits work in a sealed preview
* refactor(core): shorter notes on edit-element markup
* refactor(studio): name the sealed text edit's steps so the code audit passes
* refactor(studio): share the text commits' steps and split the put-back check
* refactor(studio): say the sealed text edit's steps in names, not comments
* fix(player): stop the preview freezing when many clips share one long recording
Brings back #7795, which #7978 took out because the HyperFrames desktop
app stopped re-reading a film after a script edit. The next commit keeps
Studio's preview, and every app that embeds it, on main's behaviour.
This reverts commit 33e1a36a39.
* fix(core): the Studio preview, and apps that embed it, keep main's clip handling
With #7795 the player's frame held clips back on every engine, by its
name, and released a clip by setting its src again. Studio's preview
sits in a player frame too, so it took both, and the HyperFrames desktop
app, which embeds that preview, stopped re-reading a film after a script
edit (#7978).
A page carrying Studio's preview mark now takes the same media decisions
as on main: the player's frame counts there on WebKit only, as before,
and a clip is released by load() with its src dropped. A plain player
embed keeps the hold-back and the new release, which is what stops a
film cut from one long recording freezing in Chrome and Firefox.
* test(studio): pasting a preview's own element keeps only markup that runs no code
* fix(studio): paste refuses an element with an event handler or a script link
* fix(studio): paste checks only markup that is not in the saved file
* test(studio): paste refuses code in elements and in links spelled to slip past
* fix(studio): paste refuses scripts, inline frames and links a browser would read as script
* refactor(studio): one owner for markup safety and the saved-or-live copy plumbing
* refactor(studio): keep the saved-markup helpers private to their module
* test(studio): clipboard text cannot mark a pasted clip as saved
* fix(studio): clipboard text cannot mark a pasted clip as saved
* fix(studio): a scene edit swaps in place and a far scene mounts for selection in a sealed preview
* test(studio): a sealed undo that reloads marks its scenes stale first
* fix(studio): a timing drag moves the animation in place in a sealed preview
* fix(studio): a sealed timing drag moves the clip's window and the film length with its tweens
* test(studio): the sealed retime test checks both requests were sent before comparing them
* refactor(studio): the sealed live retime code passes the quality audit
* style(core): format the sealed live retime parser
* fix(core): stop audio automation from crashing the preview renderer
Bent automation segments were booked with setValueCurveAtTime. When the audio thread
is mid-render and a curve's start lands after currentTime but before the next render
quantum, Chromium moves the curve's start to that quantum but leaves its end marker
where it was. The curve then runs past the next event, and if that event sits inside
the same quantum, AudioParamHandler::ValuesForFrameRangeImpl fails
CHECK_GE(fill_to_frame, write_index) and the renderer aborts.
Every segment is now a setValueAtTime at its start and linear ramps through the same
sampled points. A value curve interpolates linearly between its points, so the values
are the same. With no curves left, the refused-curve fallback (emitRamps) and the
curve-overlap tests go.
The set at each segment's start also fixes straight segments ahead of the playhead:
they ramped from the moment playback started instead of holding the first point's
value until the clip reached it.
* test(core): keep the clamping tests, aimed at ramp-only automation
The branch deleted audioFxAutomation.clamping.test.ts, which the no-deletions check refuses.
Its two cases still matter with ramps: a lane booked behind the audio clock finishes at its
last value, and one booked ahead of it books no value curve.
* test(engine): the browser automation test expects the bend the lane draws
The scheduledAt=0.024 case expected a straight 0.5 to 0.7 line after the playhead. That was
the old fallback: Chrome refused the clamped value curves and they were rebuilt as one ramp
per segment, flattening the bend. With ramps through the sampled points the bend is kept,
and the rendered output matches those points within the same 0.000001 tolerance.
Against the scheduler on main the updated case fails by 0.0685 (the flattened bend); here it
passes three runs in a row.
* fix(studio-server): saving history on a drive that stops answering no longer freezes the app
* test(studio-server): read the saved video state through one handle
* test(studio-server): open the silent state file by name only once
* fix(studio): a sealed crop of a turned or scaled layer saves the crop an unsealed one saves
* fix(studio): a sealed style edit shows on the selection at once, so a crop stays where it was let go
* fix(studio): a sealed undo restored in place re-reads the selection, so it shows the undone edit
* fix(core): a sub-composition's script re-run keeps the preview at its playhead
* fix(core): a rebind leaves a root that is not a timeline alone and renders a shortened root once
* fix(core): a redo in a sealed preview puts Studio's edit marks back in place instead of reloading
* fix(core): Studio's motion marks keep the reload; name the edit marks instead of commenting
* fix(core): a restore that needs the reapply script, or drops a motion mark, reloads
* fix(core): a restore waits for the reapply script to start, and any quoting finds its marks
* refactor(core): name the reapplied-mark check instead of commenting it
* fix(core): an in-place undo re-run refuses a reapplied mark until the reapply script started
* test(core): keep the soft-reload refusal test's comment under the line limit
* test(core): a rule of thousands of selectors must split its list a fixed number of times
* fix(core): split a rule's selector list once when rewriting svg id references
* test(core): a scope with thousands of excluded clips must check each element once
* test(core): a page of many svg clips and mounts must scope without a pairwise scan
* fix(core): check svg id scopes against excluded roots in one ancestor walk
* fix(studio): a video with no size of its own keeps its file's size while a lighter copy plays
The preview plays a smaller copy of a large video, and a video the film gives no
size took the copy's size: a 1920x1080 file in a 1080p film drew at 456x257 at
Quality 1/2 and 608x342 at Full, while a render draws it at 1920x1080. While a
copy plays, a rule keyed by the copy's address now gives the video its file's
shown size (its pixels' aspect and turn included), at zero specificity so any
size the film's own CSS sets still wins. Studio's media facts now carry the
pixel aspect and turn, read by the same code the engine uses.
* fix(studio): size only a video the film leaves unsized while its copy plays, as Chromium lays it out
A video whose box is its file's own size (300x150 before the file loads) gets a
plain width and height at that size while a smaller copy plays, through a
preview-only mark and a rule keyed by mark and copy address. A video the film
sizes in either direction is left to the film's CSS, so authored aspect
ratios, box sizing, containment and earlier rules lay out as before. The size
is the original's decoded size when the browser has it, else its facts with
narrow pixels stretching the height as Chromium does. ffprobe is asked for the
side data list, which 4.x also knows, in Studio and in the CLI. A video shown
with object-fit none or scale-down keeps its file.
* fix(studio): an unsized video keeps its size when its copy is made cold behind a still
* test(core): a held video gets its file back when waiting for its copy throws
* fix(core): a copy wait that throws counts as not served, so a held video gets its file back
* test(core): each proxy test resets its own runtime's copy reporting, so none reports into the next
* test(core): the stale-runtime test runs past the report throttle, as a finished test does
* test(core): a framed proxy test's runtime must not report its copies into the next test
* test(core): every proxy test runtime loaded fresh has its copy reporting reset after the test
* fix(studio): a sealed preview turns a rotated element live and saves the turn on its own route
* fix(studio): a sealed rotate regrabbed mid-save cancels to where it started on the frame too
* refactor(studio): keep the gesture handlers file under the size limit
* fix(studio): a scene edit swaps in place and a far scene mounts for selection in a sealed preview
* test(studio): a sealed undo that reloads marks its scenes stale first
* test(core): a selector with many unclosed openers must scan in linear time
* fix(core): scan a selector's quoted, bracketed and comment parts in one linear pass
* refactor(core): split the guarded scan's bracket and escape steps into small helpers
* test(core): page goldens carry the linear selector scan the pages now inline
* test(catalog): mirror the font subset requests the pages' new inline scan text makes
* style(core): wrap the guarded scan's doc comment under 120 columns
* test(studio): a lane drag in a sealed preview restacks and saves its z-index
* fix(studio): a lane drag in a sealed preview saves the stacking change it implies
* test(studio): format the sealed restack test and skip a clip with no stored z-index
* fix(studio): dragging a layer in a sealed preview's layers panel restacks it
* fix(studio): a sealed layer drag restacks nothing from a malformed sibling reply
* chore(studio): drop a doc line the comment check counts against the stack base
* fix(core): a sealed preview's own videos load with CORS, so colour grading and audio effects work
* style(core): fit the sealed media note within the line limit
* chore: release v0.9.71
* chore: release notes for v0.9.71 link the commit after the first cut
* chore: release notes for v0.9.71 add the two commits merged after the review
* fix(core): selector alias values escape '<' so style text can't end early
Attribute values that the compiler copies into selector text, such as an
SVG reference alias's rewritten value or a composition or root id in a
scope selector, are written inside a <style> element. A '<' in one could
close that element early. These values now write '<' as the CSS escape
\3c , which reads back as the same character, so each selector still
matches the same elements.
* test(core): name the '<' escape tests for what the escapes guarantee
The selector escapes write '<' as \3c themselves, so selector text cannot
end its style element even when the CSS is serialized without postcss's
own </style escaping. The test names and comments now say that.
* test(core): pin that selector alias growth is charged while it is built
* fix(core): keep SVG selector alias growth within the compile budget
* fix(core): charge renamed-id selector growth too, and settle to the sheet's real growth
* chore(core): regenerate the selector alias installer and page goldens
* test(core): build the alias growth fixture from compiler-written aliases
* test(core): trip the alias budget only in the selector rewrite
* test(core): rewrite an escaped id with exactly its growth left
* fix(core): charge a renamed id against the token it replaces
* chore(core): regenerate the selector alias installer and page goldens
* test: pages holding an SVG element named template
* fix: read template content only from HTML templates
* test: SVG elements named template in previews, inline mounts and lint
* fix: treat only HTML templates as scenes and inline mounts
* test: scene ids next to SVG elements named template
* fix: take scene ids only from HTML templates
* test(producer): pin that an alias list written into authored HTML never reaches the CSS
* test(producer): keep the alias test's comment within the line limit
* fix(core): read selector aliases only from what the compiler wrote
* test(producer): cover root-only pages and kept templates for authored alias lists
* fix(core): also drop authored alias lists from kept templates and root-only renders
* fix(core): walk each kept template once when dropping authored alias lists
* chore(catalog): mirror the font requests of pages carrying the new alias installer
* fix(core): leave linkedom template content uncopied when dropping authored alias lists
* fix(core): drop authored alias lists inside SVG elements named template
* test(core): count every element the alias cleanup processes
* fix(core): visit each element once when dropping authored alias lists
* chore(core): regenerate the inline selector alias installer
* test(core): refresh page goldens for the regenerated installer
* fix(inspector): the page runtime carries no wide characters, so inspected pages stay one byte a char
* fix(core): the inlined page runtime carries no wide characters either
* fix(core): the wide-character check lives in core, which every runtime build image copies
* test(core): svg attribute selectors rewrite in linear time over many fragment references
* perf(core): index a scope's svg reference aliases once by id and attribute name
* refactor(core): split svg attribute alias lookup out of the selector rewrite
* test(core): refresh page goldens and font mirror for the smaller inlined svg alias code
* test(core): repeated references to one svg symbol rewrite in linear time
* test(core): count alias checks so repeated svg references show quadratic work
* perf(core): index each repeated svg reference alias once
* fix(studio): a sealed preview's timeline shows its text clips' words and look
A sealed preview's timeline rows come from the clip list the film sends, which
carried no text, so its text clips drew as blank rows. The film now sends each
plain text layer's words (up to 200 characters) and look, read by the same rule
Studio uses for its own rows, and the row shows the words as plain text.
* fix(studio): check a sealed clip's text on arrival, cap only what the film sends
Studio now takes a clip's text from the film's message only when every field is
text within the film's limits; otherwise the clip keeps its row without words.
The 200-character limit applies to the film's message alone, so an open
preview's own rows keep their full words as before.
Layering walked the whole host data-variable-values map and the whole render
overrides map for every declarer and every composition id, so many declarers
that emit nothing were never charged to the size budget. Each declarer now
walks only its own declared ids, and a host's overlap with the overrides is
computed once per host. Output is unchanged except that names inherited from
Object.prototype are no longer treated as declared.
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
* test(studio): a sealed preview keeps its loading overlay while media buffers
* fix(studio): a sealed preview's loading overlay waits for its media through the editing port
* fix(studio): Studio never calls a preview ready before its asset check has answered
* refactor(studio): the preview asset wait lives outside the Player component
* refactor(studio): the preview asset wait moves to its own file, out of the Player
* refactor(studio): one asset-wait state; a sealed frame's first check is its own value
* fix(studio): a sealed preview's missing asset answer is asked again, never taken as ready
* fix(studio): a closed preview frees its editing-port client
* style(studio): keep the client comment under the line limit
* fix(studio): a sealed preview keeps Studio's size, move and turn edits after a seek
* fix(studio): a sealed preview reapplies Studio's edits on each frame it seeks or plays to
* fix(studio): build the sealed reapply script from constants, never a caller's value
* fix(studio): a sealed preview reapplies Studio's edits after a redraw at the same time
* fix(studio): serve the seek reapply only into sealed preview documents
* chore(core): shorten the redraw count's doc line
* fix(studio): a script edit re-runs in place in a sealed preview, without a reload
* fix(studio): a sealed timing edit takes the saved clip and film timing along with its soft reload
* test(studio): the sealed timing test checks a soft reload was sent before reading it
* refactor(studio): the sealed soft reload code passes the quality audit without suppressions
* chore(core): core's size budget makes room for the sealed preview's frame-side editing code
Main already measured 1,841,737 bytes packed against a 1,830,000 budget; the sealed soft reload brings it to 1,855,277. Budgets follow SIZE_BUDGET_HEADROOM: ceil(1,855,277 x 1.05) packed, ceil(4,665,659 x 1.05) unpacked.
* fix(core): a sealed timing edit is not skipped when a nested file's root repeats a clip's id
* fix(studio): a value or keyframe edit shows in place in a sealed preview
* fix(studio): a sealed group edit reloads once at its end, and a batch renders its last tween
* refactor(studio): the sealed tween patch path lives in its own module
Keeps useGsapScriptCommits under Studio's 600-line limit, and records the authoredOpacity helpers' move into core as an intended deletion.
* refactor(studio): the sealed tween patch code passes the quality audit without suppressions
Splits the frame-side change parser per kind, the tween lookup and keyframe rebuild into small checks, and the reachable-preview patch out of applyPreviewSync; drops an unused type re-export.
* feat(producer): a render that fails on a missing file says what was gone again
Restores the diagnostic the previous commit on main took out, as it was; the commits after it confine what it looks at.
* test(producer): render failure diagnostics never probe a path from error text or outside the render
* fix(producer): probe a missing path only from a real error, inside the render's folders
describeMissingPath now reads only the path Node set on an ENOENT error, never
one quoted in a message the page can write, and looks on disk only under the
render's temp root, extract cache or work folder. Any other path is named from
its text, so a network share is never contacted and the facts cannot tell an
existing path from a missing one.
* test(producer): a missing-path probe never passes an outside link or climbs above its folder
* fix(producer): walk down from the render's own folder and check each link before following it
* build(producer): give the packed size budget its 5% headroom with the missing-file diagnostic back
* test(core): reading an svg id scope's size never walks its ids
* perf(core): count an svg id scope's renames once, not on every stylesheet it rewrites
* revert(producer): a render that fails on a missing file stops naming what was gone, for now
This reverts commit cfea8cfff5 (#7955). The detail comes back in a follow-up that only looks inside the folders the render owns.
* revert(producer): name the files the #7955 revert removes in the deletion guard
* test(studio): property panel edits in a sealed preview reach the frame's element
* fix(studio): property panel style and attribute edits show in a sealed preview
* fix(studio): keep live property saves synchronous and use the runtime's realm-safe element check
* fix(studio): a sealed edit's put-back never replaces a newer edit
* refactor(studio): keep the sealed save wait private
* fix(studio): check a sealed edit's put-back reply without the helper main removed
* test(producer): a deep or query-stretched composition folder stays within the size limit
* fix(compiler): rebase composition asset paths from the file read and charge what they add
A mount's references now rebase from the project file the render read for
it, so a query or fragment in data-composition-src no longer lengthens every
rebased path. Every byte a rebased reference adds, including the entry file's
own rebase, is charged to the render's expansion budget as it is produced.
* test(producer): close the font embedding block after the rebase
* fix(studio): a sealed preview's element reads are bounded, and a frame with no agent answers at once
* fix(studio): a sealed preview's sources and style names are bounded too, never cut
* test(core): two editing clients of one preview frame each get their replies
* fix(core): each editing client takes its own port, so a sealed preview answers Studio again
* test(core): SVG id renaming shares its table, looks up only named ids, caps and charges what it adds
* fix(core): SVG id renaming shares one table, caps id prefixes and charges the bytes it adds
* test(core): a long namespace is hashed once per mount
* fix(core): sanitize and hash each mount's namespace once, before minting its ids
* test(core): page goldens carry the regenerated selector alias bundle