Commit Graph
1155 Commits
Author SHA1 Message Date
Miguel Ángel fee03bfbe1 fix(studio): an undo on a sealed preview shows in place, not after a reload (#8009)
* fix(studio): an undo on a sealed preview shows in place, not after a reload

* fix(studio): split the sealed restore checks, and the inspector budget takes the new kind
2026-11-17 03:55:09 +00:00
Michael Wang 32fe10a8b3 fix(studio-server): history writes and claims follow Studio's write rule (#7988)
History undo, restore and Cmd+Z now leave alone every file that Studio's
file routes refuse to write. This covers tool-trusted, private, hidden and
node_modules paths, and scripts the project's package.json runs. Cmd+Z
passes over an edit that only changed such files. A claim no longer takes
such a file's pending change.

A claim's `overwrote` version now counts only when the server itself saw
that version at that path. A version stored for another file can no longer
become a file's earlier state.

The write rule also refuses more files that tools and agents load on
their own: opencode and crush settings, compose override files,
Dockerfile.* and Containerfile, every lefthook spelling, mise, nodemon,
devbox, wrangler, vercel and netlify settings, *.config.jsonc,
tsconfig.*.json, Taskfile.dist, simple-git-hooks, Ruby build files, and
.nix and .fish scripts.
2026-11-17 00:48:03 +00:00
Xuanru Li ca25558083 fix(cli): enforce private cache install paths (#7981)
* fix(cli): cache installs only use folders the current user owns

Code the CLI downloads or builds into its cache (Chrome, the TTS script,
audio helpers, whisper.cpp, OpenCV, the Lambda handler, optional packages)
now goes into folders created by the current user with owner-only write,
and each installed file is checked again before it is returned.

- A cache root that other accounts can add entries to, sticky or not, is
  no longer used for code; the per-user cache is used instead.
- The ownership check reads links rather than following them, and a link
  that leads out of the cache root is not trusted.

* fix(cli): validate cache ancestry before filesystem side effects

* fix(core): check links before parent path segments

* fix(cli): validate cached libraries and clarify private parent requirements

* fix(cli): use the shared staging directory helper for Apple builds
2026-11-16 23:28:26 +00:00
Michael Wang c68c78445d fix: hidden and credential files stay out of Studio, history and lint (#7979)
* fix: hidden and credential files stay out of Studio, history and lint

- The private-file rule now refuses every hidden file or folder in a project,
  except Studio's own files, the root .media folder, and pictures, video,
  sound, fonts, stylesheets and scripts a page can load. It also refuses
  Terraform state and variable files and more key-store types.
- Project history never tracks, lists or serves a private file, and the blob
  route serves only bytes a listed file had, so copies kept by an older
  version are no longer readable.
- Lint reads a linked stylesheet, script, import map or sub-composition only
  when the private-file rule allows it and the file is the kind its link
  names, so no finding quotes a private file.
- The rule moves to @hyperframes/parsers/private-path so lint can use it;
  @hyperframes/core/safe-path re-exports it unchanged.

* fix(studio-server): a refused history blob reads as not a history blob

* fix(core): keep realpath in core, so its file-system callers and tests see one module
2026-11-16 23:15:31 +00:00
Michael Wang 6f88be3941 fix(cli): escape control characters in project, page and registry text (#7913)
* fix(cli): text from projects, pages and registries prints control characters as visible escapes

catch-up, capture, figma component, timeline, keyframes, layout/inspect,
catalog and add printed strings that come from a project folder, a captured
web page or a registry manifest straight to the terminal. A crafted value
could move the cursor, rewrite earlier lines, set the window title or write
the clipboard. Those values now go through terminalText(), the same helper
lint, check and snapshot already use. The CLI's own colours stay, and --json
output is unchanged.

layout/inspect also keeps only well-formed issues with a known code from the
page, the way check already does, by reusing check's parseLayoutIssue. The
browser-script loader moves to its own module so layout and check can share
the parser without importing each other.

* test(cli): catch-up test names files with control characters only where the OS allows it

* fix(cli): import terminalText from core after main moved it

* fix(cli): escape layout banner and failure, top-level errors and installed paths; keep line breaks
2026-11-16 23:11:33 +00:00
Michael Wang c4d607c7f8 fix(core): a page marked for another site gives that site only playback (#7980)
* fix(core): a page marked for another site gives that site only playback

The runtime control bridge trusted window.parent alone. In a document the
preview server marked as framed by another site, that parent is the other
site, so it could turn on pick mode, flash elements, set runtime data and
colour grading, and it received the timeline, diagnostics and picked
elements, which describe the composition.

In a marked page the bridge now takes only playback controls (play, pause,
seek, volume, mute, rate) and posts only the ready, state and stage-size
messages. Pages served to their own site are unchanged.

* fix(core): keep the bridge's handler lookup in the shape code scanning accepts
2026-11-16 22:53:30 +00:00
Miguel Ángel 33e1a36a39 revert(player): an app embedding the preview re-reads it after a script edit again (#7795) (#7978)
This reverts commit 42508c1ef1.
2026-11-16 21:54:40 +00:00
Michael Wang 2a28e43685 fix(studio-server): no write route touches files other tools run or trust (#7964)
* fix(studio-server): no write route touches files other tools run or trust

A composition previewed in Studio runs same-origin with the API, and the write rule
refused only private paths, node_modules and hidden names. Its script could create,
overwrite, rename or delete package.json, lock files, agent instruction files and
scripts, which a package manager, build tool or coding agent then runs with the
developer's rights.

Core now names these files in one predicate, toolTrustedFileKind, read in every
spelling a case-insensitive file system or Windows opens. Studio's write rule and the
registry installer's target rule both use it, so every write route (PUT, POST, PATCH,
DELETE, upload, duplicate-file, file-mutations and gsap-mutations) refuses such a
target. Deleting or moving a folder that holds one is refused too. Ordinary
composition, stylesheet, script-asset and media writes still succeed.

* fix(core): fold look-alike letters before matching files other tools trust

A case-insensitive macOS volume opens "AGENTſ.md" (long s) as AGENTS.md
and "Makefile" (fi ligature) as Makefile, but lower-casing alone does not
map either letter. Project path segments now fold names the way such a
volume does: NFKC, upper-then-lower case, and invisible characters
dropped. Every rule built on the segments gets the fold.

Also:
- name JSON, YAML and TOML tool config, compose files, turbo.json,
  nx.json, pyproject.toml and gulp or grunt files
- treat a ~N name as a short name only when it has the 8.3 shape and an
  extension a trusted file's could shorten to, so take~2.mp4 stays
  writable
- refuse to delete or move a folder holding node_modules or .git, walking
  it without the listing's ignore rules
- report an upload refused by the write rule in `skipped`
2026-11-16 21:30:32 +00:00
Ice colaandClaude Fable 5.1 95e4e7f880 fix(producer): probe sub-composition media defaults (#7550)
* fix(producer): probe sub-composition media defaults

Sub-composition defaults declared on <html> disappear from the DOM
during inlining. The browser-probe gate then misses data-var-src
bindings, causing renders to use the authored placeholder source.

Pass the inliner's variablesByComp table through CompiledComposition
and consult the nearest composition scope when checking media bindings.

Give anonymous mounts distinct runtime scopes and reserve IDs as
nested mounts are processed, preserving each instance's variable values.

Add regression coverage for declared defaults, repeated mounts,
nested scopes, and named/anonymous mount collisions.

Fixes #7505

* fix(core): keep anonymous hosts unnamed, key their variables by the authored id

The previous commit made an anonymous mount claim its sub-composition's id on
the host element, which changed the DOM contract the runtime mount path and
the `missing-host-comp-id` regression golden pin: the compile paths put the
host's start/duration on the composition while the mount path kept them on an
unnamed timed element, so the producer parity test and the regression shard
failed on the first CI run.

Restore the contract: an anonymous host carries no composition id and its
flattened wrapper keeps the authored one. For #7505 that wrapper is already
the scope the probe gate (and `variableScope.ts`) resolves through, so the
inliner now keys an anonymous mount's merged defaults by the authored id
instead of skipping them. A named mount of the same file shares that scope;
its explicit instance values win regardless of inlining order, which the
replacement unit test pins in both orders. The id-reservation machinery for
claimed ids goes with the claim.

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-16 18:58:41 +00:00
Miguel Ángel ce8d55d302 fix(cli): validate and keyframes print project text with control characters as visible escapes (#7958)
* fix(cli): validate and keyframes print project text with control characters as visible escapes

* test(cli): the CSS case prints a payload the declaration split keeps whole

* fix(cli): escape project-supplied object keys too, so keyframes prints tween property names safely
2026-11-16 18:37:36 +00:00
Robin Ebers 42508c1ef1 fix(player): stop the preview freezing when many clips share one long recording (#7795)
* fix(core): a clip the preview lets go of stays unloaded in Firefox

Releasing a clip dropped its src, called load() and set the src again.
Firefox treats preload="none" as "metadata" while an explicit load() is
pending, so every release fetched the clip's metadata and first frame. The
runtime then saw a far clip loading and released it again, in a loop: about
20,700 media requests over one 2:16 film, with 2-4 s stalls at cuts.

Setting src already runs the media load algorithm, which ends the fetch, so
the release now sets it again without load(). Chrome and Safari behave as
before: Blink clears its ignore-preload-none flag when src is set, and
WebKit's src set cancels the prepareToPlay that load() queued.

To reproduce: in Firefox, give a <video> with a src preload="none", then call
removeAttribute("src"), load() and setAttribute("src", src) in one task. It
loads to readyState 4; with the src set in a later task it stays at 0.

* fix(player): a film cut from one long recording plays through in Chrome and Firefox

A film whose clips are cut from one or two long recordings froze a few
seconds in, in Chrome and Firefox. Both keep a paused clip's request open
with its unread bytes, and every request to one host shares one HTTP/2 or
HTTP/3 connection window. With every clip of the file loading at parse, those
idle streams fill the window, and the request for the clip coming up is never
answered.

The player's frame now holds clips back on every engine, as it already did on
WebKit: each file keeps the clip on screen and the next one loading, and
frees the rest. The player also names its frame, because a composition in an
opaque sandbox cannot read frameElement to find the player's mark.

To reproduce: play a film of 37 clips cut from a 363 MB and a 180 MB .mov
served over HTTP/3 in <hyperframes-player>. On main it stops at 0:17 in
Chrome and at 0:09 in Firefox and never recovers.

* chore(player): raise the packed size budget for the frame name

Naming the player's frame adds 44 bytes to the packed player (158,706 to
158,750 bytes with pnpm 10.17.1). main was already 10 bytes under the 1%
tolerance of its 157,145-byte budget, so any growth fails the check. The
budget moves to 5% above the new measured size, as the check suggests.

* fix(core): seeking in the player stays as it was in Chrome and Firefox

Holding clips back in every player frame also moved Chrome and Firefox
player frames onto Studio's paused-seek path, which keeps the old picture
until every clip on screen has its new frame. In the player's scrub
benchmark the inline p95 rose from about 1.0 s on main to 1.9 s in CI,
and a seek could miss the benchmark's 1 s limit. In Firefox a paused seek
to a clip the player had let go showed no frame for about 5 s, because the
clip was released again each time it loaded.

Chrome and Firefox player frames now hold clips back and seek as they did
on main. Studio and Safari player frames keep the path they already had.
2026-11-16 18:15:46 +00:00
Miguel Ángel 9e50487720 fix(core): a capture page loads a clip with no set length only when it is due (#7938)
* fix(core): a capture page loads a clip with no set length only when it is due

* fix(core): keep the capture-page comment within the comment share
2026-11-16 16:10:40 +00:00
Miguel Ángel 51ae925105 feat(core): describe replies carry the picker's element label, and studio exports standInHandle (#7936)
* feat(core): describe replies carry the picker's element label, and studio exports standInHandle

* fix(core): label an element by its rendered text, and read a describe reply without a label

* style(core): format the rendered-text walk
2026-11-16 16:10:26 +00:00
WaterrrForeverandClaude Opus 5.5 071a2da0b5 fix(cli): own render-slot lock dir; refuse cache files other accounts can write (#7951)
* fix(cli): own render-slot lock dir; refuse cache files other accounts can write

Sharing one render slot across accounts no longer means sharing HYPERFRAMES_CACHE_DIR,
which holds the browser, packages and helpers each account runs.
HYPERFRAMES_RENDER_LOCK_DIR names a folder of lock records only, created sticky and
writable by all (1777); the per-user lock folder is created 0700. Help text, errors and
docs no longer suggest sharing the cache or chmod 777.

foreignWritablePath (core/cache-dir) refuses a cached file whose path up to the cache
root is owned by another account or is group/world-writable. Chrome (CLI, engine,
inspector), optional packages (incl. the Sherpa runtime), the whisper.cpp build, the TTS
script, the Apple audio helpers, opencv.js and the Lambda handler reinstall or rebuild
instead of running such a file, and trustedCacheRoot moves their installs to
~/.cache/hyperframes when another account can write HYPERFRAMES_CACHE_DIR.

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

* fix(cli): seal own cache installs against umask 002 and repair old lock folder modes

sealCacheInstall (core/cache-dir) takes group and world write off what this account just
installed and the folders above it up to the cache root, so an install made under umask
002 passes foreignWritablePath on the next run instead of being refused and fetched again.
Chrome, optional packages, the whisper.cpp build, opencv.js, the TTS script, the Apple
audio helpers and the Lambda handler call it after installing.

ensureLockDir makes an existing per-user lock folder 0700 again when an older release left
it open, and adds the sticky bit to an existing HYPERFRAMES_RENDER_LOCK_DIR folder, warning
once with the folder's name when it cannot.

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

* refactor(cli): drop added comments to pass the comment ratchet

The explanations move into names: the mode bits in core/cache-dir are GROUP_OR_WORLD_WRITE
and WITHOUT_GROUP_OR_WORLD_WRITE, and the owner check is anotherAccountCanWrite. No change
in behaviour.

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

* fix(cli): verify the lock folder through a no-follow handle and stage installs owner-only

The render lock folder is opened with O_NOFOLLOW | O_DIRECTORY and checked and chmod-ed
through that descriptor: a link, or a folder another account owns (root may own a shared
one), is refused with RenderLockFolderRefused instead of being made world-writable or
used as is.

Chrome staging, the optional-package staging folder, the whisper.cpp build folder and the
opencv, TTS, Apple helper and Lambda handler folders are created 0700, and Chrome's staged
tree is sealed before it leaves staging, so nothing is group-writable while it installs.

foreignWritablePath accepts a sticky folder owned by this account or root, as /tmp is, and
tolerates a statSync without options; tests whose cache sat directly in /tmp, and tests
that mock statSync, failed on both. Docs note that a record naming a live process of
another account holds the shared slot.

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

* test(cli): skip the uid-based Chrome cache refusal cases where there is no uid

Windows has no process.getuid, so the ownership check never runs there and the two cases
that expect a refusal cannot hold.

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

* chore(core): raise the unpacked size budget for the cache ownership checks

core grew to 4418013 bytes unpacked with foreignWritablePath, sealCacheInstall
and trustedCacheRoot; the budget follows the usual 5% headroom over that size.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 15:21:35 +00:00
Vance IngallsandClaude Opus 5.5 ead110aab9 fix(engine,producer,cli): media inputs refuse formats that open other files (#7931)
* fix(engine,producer): media inputs refuse formats that open other files

Composition media read by ffprobe/ffmpeg now passes a format allowlist on every
input: the demuxers the installed ffmpeg reports, minus the ones that open other
files or URLs on their own (DASH, IMF and similar). hls and concat stay allowed,
since ffmpeg carries the list into every file they open. The HDR window,
alpha-plane, GIF, HEIC, audio-sidecar and snapshot reads that skipped it now use it.

The not-media check skips ID3v2 tags before it looks at the first byte, refuses a
playlist entry that is a document, and refuses JSON or non-SVG markup as an <img> src.

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

* fix(engine,parsers,core,lint,cli): format allowlist reads old listings and covers every media probe

The demuxer listing is read from the binary that enforces the flag, accepts ffmpeg 4's
two-column output, and a failed listing is asked again next time. The lint HEVC probe,
the grade analyzer and the snapshot probes use it too. A nested playlist entry is refused
only for a real document signature, so encrypted segments and keys are kept; an image whose
prolog outruns the sniff window, or that is UTF-16, is no longer refused.

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

* chore(parsers,producer): trim comments added with the media format list

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

* test(engine): keep the format-limit probe's argv in the shape the ffprobe contract reads

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

* fix(engine): the image markup check reads a doctype without regex backtracking

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

* chore(parsers): raise the parsers size budget for the media format list

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 00:35:56 -08:00
Miguel Ángel b741ecf132 feat(studio): a sealed preview frame forwards Studio's playback keys (#7844)
* feat(studio): a sealed preview frame forwards Studio's playback keys

* fix(core): a key held while Studio re-sends its watch list still forwards its keyup

* fix(core): the key watch adds and removes its listeners by name, as the runtime typecheck needs

* chore(producer): raise the unpacked size budget for the runtime's key forwarding
2026-11-16 08:09:03 +00:00
Michael Wang d5f0b1a5bf fix: nested .hyperframes stays private, capture page server checks Host, project manifests pin no CLI (#7927)
* fix(core): a .hyperframes folder in a subfolder stays private too

The private-file rule treated .hyperframes as the app's records folder only at
the project root. A project copied into a subfolder keeps its own
.hyperframes/, and its chat history, hand-off and other records there were
listed in the file tree and served by Studio's file and preview routes and by
the other file servers that share the rule.

A .hyperframes segment at any depth is now private, in every spelling Windows
opens. Studio's own files and the prepared-assets and requests folders stay
servable only at the root, the one place Studio reads and writes them. The file
tree also skips .hyperframes/backup at any depth.

* fix(cli): the capture --local-file page server answers only its own host

The page server that capture --local-file starts on a loopback port answered a
request whatever its Host header said. A site whose name resolves to 127.0.0.1
could then read the files it serves from the browser.

The server now refuses, before any file lookup, a request whose Host is not its
own loopback name and port, with the same isOwnLoopbackHost rule the static
project server and the engine file server use. Every response carries
X-Content-Type-Options: nosniff. The capture browser loads the page by
127.0.0.1 and its port, and fetchLocalPageUrl reads from disk, so both work as
before.

* fix(skills): a plugin manifest in the project pins no CLI release

The skills launcher read a plugin manifest from the folder above skills/
wherever the skills were installed. For a project-level install that folder is
the project itself or its .agents or .claude folder, so a plugin.json shipped
with a project could pin an old hyperframes release and turn off update checks
and standalone skill refreshes.

The launcher now reads a manifest only from a bundle of its own: a folder whose
name does not start with a dot and that is neither the folder the CLI works in
nor one that contains it. Plugin managers install bundles into their own
folders, so those keep their pin. A manifest anywhere else leaves the call the
same as with no manifest. A manifest that pins a release older than 0.9.34, the
launcher's floor, is refused. The agent-facing plugin rules and the skills
guide say the same.

* fix(skills): a plugin bundle inside the working folder pins only behind a dot folder

A package inside a monorepo could still pin the CLI: with the agent working at
the monorepo root, <mono>/packages/video/plugin.json sat beside a skills folder
the launcher took for a bundle.

The launcher now also refuses a bundle inside the working folder unless a
folder whose name starts with a dot lies between them, as .claude does in
~/.claude/plugins/cache when the agent works in the home folder. Bundles in
~/.claude/plugins, ~/.cursor/plugins and ~/.gemini/extensions keep their pin
from the home folder or a project. The plugin rules and the skills guide now
state the three conditions the launcher checks.

* docs(cli): a .hyperframes folder in a subfolder is left out and not served

The private-file rule now treats a .hyperframes/ folder at any depth as the
app's records. Files stored in one inside a subfolder, assets included, stay out
of uploads and are not served by Studio, preview or render. The cloud render
section now says so beside the rule it already describes.

* fix(cli): capture pages keep loading scripts with no or unlisted extensions

With nosniff on every response, a script the capture page server did not
know the type of (a .cjs file, or a file with no extension) was served as
application/octet-stream, and the browser refused to run it.

The server now names .cjs, .wasm, .xml, source maps, web manifests, CSV,
WebVTT, glTF and more audio, video and image types. A file whose type is still
unlisted is served without nosniff, so the browser sniffs it as it did before
and such a script runs. Every listed type and every empty error response keeps
nosniff.

* fix(share): sync and share leave out a .hyperframes folder below the root

The .hyperframes rules in the source path policy matched only at the project
root, so a copy's records in a subfolder, such as
sub/.hyperframes/agent-runs.jsonl, fell through to the default rule and
travelled with share and sync.

A new nested-hyperframes-state rule leaves out a .hyperframes folder at any
depth below the root. It sits before the first allow rule, as the contract's
rule order requires. The root folder's Studio files and other portable files
travel as before. Stored snapshot reads skip the new rule through
stored_manifest.legacy_rule_regexes, the shape the server and Desktop copies
already use, so snapshots and bindings captured earlier still read.
2026-11-16 07:18:57 +00:00
Miguel Ángel 889143eac9 fix(core): a color-graded video's dissolve and wipe play in preview and export (#7756)
* fix(core): a graded video's opacity animation reaches its export

* fix(core): a graded clip keeps its own clip-path, so it never renders black

* test(producer): golden render of graded video dissolve and wipe

* fix(core): a graded clip stays clickable in the preview, hidden by a filter not a clip

* chore(studio): drop an import the reader no longer uses, and format the graded fixture
2026-11-16 07:06:33 +00:00
Miguel Ángel d42bbd67f4 fix: warnings that name project files print control characters as visible escapes (#7863)
* fix: warnings that name project files print control characters as visible escapes

The CLI already escaped control characters in the text its own commands
print, but warnings from core, producer and engine went to the terminal
raw. A composition whose sub-composition path held ESC or BEL still
drove the terminal through the bundler's "Skipping sub-composition"
warning in `info --media` and `snapshot`.

terminalText moves to core so there is one sanitiser, the CLI imports it
from there, and the library warnings that carry project text (the
bundler, the producer logger, the file server, render path skips, asset
load failures, FrameCapture, the import map, fonts, figma and atomic
file warnings) pass that text through it.

* fix: every library warning that carries project text escapes control characters
2026-11-16 04:56:36 +00:00
Miguel Ángel 846cce4891 fix(cli): the CLI trusts a preview only once it proves this user started it (#7899)
* fix(cli): the CLI trusts a preview only once it proves this user started it

* test(cli): a listener that cannot prove it is the user's preview is never trusted

* test(cli): stand-in previews answer the challenge as the user's own do

* style(cli): format the preview proof changes

* fix(cli): a preview's proof names its own endpoint and config, and the token file must be private

* style(cli): format the proof changes

* test(studio): the fake request in the host check has a socket, as every real one does

* fix(studio): a Studio started by hand proves it is the user's, so the CLI still finds it

* fix(cli): the challenge travels in a header, so Studio's routes keep their exact paths

* style(studio): keep the config producer compact
2026-11-16 03:15:26 +00:00
Michael Wang 014326b40b fix: every composition file server refuses credential and tool-state files (#7889)
* wip: paused before review

* test: cover credential files on the preview routes and the deploy notice

* refactor: name the inspector's file lookup for what it serves

* fix(cli): a link to a private file outside the project keeps its own left-out reason

* fix: escape the upload notice and skip private files from old manifests
2026-11-16 01:42:08 +00:00
Michael Wang 97d8f26e71 fix(core): the runtime bridge checks every control payload before use (#7892)
* wip: paused before review

* fix(core): keep the flash fade, with a checked duration set per element

* fix(core): find stylable flash targets with the realm-safe predicate
2026-11-16 01:30:38 +00:00
Miguel Ángel 082d63683f perf(core): a preview build scans a large page without copying it per pass (#7878) 2026-11-16 00:54:51 +00:00
Miguel Ángel 5341d7255c feat(studio): the console errors panel reads a sealed preview over its editing port (#7824) 2026-11-15 17:14:34 +00:00
Michael Wang 962ddb7c54 fix: render, capture and bundling refuse the app's .hyperframes records (#7828)
Render, capture and the HTML bundler used a narrow private-file rule that
only refused Git data and env files. A composition's script could read the
app's own records under .hyperframes/ (chat history, hand-off, comments,
job log) from the file server, or a data-composition-src could inline one.

Every file server a composition reaches now uses the rule Studio, play and
present already use: Git, env, and .hyperframes/ apart from Studio's own
files and the prepared-assets and requests folders. The rule now matches
Windows spellings too: any case, trailing dots or spaces, backslashes and
stream suffixes.
2026-11-15 17:10:00 +00:00
Miguel Ángel ef42bef9c3 refactor(core): Studio's key combo and typing-target rules live in core (#7835)
* refactor(core): Studio's key combo and typing-target rules live in core

* chore(core): raise the packed size budget for the key-combo and typing-target subpaths
2026-11-15 15:42:04 +00:00
Miguel Ángel 6a8f4b5b46 fix(core): pages with many CJK characters fetch fonts in several requests (#7823)
* fix(core): pages with many CJK characters fetch fonts in several requests

* fix(core): keep text that shapes together in one font request

* fix(core): keep composing characters and their composed forms in one font request

* fix(core): composed forms keep their case variants in the same font request
2026-11-15 12:11:08 +00:00
Michael WangandClaude Opus 5.5 ac02474105 fix(cli): play and present check the Host like preview; local render leaves out outside files for a received composition (#7792)
* fix(cli): a subfolder of an imported project keeps its received-files record

Publish, cloud render and feedback now read the received-files record at
the nearest folder at or above the one they stage, so staging a subfolder
of an imported project still leaves out the outside files its received
files reference.

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

* fix(cli): a received file counts under any spelling of the same file on disk

The received-files lookup now also matches a project file that is the
same file on disk as a listed path, so a name respelled in letter case on
a case-insensitive disk keeps its received status.

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

* fix(cli): cloud render prepares only the GIFs staging kept

The entry GIF prep before a cloud render upload now reads only the staged
copies it is handed. An image whose source staging left out keeps its
reference as written and is never read from disk.

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

* fix(cli,studio-server): never hand a playlist named as media to ffmpeg

A media file whose first bytes are an HLS playlist, an XML manifest or a
concat script now stays out of ffprobe and ffmpeg: cloud render leaves it
in the zip as authored, the media probe reports it as not media, and the
proxy copy refuses it. Real media never starts with these bytes, so it
probes and transcodes as before.

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

* fix(studio-server): catch playlists with control bytes, and keep them from stills and audio probes

A text playlist or concat script is detected whatever bytes follow its
first line; only markup must be all text. A still frame and the audio
probe behind waveforms, peaks and loudness now refuse a file the probe
reads as not media, as the proxy copy already does.

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

* fix(cli): a parent folder's state the CLI cannot read never marks a project received

The walk up for a received-files record now skips a parent whose record
cannot be reached. Only a record file that is there but cannot be read
or parsed counts every file as received.

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

* fix(cli): a drive that reports no file ids matches no received file by identity

Some network and virtual drives report a file id of 0 for every file, so
the same-file match now gives such a file no identity instead of
matching it to every listed file.

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

* refactor(studio-server): read a media file's first bytes with a read stream

The playlist check reads the first 64 bytes through a bounded read
stream instead of a raw file descriptor, and the audio-track probe's doc
comment sits on its function again.

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

* chore(studio-server): raise the packed size budget for the media playlist check

Main packs @hyperframes/studio-server close to the 1% tolerance on the
168500 budget, and the playlist check adds about 320 bytes, which put
the Build over. Set the budget to 172000.

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

* fix(cli,studio-server): open media only through self-contained media demuxers

Every ffprobe and ffmpeg input that cloud render offload, the publish
proxy bake and Studio's media helpers open now carries a demuxer
whitelist built from the supported media extensions: MP4/MOV/M4A/AVIF,
Matroska/WebM, MXF, AVI, MPEG-PS/TS, FLV, ASF, Ogg, WAV, MP3, AAC, FLAC,
AIFF and the still-image formats. Playlist, manifest and concat demuxers
can no longer open, whatever a file's bytes say. The proxy's own concat
step is left as it is.

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

* fix(cli,studio-server): keep media probe argv flat, and expect the demuxer list in loudness args

Two probe argv literals built from nested spreads are flat again, so
"--" stays the visible second-to-last entry the argv contract checks.
The normalize-audio test expects the demuxer list before the input.

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

* fix(cli): play and present answer only local host names and allowed hosts

play and present listen on every interface. Each request now passes the
same Host check preview uses: localhost, loopback addresses and this
machine's own addresses and names are answered, and any other host name
gets a 403 naming HYPERFRAMES_PREVIEW_ALLOWED_HOSTS until it is listed
there. Phones and other machines on the network still open them by LAN
address or .local name.

* fix(cli): a local render of a received composition leaves out files outside the project

When the composition a local render opens is listed in the project's
received-files record, hyperframes render (full and range) no longer
brings in files outside the project. It prints one line naming the
references it leaves out and why. An unreadable record counts as
received. A project whose entry is the person's own, or that has no
record, renders exactly as before.

* fix(cli): received-render scan reads safely and treats an unreadable record as unknown

The scan behind the received-composition notice skips a file it cannot
read, finds url() references with a linear forward scan, and reads at
most 2 MB of each file. An unreadable received-files record no longer
counts as everything received for local render: the render keeps
outside files and names the record it could not read. Publish and cloud
upload still treat it as received. The notice now says the render stops
on a sub-composition outside the project rather than leaving it out.

* fix(cli): the studio render of a received composition leaves out files outside the project

The Studio render route applies the same rule as hyperframes render:
when the composition it renders is listed in the received-files record,
the job does not bring in files outside the project, and the server log
names the references it refuses.

* chore(cli): name the unreadable received-files record helper without a comment

* fix(cli): local render refuses outside files when any composition it plays was received

The received-file rule for local render (CLI and Studio) now checks
every page and stylesheet the render pulls in, not only the entry, so
an own index.html that plays a received scene also reads nothing
outside the project, and the notice names the received file. An
unreadable, truncated or empty received-files record refuses outside
files too, as publish and cloud upload do, and the notice names the
record it could not read.

* fix(cli): decide a received render from the files the compiler reads

Local render (CLI and Studio) now leaves outside-file handling as it is
for a project with no received-files record or an empty one, without
scanning anything. When the record lists files, the compiler's own read
list for the composition decides: the bundler runs out of process with a
deadline and reports every project file it reads, so stylesheet imports
and files past any scan limit count. A received file in that list, a
build that fails or runs past its deadline, or an unreadable record
refuses outside files. The scan that names refused references in the
notice is advisory only: it guards every file system call, tracks visited
files by real path, and caps the files and bytes it reads.

* fix(cli,producer): decide a received render with the render compiler's own composition traversal

The producer exports renderCompositionFiles, which walks
data-composition-src with the same resolution, normalization and private
file rules the render's sub-composition pass uses; that pass now calls
the same helper. The received-render decision adds those files to the
bundler's read list, so leading-slash and percent-encoded references the
render reads count. The advisory scan resolves compositions the same way
and reads template contents.

* fix(cli): refuse outside files in a local render whenever the project has received files

A local render (CLI and Studio) reads nothing outside the project when
the project's received-files record lists any file, or cannot be read.
No static list matches what a render consumes: the page loads its
stylesheets and scripts through the browser at capture time, and
scripts can load more, so the decision no longer depends on one. The
reference scan stays only to name what the notice says is left out. This
drops the out-of-process bundler read list and the producer composition
walk added for that decision.

* fix(cli): refuse outside files only when a received file can load other files

A local render (CLI and Studio) reads nothing outside the project when
the received-files record cannot be read, or lists a received file that
can reference others: an .html, .htm, .css, .js, .mjs, .cjs or .svg
name, or content that reads as HTML, SVG or CSS. A project that only
received images, video, audio or fonts keeps bringing in outside files
as before.

* fix(cli): keep outside files only when every received file is positively media, a font or an image

A local render keeps bringing in outside files only when each file the
received-files record lists has a known media, font or image extension
and starts with that type's signature bytes. Any other received file, a
listed file that is missing or unreadable, or a mismatch between name
and content refuses outside files. An ancestor record's entries now
match a subfolder whose name is spelled in another Unicode form; the
entry keeps its own spelling on disk.

* fix(producer,core): a sub-composition must be an .html file

The render compiler and the runtime load a data-composition-src only
when it names an .html or .htm file. Any other file, such as an image or
video, is refused as a page: render stops naming it, and the runtime
reports the load failure without fetching it.

* fix(producer,cli): the render and static file servers forbid type sniffing

Both servers send X-Content-Type-Options: nosniff with every response,
so the browser loads a file only as the type its extension names: an
image or video cannot run as a script or apply as a stylesheet. .cjs is
served as JavaScript.

* test(cli): a received media file in a composition slot is refused as a page

* test(cli): an empty nested received-files record cannot hide an outer record's received page

* fix(cli): a received media file reached under another name refuses outside files

The received-render decision now compares file identities, not names.
It walks the project once, bounded by entry count and time, and refuses
outside files when a hardlink or a symlink with a name that is not
media reaches a received file, or when the walk cannot finish. A
received file with no identity matches nothing, as in the received
files check.

* fix(cli): compare received files by link target and keep outside files for an empty record

A received media file and every other project name are now compared by the
identity of the file they reach with links followed. A linked folder that
leads outside the project, or a file whose identity cannot be read, counts as
unchecked and refuses outside files. An empty received-files record keeps
outside files without walking the project.

* chore: raise the producer unpacked size budget for the composition file checks

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 09:48:01 +00:00
Michael WangandClaude Opus 5.5 c4d60c347f fix: Studio media routes refuse cross-site load, CLI escapes terminal text, batch outputs stay in their folder (#7779)
* fix(cli): batch render outputs stay inside the --output folder

A row value may still name a subfolder of the folder written before the
template's first placeholder, but a value that resolves outside it stops
the batch before any folder is made or file is written.

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

* fix(cli): project text shows control characters as visible escapes

compositions, lint, snapshot and info --media print composition ids, sources,
element ids, lint messages and media paths through one helper that writes
C0, DEL and C1 control characters out as \xNN, so they reach the terminal as
text. The CLI's own colors are unchanged.

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

* fix(studio-server): waveform and peaks key one cache entry per file and refuse other sites

Both caches are keyed on the resolved project-relative path, so another
spelling of the same file (a doubled or trailing slash) reads the cached
peaks instead of decoding again. Waveform and peaks requests that another
site makes are refused the way thumbnail requests already are; the Studio
page asks for both as itself.

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

* fix(studio-server): preview stills run at most four at a time

A video's stand-in still is made through a small job queue: four at once,
32 more waiting, and a 503 with Retry-After beyond that. A waiting request
whose client goes away leaves the queue without starting ffmpeg.

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

* fix(cli): batch output folder check keeps backslash names and row-named paths

A trailing backslash counts as a separator only where it is one, and the
check compares path segments. A template that starts with a placeholder names
no folder, so each row's value is the whole output path as before.

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

* fix(cli): lint header shows control characters in file names as escapes

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

* fix(studio-server): a finished or in-progress still never waits for a still slot

Only a still that is neither on disk nor already being made takes one of
the four slots, through a hook resolveStill gives the route. Waiters queue
without a cap and nothing answers 503, since a poster is never asked for
again. A waiter whose client leaves still never starts ffmpeg; a request
that shared that waiter's still tries again on its own.

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

* chore: raise the studio-server packed budget to 172000

main already packs about 170 KB against a 168500 budget; the request guards,
still slots and cache-key change here add about 550 bytes.

* fix(core,studio-server): a preview served to another site offers no editing port

When the Studio server answers a preview document to another site's
request, it now marks the document, and the runtime's editing agent
ignores every connect in a marked document. The Studio's own frames,
which load the preview from the same origin, keep the editing port.
The marked copy carries no ETag, so it is never revalidated in place of
the unmarked one.

* fix(studio-server): a media still stops when no request waits on it

Each still job now counts the requests waiting on it. A request whose
connection closes leaves the job, and when the last one leaves, the
job's ffmpeg is killed and the job is forgotten, so the next request
starts afresh. A caller that passes no signal keeps the job running,
and a request that has already closed starts nothing.

* test(studio-server): group the still cancellation tests after the real-ffmpeg still test

* fix(studio-server): a preview framed by another site is never revalidated

A frame load of a preview from another site now drops If-None-Match and
If-Modified-Since before the route answers, so it always gets a fresh,
marked document instead of a 304 that could reuse the unmarked copy a
browser cached for the Studio's own page on the same site. Subresource
loads keep their validators.

* fix(cli): check findings and keyframes headers show control characters as escapes

check prints each finding's message, source file, selector and fix hint, and
keyframes prints each composition's name and source, through terminalText.

* test(studio-server): a request sharing an abandoned still waiter gets its still

* chore(studio-server): raise the unpacked size budget for the still job slots and cross-site guards

* fix(cli): layout and contrast lines in check show control characters as escapes

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:57:32 +00:00
Michael Wang ded5e3eec2 perf: CSS url, @import, @font-face, style and comment scans run in linear time (#7809)
* perf(parsers): find CSS url() references in linear time

A new css-url-scans entry finds what each CSS url( regex in the compile path
and the runtime finds, match for match and group for group, with forward
scans. The regexes restart from every unclosed url(, @import or background:
and read to the end of the text each time, so their time grows with the
square or cube of the input. The scans read each character a bounded number
of times.

rewriteCssAssetUrls uses the scan in place of CSS_URL_RE, which stays
exported for existing callers. A fuzz test checks 20,000 generated pages
against the regexes, and timed tests cover 1 MB of each unclosed form.

The parsers packed-size budget rises to cover the new entry.

* perf(core): bundler, SVG id namespacing and runtime find CSS urls in linear time

The bundler's url() inlining, CSS-file rebasing and @import inlining and
hoisting, the SVG url(#id) rewrite, the runtime's sub-composition url()
rewrite and the scene swap's url and @import list now use the
@hyperframes/parsers css-url-scans entry. Each returns the same matches as
the regex it replaces, in time linear in the CSS length.

* perf(producer): compile finds CSS urls, imports and backgrounds in linear time

Asset collection, head-style @import coalescing, the ancestor
background-image check, remote background and font-face url localization and
local font embedding now use the @hyperframes/parsers css-url-scans entry,
which returns the same matches as the regexes it replaces. A timed test
covers remote background discovery on 200 KB of unclosed background urls.

* perf(parsers): scan style blocks, font-face blocks, comments and mask urls in linear time

css-url-scans gains forward scans for `<style>` blocks, `@font-face { }`
blocks, `/* */` comments, the quoted-or-bare `url()` form and the
`mask-image: … url()` declaration. Each returns the same matches and groups
as the regex in its doc comment. The fuzz test now checks all fifteen scans
on 20,000 generated pages, and the timed tests cover 1 MB of each unclosed
form.

* perf(core): strip and restore stylesheet comments in linear time

Bundling a stylesheet finds its comments with the parsers comment scan and
puts them back in one pass over the placeholders. A comment comes back
verbatim, including text such as `$'` that a string replacement pattern
would expand.

* perf(producer): find style and font-face blocks in linear time

Remote font discovery and local font embedding read `<style>` blocks and
`@font-face` rules with the parsers scans, which return the same blocks as
the regexes they replace.

* perf(lint): read stylesheet and mask-image urls in linear time

The missing stylesheet asset and texture mask rules find `url()` values with
the parsers scans, including the mask-image fallback for a stylesheet that
does not parse.

* perf(cli): rewrite published CSS urls in linear time

Publishing rewrites stylesheet `url()` references with the parsers scan in
place of CSS_URL_RE, with the same matches.

* chore: size budgets cover the CSS scans in parsers and inspector

verify:packed-manifests measures parsers at 894,913 unpacked bytes and
inspector at 3,764,456, both just over 1% above their budgets once the
linear CSS scans are bundled. The budgets rise to 900,000 and 3,790,000.

* perf(parsers): scan stylesheet links and CSS rules in linear time

css-url-scans gains forward scans for `<link … rel="stylesheet" …>` tags and
`selector { declarations }` rules that return the same matches and groups as
the regexes in their doc comments. Both join the 20,000-page fuzz test and
the 1 MB timed tests.

* perf(core): restore stylesheet imports and list scene font faces in linear time

Bundling a stylesheet puts its comment and @import placeholders back in one
pass, so an imported sheet comes back verbatim and is not searched again.
fontFaceBlocks lists @font-face rules with the parsers scan. A fuzz test
checks the one-pass restore against the sequential one on 20,000 sheets.

* perf(producer): find stylesheet links, CSS rules and font-face blocks in linear time

Font stylesheet inlining and project font discovery find stylesheet links,
and the ancestor background check finds CSS rules, with the parsers scans.
extractFontFaceBlocks matches every brace in one pass instead of counting
depth again from each @font-face; a fuzz test checks it against the depth
count on 20,000 sheets.

* test(core): time the CSS placeholder restore directly

The bundle test with 6,000 imports was timed mostly on 6,000 file reads,
which took 2.7 s on the Windows runner. The restore is now timed on its own
over 20,000 placeholders, and a short bundle test still checks that every
import of a sheet is inlined.
2026-11-15 08:22:52 +00:00
Miguel Ángel a92498b903 fix(studio-server): save an edit Windows briefly holds without freezing the app (#7744)
* fix(studio-server): save an edit Windows briefly holds without freezing the app

* fix(studio-server): keep later edits behind a held one, one backup per replay

* fix(studio-server): send a held cut again, and keep the sync retry for rollbacks
2026-11-14 16:07:36 +00:00
Miguel Ángel b746a0ee13 fix: check, render and downloads work on a drive without hard links (#7737)
* fix(studio-server): check and render keep their history on a drive without hard links

The history lock had its own list of the errors that mean a drive cannot
hard-link, and it lacked EISDIR, which Windows returns on a Google Drive
folder. Every check report and render record there failed. The lock now
uses core's list, the one owner, which also gains ENOSYS from the lock.

* fix(engine): downloads and plan blobs publish on a drive without hard links

The producer's plan publisher kept a third list of no-hard-link errors
without EISDIR, and the downloader had no fallback, so both failed on a
Google Drive folder. Both now use core's cannotHardLink; the downloader
copies into an exclusively created file, so it still never overwrites.

* fix(engine): a download on a drive without hard links publishes atomically

Instead of copying into an exclusively created file, the fallback renames
the staged download into place under the cache path lock when nothing is
there yet, so a killed run never leaves a truncated file to reuse.
2026-11-14 15:47:18 +00:00
Miguel Ángel 32f562bbd0 feat(core): a folder with index.html is one a step can work on, apart from finding projects (#7734)
* feat(core): a folder with index.html is one a step can work on, apart from finding projects

isHyperframesProject needs index.html and a marker file, which is right for finding projects on a computer (a
website's folder must not be listed) but not for what a step works on. isCompositionFolder says that: any folder
whose index.html is the composition.

* build(core): raise core's unpacked size budget for the step folder rule
2026-11-14 14:02:28 +00:00
Miguel Ángel b5e9bc6893 fix(studio-server): an edit to a read-only project file is refused and leaves it unchanged (#7731)
* fix(studio-server): an edit to a read-only project file is refused and leaves it unchanged

* test(core): read the refused file without a stat check first
2026-11-14 12:10:48 +00:00
Miguel Ángel 2f0ade1815 fix(core): at full quality a 4K clip plays a copy at the size the preview shows it (#7723)
* fix(core): at full quality a 4K clip plays a copy at the size the preview shows it

* fix(core): names carry the copy rule, not comments

* fix(core): a clip whose copy fails is left held as it was, so its decoder is still freed when idle

* fix(core): the copy hold lives with the copy code, keeping core inside its size budget
2026-11-14 08:09:33 +00:00
Miguel Ángel 798c241e4d feat(cli): name a caller's owner id on the browsers and warm check it starts (#7687)
A caller that runs several renders at once sets HYPERFRAMES_OWNER to a per-run id; every browser the CLI or
engine launches and the warm check server carry --hyperframes-owner=<id>, so the caller can tell one run's
leftovers from another's.
2026-11-14 02:42:11 +00:00
Miguel Ángel 49623307ce fix(core): stop a cancelled audio envelope from crashing the page (#7682)
* fix(core): stop a cancelled audio envelope from crashing the page

cancelParamLane held the value with AudioParam.cancelAndHoldAtTime. In
Chromium before 160 that call hits NOTREACHED in
AudioParamHandler::EventToString and takes the page down when the hold
lands inside a value curve whose end marker sits before it. The lane now
reads the value it reached, clears the param and writes that value back.

* fix(core): keep the audio automation comment share flat

* fix(core): fold the cancelParamLane doc comment to two lines
2026-11-14 02:24:58 +00:00
Miguel Ángel 92816ed56b perf(core): a reloaded preview video resyncs only itself (#7684)
A paused preview's loadedmetadata handler put a reloaded video back at the playhead by resyncing every clip and re-deciding every timed element in the film. It now syncs and decides only the video that reloaded.
2026-11-14 02:04:23 +00:00
Miguel Ángel 45882027bd feat(cli): check warns when text leaves the 9:16 social safe areas (#7680)
* feat(cli): check warns when text leaves the 9:16 social safe areas

* feat(core): safe areas owned by core; check adds --safe-zone standard

* style(cli): format

* refactor(core): name the safe-area band fields

* fix(cli): defects outrank safe-zone warnings at the issue cap

* style(cli): format

* test: read the safe-box constants from core
2026-11-14 02:00:15 +00:00
Miguel Ángel f7b49f1207 fix(core): free a preview clip's decoder when the playhead leaves it (#7679)
* fix(core): free a preview clip's decoder when the playhead leaves it

* fix(core): keep audio buffered when the playhead leaves it, free only video decoders

* fix(core): leave Safari's loaded video alone when the playhead leaves it
2026-11-14 01:54:54 +00:00
James RussoandClaude Opus 5.5 6bdf929164 feat(studio): drag and resize on an opaque preview start from one gesture-start read (#7657)
* feat(studio): drag and resize on an opaque preview start from one gesture-start read

A gesture on a preview frame Studio cannot script read nothing from the
frame as it started. A drag snapped to nothing; a layer GSAP holds moved by
a CSS translate that its save then dropped; a resize grew from the overlay
rect, the layer's GSAP scale included; and the pointer reached the element
only through the canvas zoom.

The runtime answers a new `gesture-start` request. For each pressed element
it gives the overlay geometry, the transform-free layout size, how far the
centre moves per px of translate (probed the way a draft draws it, every
transform above it applied), and GSAP's x/y when GSAP owns its position,
with whether a tween moves it. It also lists the boxes of the page the
gesture can snap to, walked by the rule Studio's own snap collection now
takes from core.

On an opaque preview every press waits for that one read, on the existing
waiting-press path, and the gesture starts from it: the snap targets, the
move route and GSAP base (so the save writes GSAP's x plus the drag, not the
drag alone), the pointer-to-offset matrix, and the resize's base size. A
layer a tween moves is refused with a notice, since saving that move still
reads the frame.

Same-origin frames do not change: their presses start at once from the
element, and their snap collection walks the same elements by the same rule.

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

* chore(inspector): raise the packed size budget for the gesture-start runtime

The inspector bundles core's preview runtime. Main alone packs to 866206
bytes, 420 under the 1% tolerance on the old 858046 budget; the
gesture-start request adds 713 bytes (866919), which tipped the merge
queue's Build over. Set the budget to 880000 to leave room for the
remaining opaque-preview requests.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 19:42:26 +00:00
terencechoandClaude Opus 5.5 b8f630c643 fix(core): a looping preview keeps playing when a scene reloads during a hold for data (#7659)
* fix(core): a looping preview keeps playing when a scene reloads during a hold for data

A Studio preview unloads scenes far from the playhead. On a long film, the
loop's wrap back to the start lands while the first scene is reloading: the
film holds for its video, then the scene swap re-seeks with keepPlaying. The
seek read the held film as paused, dropped the hold and parked the film at the
start, so the loop stopped after its second pass.

A seek that keeps playing now counts a hold for data as playing.

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

* refactor(core): name the playing-or-held check and drop history from its test comment

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 19:18:24 +00:00
Miguel Ángel ccdcf6710c perf(core): open the preview's audio context when a clip with sound plays (#7658) 2026-11-13 18:56:47 +00:00
James RussoandClaude Opus 5.5 87c4a07dc9 feat(studio): drag and resize draw live on an opaque preview over its channel (#7646)
* feat(studio): drag and resize draw live on an opaque preview over its channel

On a preview frame Studio cannot script, a drag moved only the selection
outline: the element stayed put until the save reloaded the preview. A
resize threw on every pointer move (it measured the frame's element for the
centre pin), saved its size without the centring shift, and then a drag or
resize save threw while re-syncing the preview's timeline, which stopped the
save queue and paused the preview.

The runtime answers a new `draft` request: it adds a gesture's translate to
the one the element had and sets its border box, the way the save writes
them, and an end either keeps what is drawn (the save landed) or puts back
what was there (a cancel, a tap, a failed save). Studio mirrors what a
gesture draws on an opaque selection's stand-in to the frame, one request in
flight per frame with later moves merged into the next. An opaque resize
grows the outline about its centre from the size it wrote rather than
measuring the frame. The timeline re-sync after a save reports a frame it
cannot reach, so its caller re-seeks or reloads instead of throwing.

A stand-in now starts with the inline translate and Studio size and offset
of the element it stands for, so a drag on a freshly reloaded preview starts
from where the element is. Before, a second drag after a reload saved only
its own distance and dropped the first.

Same-origin frames do not change: only an opaque selection's stand-in is
mirrored, and the re-sync change only catches a read such a frame refuses.

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

* fix(core): draft writes test an element by its namespace, not its realm

The runtime preview guard bans instanceof HTMLElement/SVGElement in the
runtime, since a node from another realm fails it; the draft handler uses
isStylableElement from domRealm.ts, as other runtime style writes do.

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

* fix(studio): keep the opaque preview's gesture drafts in step with the saved edit

- Grabbing a layer again before its last save settles keeps that save's draft
  on the frame and draws the new gesture from there; the movement probe's
  restore no longer ends a draft it never drew.
- A move on an opaque preview starts from the px the frame renders the
  translate at (%, em, var(), or a stylesheet translate), records the author's
  own value for Reset, and refuses a % it cannot size instead of dropping it.
  The frame's draft base resolves % to px, so a resize can't shift it again.
- The stand-in carries Studio's translate marks, so Reset after a reload
  restores the author's translate.
- A resize with no offset member keeps its draft once saved.
- An undo painted over a pending move draws the move again when it is put back.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:01:16 +00:00
Miguel Ángel 0bce3315e6 fix(studio): a file held open or read-only answers 423 or 403 with a reason, not 404 or 500 (#7649)
* fix(studio): a file held open or read-only answers 423 or 403 with a reason, not 404 or 500

* fix(studio): valid workflow name for the Windows held-file test

* test(studio): release the held file before the held-file test removes its folder

* fix(studio): the code editor's save toast names a held or read-only file
2026-11-13 16:10:01 +00:00
Miguel Ángel 9f0a4edb43 perf(core): the font step parses the page once for all its readers (#7650) 2026-11-13 15:58:02 +00:00
James RussoandClaude Opus 5.5 be67089a80 feat(studio): layers panel and marquee read an opaque preview over its channel (#7639)
* feat(studio): layers panel and marquee read an opaque preview over its channel

The runtime answers a new layers request with the Layers walk: each layer's
handle, depth, child count, z-index and kind, by the rules Studio walks a
scriptable frame with, which move to core. On an opaque frame the Layers
panel lists, selects and drills in from it, and the marquee measures its
candidates over the channel and selects from their descriptions. An opaque
selection maps to a timeline clip known only by its clip id, so a marquee's
picks survive the timeline sync.

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

* fix(studio): opaque preview hover, layers drill-in, marquee paging and delete path

Review follow-ups for the opaque-preview Layers panel and marquee:

- Delete on an opaque selection runs the DOM delete again. The clip-id match
  that lets a selection find a row known only by its clip id is now opt-in
  (`clipIdScope`), passed only by selection sync and the Layers seek, never by
  delete or group commits, which need a patch target that row lacks. A row
  with no file reads as in the open composition, as the forward lookup does.
- The runtime's `layers` reports a drill-in group it no longer has
  (`missingGroup`) and lists nothing, so the panel leaves the drill-in after a
  reload as the same-origin branch does, rather than list the whole page.
- `layers` takes an `offset`, and the marquee pages through every layer, so
  elements past one reply's 2,048 cap still band-select.
- A Layers refresh that lands while an opaque read is in flight runs once more
  when it settles, instead of being dropped.
- A hover resolved for a pointer move that a leave or newer move superseded is
  dropped.
- `pointer-targets` reads the hit stack once per request.

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

* test(core): keep the layers paging test inside the Windows runner's timeout

The paging test walked the 2,051-layer page three times with every row
mapped, which ran past 5 s on windows-latest. It now maps only the last
page's rows and has its own 20 s timeout.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 07:48:32 +00:00
James RussoandClaude Opus 5.5 7e04f3cce8 feat(studio): canvas click, hover and timeline select read an opaque preview over its channel (#7637)
* feat(studio): canvas click, hover and timeline select read an opaque preview over its channel

The runtime answers a new pointer-targets request with the canvas pick and its
cycle stack; the hit-test moves to core so Studio picks by the same rule on a
frame it can script. A data: value under the description limit now arrives
whole, so a small data: image is selectable on an opaque frame. Drill-in,
hover, timeline clips known only by clip id, and the stand-in attribute reads
in double-click, ungroup, path-offset and the agent selection context work
there too.

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

* chore(core): raise the core unpacked size budget for the pointer-targets hit-test

The hit-test moves from Studio into core's editing runtime, which core ships
in its runtime bundles; CI measured the unpacked tarball at 4,329,030 bytes.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 04:16:20 +00:00
James RussoandClaude Opus 5.5 24d56e6813 fix(engine): launch Chrome with only the env it needs (#7629)
* fix(engine): launch Chrome with only the env it needs

Every Chrome HyperFrames starts (render, GPU probe, HDR capture, startup
diagnosis, version and shell probes, CLI browsers, inspector) now gets an
allowlisted environment from @hyperframes/core/chrome-env instead of the
whole process env. HYPERFRAMES_CHROME_ENV_PASSTHROUGH names any extra
variable a host needs.

Refs #7623

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

* fix(core): keep the Chrome env passthrough across repeat filtering

The CLI GPU probe filters its env twice, which dropped the names
HYPERFRAMES_CHROME_ENV_PASSTHROUGH adds, so the probe and the render
saw different envs. Keep the passthrough variable itself.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 00:53:11 +00:00
James RussoandClaude Opus 5.5 faff4e16a8 feat(studio): read overlay geometry from an opaque preview over its channel (#7628)
* feat(studio): read overlay geometry from an opaque preview over its channel

The runtime's editing channel gains a `geometry` request: per element
handle its client rect, the corners it paints at when rotated, whether it
renders, its clip-path, its source boundary's size, a group wrapper's
member rects, and optionally one element's descendant boxes. On a preview
frame Studio cannot script, the selection, child, group and hover boxes,
the root scale (from the mirrored stage size) and a press held across a
preview change read that geometry, with one read in flight at a time.
Same-origin frames keep reading the DOM directly; the measuring code they
use now lives in core so both paths share one rule.

Also from the review of #7613: opaque selections carry `hasAudio` and
`src` read off the description, a description with a cut attribute or
inline style builds no selection, a failed computed-styles or root read
builds none either, and the group refresh threads its frame and leaves a
group the user changed meanwhile. `findClosestByAttribute`, left without
a caller by #7613, is removed.

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

* chore(producer): raise the packed size budget for the runtime's geometry read

The producer ships the preview runtime, which now carries the editing
channel's `geometry` request and the measuring code it shares with Studio.
The packed tarball measured 888,810 bytes in CI against an 880,000 budget.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 00:26:30 +00:00