Commit Graph
7657 Commits
Author SHA1 Message Date
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 5f024e34e2 fix(studio): thumbnails of compositions with no code of their own load in under a second (#8316)
* fix(studio): thumbnails of compositions with no code of their own load in under a second

Both thumbnail paths (the CLI's preview server and Studio's dev server) waited up to 5 s for
a GSAP timeline before shooting a card. A composition with no script never registers one, so
each of its cards took the full 5 s, and the route shoots one card at a time, so the third
card came at about 16 s.

The wait cannot simply go: a composition may register its timeline late, in a timer or a
load handler, after the runtime is ready, and shooting it then shows the wrong moment.

So the preview route now marks the page a thumbnail loads when nothing on it can register a
timeline: no script but Studio's own (the runtime, GSAP core, an import map, the registry
line), no inline event handler, frame, template or child composition loaded at run time, and
no Studio motion. A marked page is shot once the runtime is ready. Every other page is held
for its timeline exactly as before.

The rule lives once, in studio-server, and both thumbnail paths wait on it.

fails without the fix: "is skipped for a composition with no code of its own" and "holds for
a composition whose script registers its timeline late"
(packages/studio-server/src/routes/preview.thumbnailMark.test.ts), "thumbnailSeekReadyInBrowser"
(packages/studio-server/src/helpers/screenshotClip.test.ts), "hasAuthoredCode"
(packages/studio-server/src/helpers/authoredCode.test.ts), and "holds a thumbnail's shot on
the thumbnail readiness rule" (packages/cli/src/server/studioServer.test.ts and
packages/studio/vite.browser.test.ts).

* test(studio-server): the thumbnail mark test builds its page from elements, not parsed text

The test read the served page back through DOMParser and innerHTML to hand its metas to the
readiness rule, which code scanning reports as DOM text reinterpreted as HTML. It now finds
the served page's meta tags with the compiler's own tag scanner and creates each one as an
element, so no text is parsed as markup.

Also adds a row to the code check's table: a script inside an inline SVG counts as code.

fails without the fix: "is skipped for a composition with no code of its own"
(packages/studio-server/src/routes/preview.thumbnailMark.test.ts) still fails when the route
writes no mark.
2026-11-20 21:19:26 +00:00
Miguel Ángel 8d5863cfb2 test(studio): a sealed preview's reload waits for a resize on its stand-in to end (#8222)
* 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(studio): a reload waits for a drag to end in a sealed preview

* refactor(studio): manual edit gesture tracking lives in its own module

* test(studio): a sealed preview's reload waits for a resize on its stand-in to end
2026-11-20 21:15:14 +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
Michael Wang 39fa5ae9d2 fix(cli): share confirms an existing review before changing it in a received folder (#8315)
* fix(cli): share confirms an existing review before changing it in a received folder

* fix(cli): share asks before changing a review while a share is still in progress
2026-11-20 20:38:03 +00:00
James RussoandClaude Fable 5.2 5e1008124b chore(cli): retire nano-banana-2 and gpt-image-2.5 from media-use generate (#8314)
* chore(cli): retire nano-banana-2 and gpt-image-2.5 from media-use generate

Both have a newer model that replaces them. Asking for either now stops before any
request is sent and names the model to use instead. The price table, the --model help
and the media-use skill reference no longer list them.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* chore(cli): drop a redundant comment

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* fix(cli): check a media-use generate request before pricing it

A request the command would refuse is refused with its own message, whether or
not --max-credits is given.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 20:28:52 +00:00
Miguel Ángel aa05198583 fix(studio): a reload waits for a drag to end in a sealed preview (#8164)
* 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(studio): a reload waits for a drag to end in a sealed preview

* refactor(studio): manual edit gesture tracking lives in its own module
2026-11-20 20:13:38 +00:00
Michael Wang d3d3350d41 fix(share): an unconfirmed share only finishes a first share it can recognize (#8313)
A folder's review record can name a project with no finished share. When
no host confirmed that review, shareForReview now goes on only if the
project is as an unfinished first share leaves it: no ready version, its
link never turned off, and private or already set to this share's
audience. Anything else is refused with review_project_changed before
any audience change, link reopening or upload, and the record stays as
it is.
2026-11-20 20:09:04 +00:00
Ice cola d8d45f481b docs(cli): pin npx in unattended runs and verify the render (#7467)
In a job with no TTY nothing prompts: the CLI exits 2 and names `--yes`,
and `npx` skips its own "Ok to proceed?" whenever stdin is not a
terminal or CI is detected. What an unversioned `npx hyperframes` still
does is fetch the latest release on every cold cache, so two jobs that
start together can collide in npm's cache (`_cacache` for the fetch,
`_npx` for the install: EEXIST / ENOTEMPTY, a retry succeeds), and a
new release silently changes what the same command renders.

The hyperframes-cli skill now routes no-TTY jobs to the project's
scaffolded `npm run` scripts (each already `npx --yes hyperframes@X.Y.Z`)
or a pinned `npx --yes`, never bare `npx hyperframes`, and the loop's
render step checks `data-width`/`data-height` as well as `data-duration`.
The new references/unattended.md holds the detail and says why
interactive flows (`update`, reverse-any-video) float to `@latest` while
unattended jobs pin. The CLI reference page gets the matching paragraph.
The SKILL.md budget goes up 256 B per the file's +N-comment pattern, and
skills-manifest.json is regenerated.
2026-11-20 19:48:29 +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 2161b505bd test(producer): outside-file render tests get a time budget that fits their ffmpeg work (#8307) 2026-11-20 19:41:12 +00:00
Miguel Ángel 2b0294b735 fix(studio): a sealed crop frame turns with its layer (#8310)
* fix(studio): a sealed crop frame turns with its layer, before a press and after a scrub

* refactor(studio): the crop handles hand a sealed card's earlier press layout to the crop frame

* fix(studio): keep the frame's raw planar out of a parsed gesture start
2026-11-20 19:34:36 +00:00
Miguel Ángel d6411daacf docs(render): name the 100,000-element limit beside the mount limits (#8309) 2026-11-20 19:34:17 +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 99fcdfb5c1 fix(studio): the first edit of a film without ids no longer reloads the preview (#8274)
* test(studio): the first save of a film without ids writes the ids the preview served

* fix(studio): the first edit of a film without ids saves the preview's ids, so it does not reload
2026-11-20 18:50:13 +00:00
Miguel Ángel 8ad3463575 fix(producer): reserve each font's inline size before reading it (#8302)
* test(producer): font embedding reads only the fonts that fit the page's budget

* fix(producer): reserve each font's inline size before reading it

* test(producer): give the font budget test room to embed 44 MiB under load
2026-11-20 18:50:05 +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
Michael Wang be3d218074 fix(media-use): never write recipe files through links (#8257)
* fix(media-use): never write recipe files through links

A project folder can carry symbolic links inside .media/recipes/<name>/.
When recipe.json there did not parse, freezing a recipe under that name
reused the folder and wrote each recipe file through the link, which
could create or overwrite files outside the project. The user-tier copy
then carried those links into ~/.media/recipes, and using the recipe
copied them into other projects.

Freezing and using a recipe now refuse a link at .media, .media/recipes
or the recipe folder before anything moves or is written. Each recipe
file is written as a new file and renamed into place, so a link at its
name is replaced, never followed. Only the files a freeze just wrote
reach the user tier, and using a recipe imports only its regular recipe
files. Using a recipe also refuses a recipe whose frame.md is a link,
and replaces a frame.md link in the project instead of writing through it.

* fix(media-use): read user-tier recipe files through one no-follow handle

Checking a file with lstat and then reading it by path leaves a gap in
which the file can be swapped for a link. Importing a recipe from the
user tier and copying its frame.md now open each file once with
O_NOFOLLOW, and check that the open handle is a regular file before
reading it.

* fix(media-use): refuse recipe file links where Node has no O_NOFOLLOW

Node has no O_NOFOLLOW on Windows, so opening a recipe file there
followed a link and read its target. readRegularFile now checks the
path with lstat first and refuses anything but a regular file. After
the open, the handle must be a regular file with the same device and
inode that lstat saw, so a link swapped in between is refused on every
platform. O_NOFOLLOW stays as an extra guard where it exists, and
O_NONBLOCK keeps a FIFO from blocking the open.

A test passes 0 as the no-follow flag to check the Windows path on any
platform, and another checks that a FIFO is refused without blocking.

* refactor(media-use): compare the path with the handle after opening

readRegularFile now opens first, then requires that lstat of the path
shows a regular file with the same device and inode as the handle. A
link has its own inode, so it never matches the file an open reached
through it, with or without O_NOFOLLOW. O_NONBLOCK keeps a FIFO from
blocking the open. Checking after the open, instead of before it,
leaves no check-then-open gap on the path.
2026-11-20 18:47:47 +00:00
Miguel Ángel 0ecb6671f1 test(studio): a test chrome launch that fails with a non-error names what it holds (#8305) 2026-11-20 18:46:16 +00:00
Miguel Ángel 44d805c444 fix(studio): a host can own the live preview's load deadline, so a slow sealed film isn't an error (#8206)
* test(studio): a sealed preview whose film boots after 8 s comes ready without an error

* test(studio): wait for the sealed player to mount before reading it

* fix(studio): a host can own the live preview's load deadline, so a slow sealed film isn't an error
2026-11-20 18:46:00 +00:00
Miguel Ángel c50ec09d28 fix(producer): download at most 1,000 remote assets per compile, 8 at a time (#8290)
* test(producer): a cancel stops the compile's media, image and font downloads

* fix(producer): pass the render's cancel to the compile's media, image and font downloads

* test(producer): keep the cancel test's fails-without line short

* test(producer): cap a compile's remote asset downloads and how many run at once

* fix(producer): download at most 1,000 remote assets per compile, 8 at a time
2026-11-20 17:55:07 +00:00
Miguel Ángel edd1c90a4e fix(producer): pass the render's cancel to the compile's media, image and font downloads (#8289)
* test(producer): a cancel stops the compile's media, image and font downloads

* fix(producer): pass the render's cancel to the compile's media, image and font downloads

* test(producer): keep the cancel test's fails-without line short
2026-11-20 17:08:39 +00:00
Michael Wang 1d5403525d fix(share): a first share only lands on a review it created (#8282)
Registration now reports whether the server created the project (201)
or answered one already bound to the record's studioProjectId (200).
A first share that gets an existing project back is refused with
review_project_changed and restores the record, before any audience
change, link reopening or upload. A retry after a lost registration
reply still reaches its project: the record holds the saved
registration and the project is still private, with its link never
turned off and no ready version.

Studio now passes the review the person confirmed through the share
job. The service refuses when the folder's review differs from it, and
shareForReview refuses a record whose project is not the confirmed one,
so every path to setReviewAccess, the first audience and addVersion
checks the confirmed review.
2026-11-20 17:07:42 +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 2f23fbd364 fix(producer): a remote font embeds in the page instead of warning it is missing (#8297) 2026-11-20 16:19:41 +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 58de4c783d fix(player): a sealed film shows when its timeline arrives after the 8 s check (#8293)
* fix(player): a sealed film shows when its timeline lands after the 8 s check

* fix(player): a navigation away from a sealed film keeps its missed check latched until the next load

* fix(player): the latch is set before the probe stops, so stop keeps it

* test(player): the sealed test reads the error event's detail as the player sends it
2026-11-20 15:35:06 +00:00
Miguel Ángel 3c735ad01c fix(studio): a sealed audio group's undo reads the frame's reply only in its shape (#8291)
* test(studio): a sealed audio group's undo survives a reply of the wrong shape

* fix(studio): a sealed audio group's undo reads the frame's reply only in the shape it asked for
2026-11-20 15:32:56 +00:00
Wenbo ZhuandClaude Opus 5.5 4e3c960457 fix(cli): preview answers unknown paths with an inert refusal, not the Studio shell (#8161)
* fix(cli): preview answers unknown paths with an inert refusal, not the Studio shell

Studio routes by location.hash only, yet the preview server answered every
unknown GET with the Studio shell (200, same origin, query kept). An OAuth
redirect to the preview port (/oauth/callback?code=...&state=...) therefore
re-mounted the project, and project script read the code from the address.

The shell is now served only at / and /index.html. Any other path gets a
plain-text 404, and a request carrying `code` or `state` at any path (entry
and preview routes included) gets a plain-text 400. Both carry a sandbox CSP
(opaque origin), COOP same-origin, frame-ancestors 'none' / X-Frame-Options
DENY, nosniff, no-referrer and no-store, and never echo the request.

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

* fix(studio): preview's Vite modes refuse an OAuth return too

`preview` from a source checkout (dev mode) and with the local studio
(HYPERFRAMES_LOCAL_STUDIO=1) run packages/studio/vite.config.ts, whose SPA
fallback served the Studio shell at /oauth/callback?code=... with no COOP or
sandbox. devProjectApi now refuses a `code` or `state` at any path as its
first middleware, with the same inert response as the embedded server.

The refusal moves to @hyperframes/studio-server so both servers share one
helper.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 14:31:56 +00:00
Miguel Ángel 9b7be276a9 fix(studio): a sealed resize of a layer whose GSAP keyframes animate its width saves (#8288)
* fix(studio): a sealed resize of a keyframed size keeps the box's other side

* fix(studio): say where a sealed resize's pre-gesture box comes from

* refactor(studio): read a resize's pre-gesture box one side at a time
2026-11-20 14:02:07 +00:00
Miguel Ángel 468ab907ee fix(studio): a sealed move, resize or turn takes GSAP's route when GSAP animates the layer (#8286)
* fix(studio): a sealed move, resize or turn takes GSAP's route when GSAP animates the layer

* fix(studio): a live layer's route is decided at once, and a turn the press routed keeps it

* fix(studio): a sealed resize's anchor move waits for the frame's GSAP read before choosing CSS
2026-11-20 11:12:47 +00:00
Miguel Ángel 89edb0af00 fix(studio): a sealed resize, move or turn typed or made by the agent shows in the preview (#8283)
* fix(studio): a sealed resize, move or turn typed in or made by the agent shows in the preview

* test(studio): a sealed geometry save leaves the frame to a live drag draft
2026-11-20 10:03:39 +00:00
Miguel Ángel c34df57abd fix(studio): agent tools see the film in a sealed preview (#8281)
* fix(studio): agent tools read a sealed preview through its runtime

* test(studio): agent tool tests build selections from live elements

* test(studio): agent tools on a sealed preview look, select, inspect, write and read back

* test(studio): resolver and tool tests find elements through the preview read

* test(studio): the socket-pool walk waits for studio_look's ready scene
2026-11-20 09:29:25 +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 07928702f8 fix(studio-server): preview copies of long clips with sound finish again (#8253)
* fix(studio-server): preview copies of long clips with sound finish again

The piece join ran with ffmpeg's -xerror once it moved onto the shared concat input, which made the timestamp repair at each seam of a clip with sound fatal: the copy failed, its pieces stayed, and the clip waited for a copy that never came. The join opts out of -xerror; the video-only render joins keep it.

* fix(studio-server): a preview copy that joins short is refused and made again

Only a join of pieces with sound runs without -xerror, and every join is measured before it is kept: a copy shorter than its pieces is refused and its pieces are removed, so the next attempt makes them again. The sound test reads ffprobe's JSON so CRLF output parses too.

* fix(studio-server): a preview copy is measured against its own pieces

The join was compared with the source container's length, which counts tracks the copy leaves out, so a whole copy of a source with a longer subtitle or alternate audio track was refused on every try. It is now compared with the summed length of its pieces, which carry only the streams the copy maps; a piece that cannot be measured refuses the join.

* fix(studio-server): every piece of a preview copy is checked against its own stretch

The copy's length now comes from the picture and the sound it keeps (stream durations, or the Matroska DURATION tag), not the container, so its stretches end where those streams end. Each piece and the joined copy are measured against their own stretch, so a short piece can no longer lower the bar. A caller that leaves while the copy is measured stops the measuring, and a left copy is never written to the cache.

* fix(studio-server): long preview copies keep only the picture in pieces and add the sound once

AAC pieces overlap at every seam (each piece's priming frame reaches back into the one before), so a strict join refuses them. Pieces now carry only the picture and join strictly, exactly like the render joins; the sound is encoded once from the source and put with the picture by a stream copy that keeps both on the source's timeline. This replaces the length checks of the earlier commits, and old pieces with sound get a new name tag so they are never joined as picture-only pieces.

* fix(studio-server): each picture piece of a preview copy starts exactly where its stretch does

At a frame rate that does not divide 15 s, such as 29.97, every piece ran about 15 ms long and the join placed the next piece after it, so the picture drifted from the continuous sound (600 ms over 10 minutes). The join list now gives each piece its stretch's length (ffconcat duration), so pieces land on the source's timeline and the offset stays within a frame.

* fix(studio-server): a preview copy of a clip whose picture starts late keeps that start

On ffmpeg 8 the piece join moved the first piece to zero, so a picture that starts after the sound lost its lead against the sound added later. The join now keeps each piece's own timestamps (ffconcat inpoint 0 with each stretch's duration, and -copyts), on ffmpeg 7 and 8 alike. The long-source path moves into copyInPieces.

* fix(studio-server): a preview copy never keeps a short or broken piece from a stopped copy

A piece left by an earlier run is made again when it runs short of its stretch; when the join refuses one, every piece is dropped and made again once in the same run. A refused join no longer leaves its pieces or a picture temp behind; a stopped one keeps its pieces.

* fix(studio-server): a resumed preview copy remakes a piece a frame short and stops on cancel

A piece left by a stopped copy now has to run its stretch to within half a frame. The pieces are measured one at a time, and leaving the copy stops the running ffprobe (probeMediaMetadata takes a signal) and frees the copy.

* refactor(studio-server): read the piece check's frame rate outside the copy setup

* test(studio-server): run the real-ffmpeg join tests in their own file, inside the flake gate's limit

The flake gate runs each changed test file under full CPU load with 120 s per run. With this change's real-ffmpeg join tests added, proxyTranscoder.test.ts took about 108 s a run at a6d62ae2 and went over at 56cf7c74. Those tests move to proxyTranscoder.seams.test.ts; under 4-core load the two files take 15 s and 32 s.

* test(studio-server): keep the real-ffmpeg join tests inside the flake gate's limit

The seams file went over the gate's 120 s per run. Three tests whose checks the others already make are gone (plain copy with sound, the picture-and-sound-together clap case, the 5 s piece), each clip is measured in one ffmpeg pass, and the stopped-copy tests have their own file. On 4 busy cores the files take 15 s and 10 s. The cut piece keeps its header now, so the test reaches the retry after a refused join.
2026-11-20 06:29:05 +00:00
Ular Kimsanov e16c681dc0 fix(media-use): remove only the temp folders media-use made, and never fail on cleanup (#8267)
* fix(media-use): remove only the temp folders media-use made, and never fail on cleanup

discardPrivateOutput now removes a folder only if privateOutputPath made it in this
run, instead of matching names against the raw temp setting, and a removal error no
longer turns a finished or failed generation into a cleanup error. The hosted video
and favicon providers use the same helper, so resolve removes their folders too.
Provider tests remove the folders they create; the resolve test also redirects
TEMP and TMP, so it checks the cleanup on Windows as well.

* test(media-use): prove resolve can remove the hosted video and favicon folders

* test(media-use): name the folder this run did not make plainly
2026-11-20 06:26:07 +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
Ular Kimsanov 2c3427089c fix(share): ask before sharing from Studio and bind each action to the confirmed review (#8268)
* fix(share): ask before sharing from Studio, naming the review it changes

A composition's script runs on Studio's origin by default, and a received
folder's .hyperframes/review.json can point Studio at an existing review.
Every share action except sign-in now asks the person first, naming the
review (its link), who can open it, the workspace and whether project files
are uploaded. The request carries the manage link of the review that was
shown, and the server refuses it with share_target_changed when the
project's review no longer matches, so nothing is shared or changed.

* fix(share): bind each Studio share action to the review id the person confirmed

Studio now gets the id and title of the review an action reaches, including a folder
whose record names a review it never opened (a received folder can ship one). The
confirmation names that review, its workspace and who can open it, and says plainly
when a folder arrives already linked. Actions carry the confirmed id; a missing one is
refused as confirmation_required and a different one as share_target_changed, and
after that refusal Studio drops the earlier choice. The docs describe the
confirmation and that project files are included only when chosen.

* fix(share): show the review title on one quoted line in the confirmation

* fix(share): say a linked share also sets who can open it, and check the new state fields

* fix(share): separate the question from the details and say when a title is unknown

* docs(share): name the review record without a path the citation check reads as a file
2026-11-20 06:02:05 +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 a8884522f4 fix(studio): a sealed preview's timeline names each file by its project path (#8213)
* fix(studio): a sealed preview's timeline names each file by its project path

* fix(studio): keep a file on another site at its own address in a sealed preview's timeline
2026-11-20 04:49:13 +00:00
Miguel Ángel f13969f13f fix(studio): a sealed preview's failed reload says only what the preview reported (#8194)
* test(studio): a sealed shadow's failed reload says only what it reported

* fix(studio): a sealed preview's failed reload no longer blames a page that never loaded

* fix(studio): a failed reload names the restore seek when the timeline already arrived

* test(studio): keep the restore seek test's comment under 120 characters
2026-11-20 04:49:05 +00:00
Michael Wang fab75fb916 fix(engine): bound the seek-index rebuild's temp copy (#8269)
* fix(engine): bound the seek-index rebuild copy to a single mov/mp4 source

The seek-index rebuild now runs only for a source ffprobe reads as one
mov/mp4 file, and reads it with the mov demuxer, so a playlist or list
input is never copied. The copy is capped with -fs at twice the source's
size plus 1 MiB; a copy that reaches the cap is removed and extraction
continues as it does without a rebuild. The copy also waits for an
extraction slot like other ffmpeg work.

* fix(engine): remove the seek-index copy folder when the copy throws

The stream copy now runs in try/finally, so its temp folder is removed
whenever the copy is not kept, including when ffmpeg fails to start.
2026-11-20 03:40:13 +00:00
Miguel Ángel cf28a00053 chore: release v0.9.72 (#8265) v0.9.72 2026-11-19 22:02:17 -05: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