Commit Graph
1228 Commits
Author SHA1 Message Date
Miguel Ángel 9848647b96 feat(core): a sealed preview's frame runs an in-place text editing session for Studio (#8181)
* 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

* feat(core): a sealed preview's frame runs an in-place text editing session for Studio

* fix(core): a text edit session restores a removed element and ends only for its own port
2026-11-20 22:50:37 +00:00
Michael Wang 12eab05b5a fix(studio-server): refuse a sub-composition preview past the render's limits (#8308)
* 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

* fix(studio-server): refuse a sub-composition preview past the render's limits

The single sub-composition page is served without bundling its mounts, and
the browser runtime then fetches one copy for every data-composition-src
host in it, with no count or byte limit. The page build now charges each
host the browser will fetch to the shared expansion budget, reading each
target's size once, and the route serves the preview's refusal page.

Also moves the preview route's size-limit check above the comment it had
displaced, and uses core's check through a light subpath.

* fix(core): give the preview bundler the render's element cap

#8295 added a 100,000-element cap to the render's expansion budget. The
preview bundler now passes chargeElements to the shared inliner too, so
preview refuses the same compositions.

* fix(studio-server): charge a percent-encoded composition src for the file it serves

The comp page build looked up each data-composition-src by its raw text, so
an encoded spelling such as b%69g.html counted as a mount but was charged
0 bytes, while the preview route decodes it and serves big.html. Resolve
the same decoded path the route serves.

* 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.
2026-11-20 22:09:10 +00:00
Michael Wang 19253b3c86 fix(core): give the preview bundler the render's expansion budget (#8306)
* 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.
2026-11-20 21:22:17 +00:00
Miguel Ángel 6a15e8af9e fix(studio): text fields and text edits work in a sealed preview (#8156)
* 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
2026-11-20 20:53:16 +00:00
Robin Ebers 925a64db39 fix(player): stop films cut from one long recording freezing in apps that embed the player (#8243)
* 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.
2026-11-20 19:48:28 +00:00
Miguel Ángel 7b2c6dc1ad fix(studio): paste refuses an element with an event handler or a script link (#8298)
* 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
2026-11-20 19:06:46 +00:00
Miguel Ángel 31959db985 fix(producer): refuse a render whose mounts copy more than 100,000 elements (#8295)
* test(producer): cap the elements a render's mounts copy

* fix(producer): refuse a render whose mounts copy more than 100,000 elements
2026-11-20 18:49:53 +00:00
Miguel Ángel 6cf81c6689 fix(studio): a timing drag moves the animation in place in a sealed preview (#8163)
* 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
2026-11-20 18:49:29 +00:00
Miguel Ángel e3896cf08e fix(core): stop audio automation from crashing the preview renderer (#8299)
* 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.
2026-11-20 16:36:45 +00:00
Miguel Ángel 88c22a77f4 fix(studio-server): saving history on a drive that stops answering no longer freezes the app (#8294)
* 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
2026-11-20 15:35:09 +00:00
Miguel Ángel a755e3f585 fix(studio): a sealed crop lands where it was dragged (#8279)
* 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
2026-11-20 08:24:02 +00:00
Miguel Ángel 3327209727 fix(core): a sub-composition's script re-run keeps the preview at its playhead (#8276)
* 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
2026-11-20 07:35:20 +00:00
Miguel Ángel 95a8a91b5e fix(core): a redo in a sealed preview puts Studio's edit marks back in place (#8264)
* 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
2026-11-20 07:26:49 +00:00
Miguel Ángel fbbbfe0587 fix(core): split a rule's selector list once when rewriting svg id references (#8275)
* 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
2026-11-20 07:03:21 +00:00
Miguel Ángel 026bff07d6 fix(core): check svg id scopes against excluded roots in one ancestor walk (#8273)
* 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
2026-11-20 06:20:03 +00:00
Miguel Ángel ce0932e047 fix(studio): a video with no size of its own keeps its file's size while a lighter copy plays (#8233)
* 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
2026-11-20 05:57:26 +00:00
Miguel Ángel fdc7d676c4 fix(studio): a sealed preview turns a rotated element live and saves the turn on its own route (#8271)
* 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
2026-11-20 05:50:24 +00:00
Miguel Ángel 4fd96e3533 fix(studio): a sealed undo or redo of a keyframe edit re-runs in place instead of reloading (#8272) 2026-11-20 05:24:28 +00:00
Miguel Ángel 012f26350e fix(studio): a scene edit swaps in place and a far scene mounts for selection in a sealed preview (#8162)
* 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
2026-11-20 01:53:42 +00:00
Miguel Ángel 8324e80558 fix(core): scan a selector's quoted, bracketed and comment parts in one linear pass (#8260)
* 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
2026-11-20 01:53:27 +00:00
Miguel Ángel 9c3bfe150e fix(studio): dragging a layer in a sealed preview's layers panel restacks it (#8209)
* 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
2026-11-20 00:36:09 +00:00
Miguel Ángel 7b3eda1908 fix(core): a sealed preview's own videos load with CORS, so colour grading and audio effects work (#8189)
* 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
2026-11-19 23:19:23 +00:00
Michael Wang 9e78353670 fix(core): attribute-value escapes write '<' so style text can't end early (#8250)
* 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.
2026-11-19 19:27:40 +00:00
Miguel Ángel 6bd0b5d870 fix(core): keep SVG selector alias growth within the compile budget (#8238)
* 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
2026-11-19 16:15:41 +00:00
Miguel Ángel d106f9c8c7 fix: stop crashing on SVG elements named template (#8241)
* 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
2026-11-19 12:27:21 +00:00
Miguel Ángel def770ed98 fix(core): read selector aliases only from what the compiler wrote (#8240)
* 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
2026-11-19 11:27:15 +00:00
Miguel Ángel 01a5e948be fix(core): page runtimes carry no wide characters, so pages stay one byte a char (#8239)
* 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
2026-11-19 10:18:16 +00:00
Miguel Ángel c672ef0e5d perf(core): rewrite svg attribute selectors in linear time over many references (#8216)
* 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
2026-11-19 03:55:27 +00:00
Miguel Ángel 1cf98cf892 fix(studio): a sealed preview's timeline shows its text clips' words and look (#8228)
* 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.
2026-11-19 03:51:53 +00:00
Vance IngallsandClaude Sonnet 5.5 12b83e9283 fix(compiler): composition variable layering costs time linear in the input (#8226)
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>
2026-11-18 17:25:54 -08:00
Miguel Ángel 81f89b8150 fix(studio): a sealed preview shows its loading overlay while media still loads (#8184)
* 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
2026-11-18 22:57:06 +00:00
Miguel Ángel 1929f299b4 fix(studio): a sealed preview keeps Studio's size, move and turn edits after a seek (#8212)
* 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
2026-11-18 22:17:54 +00:00
Miguel Ángel b8bb8b3803 fix(studio): a script edit re-runs in place in a sealed preview, without a reload (#8158)
* 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
2026-11-18 21:41:54 +00:00
Miguel Ángel e9eac3f9d4 fix(core): a video with no size of its own keeps its file's size in the preview (#8211) 2026-11-18 20:17:21 +00:00
Miguel Ángel 284b28bfce test(core): font lookup tests read only their own fixture fonts, not the machine's (#8200) 2026-11-18 18:58:07 +00:00
Miguel Ángel a1ee40094d fix(studio): a value or keyframe edit shows in place in a sealed preview (#8151)
* 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.
2026-11-18 15:33:50 +00:00
Miguel Ángel a82ee10c68 feat(producer): a failed render says which file was gone again, looking only in its own folders (#8168)
* 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
2026-11-18 13:41:39 +00:00
Miguel Ángel 67410727e6 perf(core): count an svg id scope's renames once, not on every stylesheet it rewrites (#8182)
* 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
2026-11-18 13:07:42 +00:00
Miguel Ángel 75992d82ad fix(studio): a 3D slider drag previews live in a sealed preview (#8148) 2026-11-18 12:12:09 +00:00
Miguel Ángel 94d06663b1 revert(producer): a render that fails on a missing file stops naming what was gone, for now (#8174)
* 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
2026-11-18 11:34:57 +00:00
Miguel Ángel b525686e7e fix(studio): property panel style and attribute edits show in a sealed preview (#8149)
* 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
2026-11-18 10:11:16 +00:00
Miguel Ángel bb55c1ea7e fix(compiler): rebase composition asset paths from the file read and charge what they add (#8166)
* 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
2026-11-18 09:50:35 +00:00
Miguel Ángel e623031f3a fix(studio): a sealed preview's element reads are bounded, and a frame with no agent answers at once (#8055)
* 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
2026-11-18 08:36:06 +00:00
Miguel Ángel e95cdf7d76 fix(core): each editing client takes its own port, so a sealed preview answers Studio again (#8154)
* 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
2026-11-18 08:34:12 +00:00
Miguel Ángel 5bd3e3242c fix(core): keep SVG id renaming linear in the page size and within the render size limit (#8147)
* 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
2026-11-18 08:31:56 +00:00
Miguel Ángel 12a2f83c49 fix(core): keep the styles of a composition whose id contains $ patterns (#8141)
* test(core): a composition id with $ patterns scopes as text, not as a replace pattern

* fix(core): scoping writes a composition id's $ as text, at compile time and in the runtime script
2026-11-18 06:53:30 +00:00
Vance IngallsandClaude Sonnet 5.5 c6e3f30bea fix(compiler): bound composition variable styles and variable media sources (#8144)
* fix(compiler): bound composition variable styles and variable media sources

Charge every compile-time composition-variable rule against a size budget
and stop emitting once it is exceeded. The render compiler shares one
CompositionExpansionBudget between mounts, variable styles and variable
media sources; other callers get a 32 MiB core default. Host
data-variable-values are now parsed once per host instead of once per
declarer. Bound media sources over 8 KiB or holding control characters are
refused, and every src written is charged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(producer): trim bound media sources and name the variable budgets in errors

Bind the trimmed value, as a browser does, so a trailing newline no longer
makes compile-time probing disagree with the runtime; refuse only interior
control characters or values over 8 KiB, and log the refusal as a warning.
The generated-bytes error now says which of variable styles or variable
media sources overran. Adds a with-mount test for the after-inline budget.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(producer): trim comments added to htmlCompiler to keep its comment share down

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-17 23:11:40 -08:00
Miguel Ángel cfea8cfff5 fix(producer): a render that fails on a missing file says what was gone (#7955)
* fix(producer): a render that fails on a missing file says what was gone

* fix(producer): a failed look at what was missing never hides the render's own error

The missing-path probe now returns nothing when it throws, reads through at most four links and only
links that point into the temp root or the cache folder, names a removed folder by its own name, treats
a custom cache folder as the cache, and skips programs that could not start.

* refactor(producer): split the missing-path link walk into its own step
2026-11-18 06:36:23 +00:00
Miguel Ángel 01331014d8 fix(core): a clip that stops downloading no longer holds the preview in Buffering forever (#8138)
* fix(core): a clip that stops downloading no longer holds the preview in Buffering forever

* fix(core): the stuck-clip bound also holds in a hidden tab
2026-11-18 06:15:41 +00:00
andybpan ebddc42486 fix(media): keep each index.md row on one line and show control characters as escapes (#8127)
The .media/index.md generators (figma's mediaIndex.ts and media-use's
index-gen.mjs) turned only CR and LF in a record into a space. Vertical
tab, form feed, NEL, U+2028 and U+2029 still ended a row early for
readers that treat them as line breaks, and other control characters
(NUL, ESC, BEL, C1) reached the file as raw bytes.

- Every line-ending character now becomes a space.
- Other control characters are written as visible \xNN escapes through
  the existing terminalText helper; tabs stay as they are.
- Both generators and the skill copy change together, so their output
  stays byte-identical.
2026-11-18 03:05:02 +00:00