Commit Graph
5129 Commits
Author SHA1 Message Date
Miguel Angel Simon Sierra 704efa145a test(studio): share the setup the new editing tests copied between files 2026-10-02 09:24:42 -07:00
Miguel Angel Simon Sierra 99985d3404 refactor(studio): type the preview slot props from the NLE context 2026-10-02 09:24:41 -07:00
Miguel Angel Simon Sierra ad8dca5fa8 test(studio-server): share one stub adapter across the route tests 2026-10-02 09:24:39 -07:00
Miguel Angel Simon Sierra 8b3c9ddd63 test(studio): share the WebMCP host shim between the browser gates 2026-10-02 09:24:38 -07:00
Miguel Angel Simon Sierra 20fe5f05d7 refactor(studio): share one project file fetch between the plain and optional reads 2026-10-02 09:24:36 -07:00
Miguel Angel Simon Sierra 175b171582 test(studio): bank the edit accuracy cases this PR makes pass 2026-10-02 05:19:29 -07:00
Miguel Angel Simon Sierra 1b21d60f2e revert(studio): the undo socket test exempts round 0 again until first-undo lands
This reverts commit 1f8f97047c.
2026-10-02 04:13:26 -07:00
Miguel Angel Simon Sierra 5574c4a497 revert(studio): first-undo history opening moves to the next PR
This reverts commit 4e1e75d7f4.
2026-10-02 04:13:25 -07:00
Miguel Angel Simon Sierra e5e0b2ef81 revert(studio): undo goes back to the newest claim after the key, as on main
This reverts commit 5b9009a823.
2026-10-02 04:13:23 -07:00
Miguel Angel Simon Sierra 504ab6b994 revert(studio): leave entrances as on main, immediateRender does not render a keyframed start
This reverts commit ee9d130d3c and its written-vars test.
2026-10-02 03:57:48 -07:00
Miguel Angel Simon Sierra e64a81ca7e test(studio): pin an entrance's start render on the written tween, not a happy-dom GSAP run 2026-10-02 03:56:04 -07:00
Miguel Angel Simon Sierra 10ee45c139 chore(studio): lift the late-write quarantine now that undo never waits on videos; format 2026-10-02 03:54:48 -07:00
Miguel Angel Simon Sierra 5b9009a823 fix(studio): undo takes back the edit pending at the key even after a later edit claims 2026-10-02 03:39:07 -07:00
Miguel Angel Simon Sierra ee9d130d3c fix(studio): an entrance rewritten at the playhead still shows its start state before it starts 2026-10-02 03:39:06 -07:00
Miguel Angel Simon Sierra 2efce1490d fix(studio): the host revert keeps returning what shows the edit again 2026-10-02 03:39:05 -07:00
Miguel Angel Simon Sierra 1f8f97047c test(studio): the undo socket test holds round 0 to a full restore too 2026-10-02 03:39:04 -07:00
Miguel Angel Simon Sierra 3cc60107e1 fix(studio): a style set by its JavaScript name saves under its CSS name 2026-10-02 03:39:03 -07:00
Miguel Angel Simon Sierra 1a4e4dd04a fix(studio): undo of a move whose save failed stays undone and steps back no older edit 2026-10-02 03:39:03 -07:00
Miguel Angel Simon Sierra 4e1e75d7f4 fix(studio): undo takes back the first edit, and the first save never waits on media 2026-10-02 03:39:02 -07:00
Miguel Angel Simon Sierra a26f2d730e fix(studio): Studio leaves cookies out of its requests only when served from loopback 2026-10-02 03:39:01 -07:00
Miguel Angel Simon Sierra 411c7c5bda test(studio): the undo socket test needs six pinned videos under Vite and checks each undo restores 2026-10-02 03:39:00 -07:00
Miguel Angel Simon Sierra 7859d49ebe docs(studio-server): set the credentials flag before Studio loads; a mounting host injects it 2026-10-02 03:38:59 -07:00
Miguel Angel Simon Sierra b7a8f54f35 chore(studio): the fetch lint rule also catches window.fetch, globalThis.fetch and self.fetch 2026-10-02 03:38:58 -07:00
Miguel Angel Simon Sierra a6e0ec59f6 fix(studio): plan every group member before the first write so one refusal moves none
A group drag or nudge preflighted each member against the move refusal rule only. The value-at-playhead planner ran later, in the commit loop, after earlier members were already flushed to disk, so a tween with extras, eased keyframes or an unknown ease left the group half moved.

The group preflight now runs the commit's own route and keyframe plan for every member with its real offset, so any refusal refuses the whole group with nothing written and one toast attributed to the refusing member. The plan is not reused in the commit: earlier members' writes change the file under it, so each member re-plans against the fresh tween, from the same planValueEdit.
2026-10-02 03:38:58 -07:00
Miguel Angel Simon Sierra e75eb23d74 fix(studio): a rotate on a tween that turns another axis holds its angle and never turns early 2026-10-02 03:38:57 -07:00
Miguel Angel Simon Sierra 6d19a866bb fix(studio): an edit at the playhead rewrites its tween in place, so later tweens keep their times 2026-10-02 03:38:56 -07:00
Miguel Angel Simon Sierra f19f052efa test(studio): nested composition reads expect the cookie-free request studioApiFetch sends 2026-10-02 03:38:55 -07:00
Miguel Angel Simon Sierra ef37c5b62f test(studio): keep the undo-restore browser test off the network and inside its timeout 2026-10-02 03:38:54 -07:00
Miguel Angel Simon Sierra 0fa64b8aaf refactor(studio): drop the soft reload's reparse seeding, the held-element sweep covers it 2026-10-02 03:38:53 -07:00
Miguel Angel Simon Sierra d32b39c3e0 fix(studio): an undo with no project open reloads in full instead of skipping nested files 2026-10-02 03:38:53 -07:00
Miguel Angel Simon Sierra d2aa4b8941 fix(studio): freeze-frame, loudness and peak-map requests go through studioApiFetch too 2026-10-02 03:38:52 -07:00
Miguel Angel Simon Sierra 901e6d02db test(studio): a drag on a mixed tween is one write under the gesture key 2026-10-02 03:38:51 -07:00
Miguel Angel Simon Sierra 785a073a1f chore(studio): keep the carried fixes inside the comment ratchet; telemetry posts through studioApiFetch 2026-10-02 03:38:50 -07:00
Miguel Angel Simon Sierra 101ef7288d fix(studio): a resize inside one gesture writes a mixed tween once, in place, never beside it 2026-10-02 03:38:49 -07:00
Miguel Angel Simon Sierra 0121fa3dc3 test(studio): an undo is not held up by the preview's paused videos 2026-10-02 03:38:48 -07:00
Miguel Angel Simon Sierra b275921219 docs(studio-server): a host on same-origin cookies sets the Studio credentials opt-out 2026-10-02 03:38:47 -07:00
Miguel Angel Simon Sierra 375458dfab feat(studio): a host whose API needs same-origin cookies can have Studio send them 2026-10-02 03:38:46 -07:00
Miguel Angel Simon Sierra c419469114 fix(studio): an undo no longer waits behind paused preview videos for a connection 2026-10-02 03:38:45 -07:00
Miguel Angel Simon Sierra 70132fb882 fix(studio): an edit no longer reopens the live-updates stream, and thumbnails ask one at a time 2026-10-02 03:38:44 -07:00
Miguel Angel Simon Sierra eee5a34e44 fix(studio): an outside change during a drag waits for the drop to show
While a gesture mark is live in the preview, refreshPlayer takes the shadow load instead of
swapping scenes in place. A swap replaced the node under the pointer mid-drag; the shadow load
is then held by the existing gesture hold and, if the drop saved, reloaded fresh by the stale
rule, so this adds no second "released" signal.

Test: an outside change during a live drag on a preview that can swap scenes leaves the dragged
node in place, shows nothing under the pointer, and after the drop loads fresh with the dropped
position. It fails on the parent without the condition ("swapped under the pointer").

Cost case, measured in a real headless preview on the edit-accuracy bench's per-frame teleport
check. Every GSAP instant patch was forced to miss and fall back to reloadPreview during its own
commit; move and rotate of a held element (gsap.set and tl.set holds), px and xPercent
placement, r0 and r30, root and nested, at 100%:
- The gesture mark was live when the fallback asked for the reload, but had always ended by the
  time refreshPlayer ran (refreshKey is consumed in an effect after the commit settles). So the
  new condition never fired there: root previews offer no scene swap and load shadow on both
  builds, and nested previews swap on both builds.
- Worst post-release frame offset, 32 cases on this build and 32 on the parent: 0.00 px over
  76-106 frames each (release to settle). No frame was off by more than 0.5 px.
- Sensitivity: a 3 px nudge injected 50 ms after the fallback reads back as 3.00 px.
2026-10-02 03:38:43 -07:00
Miguel Angel Simon Sierra fee9a166b9 feat(studio): a host can move layers by exact film px, one undo per call
handleDomGroupMoveBy(moves) on useDomEditSession and DomEditValue moves each
selection by its delta in composition px, for Desktop's align and distribute.

It reuses the group drag's own path: a drag member per element (press-time
route, measured offset map), the delta carried to screen px through the
preview frames, then handleGsapAwareGroupPathOffsetCommit, so one shared
coalesce key gives one undo entry and GSAP members take the GSAP write.
A member that can't move refuses the call before anything is written; the
refusal rejects with its reason and shows no Studio toast (the group commit
takes refusalToast: false; telemetry stays). Zero deltas are skipped.

Tests: a pre-offset element and one under a half-scale parent move by exactly
{10,0} and {0,-5} under one group key; a half-scale parent with a 30 deg
rotated ancestor lands within the 0.001 px a translate is written with; a
GSAP member goes through the GSAP write; three refusal kinds write nothing,
leave the boxes where they were, show no toast and leave no gesture mark,
while a canvas group drag still toasts; the session hands the call to the
group commit with refusalToast: false. Each mutation (no frame mapping, no
zero skip, no restore, no teardown, no capability check, toast on refusal)
fails at least one of them.
2026-10-02 03:38:43 -07:00
Miguel Angel Simon Sierra f3de9cb2cc refactor(studio): name the map form instead of commenting it 2026-10-02 03:38:42 -07:00
Miguel Angel Simon Sierra c6eb82bc30 feat(studio): export ColorField and GradientField; a session style commit takes a map 2026-10-02 03:38:41 -07:00
Miguel Angel Simon Sierra db6920536f fix(studio): an edit stays saved when the history reply after it cannot be read 2026-10-02 03:38:40 -07:00
Miguel Angel Simon Sierra 629c894a61 fix(studio): undo pressed while an edit saves undoes that edit, not one started after the key 2026-10-02 03:38:39 -07:00
Miguel Angel Simon Sierra 64076fcda3 fix(studio): an edit on a GSAP-animated layer writes its value at the playhead into the file's tween 2026-10-02 03:38:38 -07:00
6632d99c9c fix(engine): pin capture surface scale to 1 device pixel per CSS pixel (#3782)
* fix(engine): pin capture surface scale to 1 device pixel per CSS pixel

Capture reads the browser's compositor surface (`Page.captureScreenshot`
with `fromSurface: true`, and `HeadlessExperimental.beginFrame` likewise),
and that surface is rasterized at the host display's backing scale.
`page.setViewport({ deviceScaleFactor })` goes through
`Emulation.setDeviceMetricsOverride`, which only moves
`window.devicePixelRatio` on the page side — it does not resize the
surface.

On a HiDPI host every render therefore came out at twice the composition:
a 1920x1080 composition encoded to a 3840x2160 file, and no flag could
bring it down, because the pipeline's own deviceScaleFactor was already 1.
Supersampling stacked on top of it, so `--resolution landscape-4k`
produced 7680x4320 rather than 3840x2160.

Pinning the surface with `--force-device-scale-factor=1` leaves the
deliberate supersampling path (the capture clip's `scale`, from
`resolveDeviceScaleFactor`) as the only thing that multiplies output
pixels. The flag is a no-op on Linux, where the surface is already 1x, so
CI and cloud output are unchanged.

* fix(engine): drop the capture-scale comments the ratchet rejects

---------

Co-authored-by: Leo Xu <xuliyou@bytedance.com>
Co-authored-by: Miguel Ángel <miguel.sierra@heygen.com>
2026-10-02 03:30:44 -07:00
Miguel Ángel 70ed332a45 test(studio): score edits on GSAP-animated size, scale, rotation and keyframes (#4866)
* test(studio): score edits on GSAP-animated size, scale, rotation, keyframes and from/fromTo

* test(studio): settle the edit bench only once no shadow preview is waiting to be swapped in

* test(studio): end a drag at its recorded pointer-up, even when no frame painted while held

* ci(studio): run the keyframed edit accuracy cases in CI across 20 shards

* refactor(studio): split the keyframe render and stray-css checks into small helpers

* test(studio): bank the edit bench's smooth verdict as smooth, judged on the worst frame's work

* style(studio): name the edit gate's smooth count helper

* test(studio): count smooth edit cases only among the accurate ones

* test(studio): only keyframed cases wait for the preview swap, so others keep main's undo timing

* refactor(studio): keep the edit bench's keyframe check apart from the hidden preview scan

* test(studio): check the keyframed cases are in the full grid without pinning its size

* test(studio): quarantine the nudge sequence whose redo waits behind preview videos (#4889)

* test(studio): bank the 255 keyframed edit cases that pass
2026-10-02 03:26:08 -07:00
Wu ShuwenandMiguel Ángel 74e6df4370 fix(release): use portable Git paths in release guards (#3766)
* fix(release): use portable Git paths in release guards

* fix(release): drop the comment on a path git never compares

---------

Co-authored-by: Miguel Ángel <miguel.sierra@heygen.com>
2026-10-02 03:17:16 -07:00
Miguel Ángel cafb86a4ab Merge pull request #4896 from heygen-com/release/v0.8.111
chore: release v0.8.111
v0.8.111
2026-10-02 01:33:39 -07:00