A process that may only read the history folder now finds a live owner's lock busy at once instead of reporting the refused claim write, so readers show the history quietly.
* fix(core): the motion path plugin loads from beside the page's own GSAP, never a CDN it did not name
* test(core): local root, revalidation and path-free preload rows
* fix(core): the motion path plugin never falls back to jsDelivr, nor preloads for a page with none
* fix(core): the plugin path beside GSAP is cut in linear time
* test(core): the Desktop walk film's plugin request stays on its origin
* fix(core): preload the motion path plugin only from the page's origin or a configured mirror
* fix(core): the motion path preload compares with the preview document's own origin
* fix(core): one rule decides the motion path plugin URL, bound to the document's own origin
* fix(studio-server): the plugin tag sits beside the page's GSAP as the page wrote it
* test(studio): the plugin-load fixtures name a page GSAP or a configured mirror
Deciding whether a preview needs the motion-path plugin read every
script file the page loads, once per script tag, all at once, and kept
reading after the check gave up. A page naming one file in thousands of
script tags started thousands of reads and froze the server.
The check now answers "preload the plugin" at once for a page with more
than 64 script tags, reads each script file once, keeps at most 8 reads
in flight, starts none after its time is up or once a script names a
path, and cancels the reads still running when it ends.
* fix(studio-server): previewing a page with thousands of media files no longer stalls the app
Building a preview recorded each file the build read, and each file the
page names, by walking its path with blocking link reads, one file at a
time. A page naming 20,000 media files held the server's event loop for
over a second, and the app froze while the preview loaded.
The build now collects those paths and records them off the event loop
in one batch per step, reading each shared folder once per batch.
* fix(studio-server): a preview still loads when its project folder cannot be resolved
Recording a build's reads resolved the project folder with a reader that
fails on a folder it cannot resolve (a link loop, no permission), so a
finished bundle turned into a failed build and the sub-composition route
answered a server error. The folder now resolves the way the per-read
recorder resolves it, and recording never fails its caller.
* chore: release v0.9.81
* chore: release v0.9.81 notes list the changes merged since the draft
* chore: release v0.9.81 notes list the changes merged since the draft
* fix(core): load the motion path plugin only for a page that tweens along a path
* fix(core): a path tween an external script builds still gets the motion path plugin
* test(studio): a path tween from an external script gets the plugin when Studio connects
* fix(core): a page with a script the preview cannot read still gets the motion path plugin
* fix(studio-server): the preview builder, not a file name, decides a page needs no path plugin
* refactor(studio-server): split the preview builder's script check
* fix(studio-server): a script the preview builder cannot read leaves the page unmarked
* fix(studio-server): the preview builder reads scripts off the event loop, within a time budget
* fix(studio-server): the preview builder resolves script paths off the event loop too
* fix(studio-server): the preview builder's script scan stays inside the request's deadline
* fix(core): the async project path check answers null for a path it cannot resolve
A sealed preview only got its seek-reapply script when its file already held a Studio edit, and the script left
a page with none unarmed. The first restore that added one (a redo of a resize, say) was refused by the frame
and fell back to an unawaited reload. Every sealed page now carries the script, armed from the start.
* chore: release v0.9.80
* chore: release v0.9.80 notes list the changes merged since the draft
* chore: release v0.9.80 notes list the changes merged since the draft
* fix(studio-server): a file the drive never answers no longer holds a project's first history copy
* fix(studio-server): keep history's comment share at or below its base
* fix(studio-server): a first copy that lands past its deadline is kept as the file's start
* fix(studio-server): a late first copy is adopted and kept while another file's read is stalled
* fix(studio-server): a waiting late first copy counts as baseline and rereads a few at a time
* fix(studio-server): every reread of an owed file takes a copy slot and is kept until adopted
* fix(studio-server): history pins a copy as it is filed and keeps a reference-only copy as such
* fix(studio-server): a history pin is taken and released by its owner, never across a delete
* fix(studio-server): an agent step waits at most a deadline for a file the drive never answers
* fix(studio-server): undo refuses a file whose first copy landed after an agent step rewrote it
* chore(studio-server): give the packed size budget its usual 5% headroom
Main packs to 190,094 bytes, already 0.65% over the 188,871 budget; this branch adds 1,264 bytes of its own code (no new import: dist/index.js is unchanged). The budget file's rule is 5% above measured: ceil(191,358 x 1.05) = 200,926.
* fix(studio-server): an agent step that goes ahead of a first copy owns that file's undo
* fix(studio-server): undo of a step that went ahead of a pending first copy is all or nothing
* fix(studio-server): an undo after a step that rewrote a pending file in place still refuses
A went-ahead file now clears from a step's list only when the first read after its copy lands finds the original
bytes, not when its size and times look unchanged. The list of went-ahead files is kept on disk, so a restart
before the step closes, or after it deleted the file, keeps the refusal. Parts a Studio claim cuts from a step
keep the list too.
* fix(studio-server): a step ahead of a pending file refuses undo after Cmd+Z, restarts, in older apps
Cmd+Z stops at an open step whose only write so far is a pending file. A step recovered after the process died
keeps its list of pending files. A later Studio save's receipt no longer sets the start of a file a step went ahead
of. Every earlier point names a pending file as not kept, so no restore deletes it in any app version.
* fix(studio-server): a step that went ahead of a pending file never undoes, whatever bytes land
Bytes cannot tell steps apart: a file written A, B, then A again by two steps looked untouched and cleared both. A
step's list of files it went ahead of is now never cleared, so its undo refuses after a stalled read.
* fix(studio-server): a recovered step keeps its guard through a second crash; saves keep the start
The closed window is recovered before the reopen rewrites went-ahead.json, so a crash during recovery no longer
erases its list of pending files. A copy read before a step went ahead is the file's start whatever a later save's
receipt says it replaced.
* fix(studio-server): a start keeps receipts heard before its read; reopen writes all pending files
A copy read before a step went ahead follows only the save receipts heard by the moment of its read, so an early
save's original stays the start and a later save naming the step's bytes cannot replace it. The reopen rebuilds
the list of pending files in memory and writes it once, so a crash midway keeps every file on it.
* fix(studio-server): a first copy's start follows only receipts heard by its read and keeps them
Every adopted copy follows the save receipts heard by the moment of its read, with or without a step, so a later
save writing the original back cannot move the start. A small file's read is reported before its close, which a slow
drive can hold. Bytes a save replaced in a file history has no copy of yet stay through pruning until it does.
* fix(studio-server): bytes kept for a pending first copy count as start, not undo history
The bytes a save replaced are kept only for a file still owed its first copy, and they count as start rather than
undo history, so they never fold an unrelated edit out of the budget or stay for a file that never needed them.
* fix(studio-server): a file the drive never answers no longer holds a project's first history copy
Each file the first copy reads gets a deadline from when its read starts. A file that misses it is left owed and
adopted once the drive answers, keeping the bytes it read as the file's start, so the open finishes.
* fix(studio-server): a late first copy starts from receipts heard by its read, kept through pruning
A late first copy follows only the save receipts heard by the moment of its read, so a later save writing the
original back cannot move the start. The bytes a save replaced in a file still owed its first copy stay through
pruning, counted as start rather than undo history, until that copy is recorded.
* chore(studio-server): give the packed size budget its usual 5% headroom
* chore: release v0.9.78
* chore: list main's latest changes in the v0.9.78 notes
* chore: add the history fix to the v0.9.78 notes
* chore: list main's latest changes in the v0.9.78 notes
* fix(studio-server): history keeps undo steps in order when file times and its clock disagree
* fix(studio-server): a removal made while a turn was closed can join that turn
* test(studio-server): a held-file edit is checked for blocking waits, not wall-clock gaps
* test(studio-server): the held-file wait counter says what it counts
* test(studio-server): a held-file edit fails the test if its retries block the process in any way
* test(studio-server): a preview file request on a silent drive asks it nothing on the event loop
* fix(studio-server): a preview file request reads its project off the event loop
* ci(studio-server): refuse a new synchronous fs call in Studio's routes and history engine
* fix(studio-server): a preview file request and a miss stay off the event loop to the end
* test(studio-server): a shared still's remake no longer depends on busy requests' slot order
* fix(ci): the studio-server sync fs gate counts every sync call node:fs has, globSync included
* feat(studio-server): history names the bytes its next restore point would copy in
* fix(studio-server): count each unsaved blob once, and name the method for what it counts
* refactor(studio-server): a file the next restore point copies nothing of is its own check
* feat(studio-server): a host can name paths its project history never records
* test(studio-server): an ignored path loses its old targets, its pruned versions and every write
* fix(studio-server): an ignored path leaves old targets and the saved log, and is never written
* refactor(studio-server): opening a log that drops ignored paths is its own step
* perf(studio-server): a restore checks where each write lands without blocking the thread
* test(studio-server): an undo never writes an ignored file through a folder link
* test(studio-server): ignored kept files leave old undos, and no ignores keeps the link refusal
* fix(studio-server): ignored paths leave old kept files; only the host's rule skips a linked write
* test(studio-server): the link refusal is the thrown error, and no redo is offered
* perf(studio-server): a root preview's parse passes run off the request thread
* test(studio-server): a root build's page passes counted off the request thread, not timed
* chore(studio-server): the root deadline's name says it; no comment over the ratchet
* test(studio-server): an undo keeps a file a page it leaves still names
* fix(studio-server): an undo never deletes a file a page it leaves still names
* fix(studio-server): keep the undo's page check small and comment-free
* refactor(studio-server): the history reads file references without loading the file routes
* fix(studio-server): the history loads the file routes only when an undo would delete a file
* refactor(studio-server): history and renames share one core-free file reference matcher
* test(studio-server): undo steps past a kept upload and keeps a kept page's files
* fix(studio-server): undo steps past kept files and keeps what a kept page names
* refactor(studio-server): split the kept-empty undo check out of commit
* test(studio-server): a kept upload is redone, after reopening too, and a kept redo never traps undo
* fix(studio-server): an undo or redo records the files it kept, so redo and undo step past them
* test(studio-server): kept files go through redo's conflict check, newest redo and step paths
* fix(studio-server): a step over kept files checks later edits and names the files it writes
* test(studio-server): keep-later-edits over a kept upload leaves Cmd+Z on the earlier edit
* fix(studio-server): a redo that keeps every later edit records nothing, so Cmd+Z moves on
* chore: release v0.9.73
* docs(release): add main's later fixes to the v0.9.73 notes
* docs(release): add main's newest fixes to the v0.9.73 notes
* docs(release): add main's latest fixes to the v0.9.73 notes
* 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.
* 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.
* 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.
* 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(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>
* 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
* 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.
* 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
* 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
* 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