mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-15 22:08:03 +00:00
sync/hyperframes-codegen-445592d5
18
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
3dd9f51785 | test(studio): sample gesture replay from one preview state (#6076) | ||
|
|
4c798f398d | test(studio): the edit accuracy bench stops waiting on background lint and thumbnail images (#5899) | ||
|
|
c715139976 | test(studio): the edit accuracy bench starts one server when node is a Volta shim (#5779) | ||
|
|
d9edffa3a4 |
perf(studio): settle the edit accuracy bench on frames and network, and reuse the producer Chrome (#5571)
* perf(studio): settle the edit accuracy bench on frames and network, not a fixed window settled() waited for the box and the preview frames to hold still for 500 ms, 7 to 15 times a case. It now resolves once they read the same on 3 animation frames in a row while the Studio page has no request in flight (the event stream and server-rendered timeline thumbnails excepted) and the server has announced every project file written since its last file-change event, so a save, a preview reload or a reload the event starts still holds it open. EDIT_ACCURACY_STILL_MS restores the fixed window with no network signal. Also polls studio_seek every 50 ms instead of 250 ms while Studio opens. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * perf(studio): keep one producer Chrome open across edit accuracy renders Every render launched and closed its own producer Chrome. The run now holds a lease on the engine's pooled browser (a capture session with the renders' launch settings and its page closed), so each render opens a page in that browser instead. Each render still gets its own page and file server, and clears the browser cache first. A held browser that failed to launch or whose Chrome died is dropped and held again, never reused. Studio's server stays per case: it serves one project folder, stamps it on start and keeps that folder's undo history open, so switching folders under it would leak history between cases. Its start is polled every 50 ms instead of 200 ms. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * test(studio): import render.mjs at the top of the edit accuracy render test Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(studio): restart the settle window when a busy request's frame goes away Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * style(studio): format the edit accuracy settle test Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(studio): seek the edit bench only after Studio binds the timeline openStudio now polls every 50 ms, so after a reload its first studio_seek often lands before the runtime binds the timeline (Studio still reports duration 0, but the playhead moves). The bind then replays the playhead from near 0 (core init.ts progress(0.0001) then totalTime). A tween that starts on the playhead was already initialised by the early seek, so GSAP skips its first keyframe. The preview then holds a box no fresh seek or render shows. In resize-fromto-px-r0-nested-z100-on that box is 90 px off, and it persists until the next seek. Wait for studio_look to report a duration before seeking. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
a59a422195 |
perf(studio): speed up the edit accuracy bench and trim its grid (#5569)
* perf(studio): cut fixed waits from the edit accuracy bench - Settle window 1000 ms -> 500 ms (EDIT_ACCURACY_STILL_MS overrides it). - Drop the fixed 1 s sleep in openStudio; the settle that follows is the real readiness wait. - Mark composition hosts data-no-timeline in the producer's page when the saved project has no GSAP timeline, so the render skips the 10 s playerReadyTimeout wait. - Run the blank-page smoothness control once per gesture per browser. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * ci(studio): trim the edit accuracy grid to 741 cases Drops zoom 200, the pct and center placements, and nested keyframed cases from the grid (2061 -> 741 cases; the pr slice 435 -> 265). Drag paths and sequences are unchanged. baseline.json loses the 1320 removed cases. The ratchet no longer counts a base case that the head's baseline.json does not hold, and lists such cases as retired, so removing cases from the grid and baseline.json together does not fail the gate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(studio): measure the blank-page control again after it fails The control is cached per browser and gesture, so a rejected measurement stayed cached and failed every later case with that gesture before Studio was tested. Drop a rejected entry so the next case measures again. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * ci(studio): keep the nested keyframed resize cases in the edit accuracy PR slice Two historical gate runs failed only on resize-scale-px-r0-nested-z100-on, which the trim removed, so the PR slice would have passed that build. Keep the nested keyframed resize on a keyframe at zoom 100 without rotation, one case per GSAP mode, with their baseline entries. PR slice 265 -> 271 cases, full grid 741 -> 747. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|
|
dc244d765c |
fix(studio): drags after a resize, undo or reload land where they were pressed (#5088)
* test(studio): bench moves pressed right after Add keyframe * fix(studio): an undo that reloads the preview keeps the selection, so a drag after it moves * fix(studio): a drag started while a resize saves keeps its animations paused * fix(parsers): an edit pins no position on a keyframed tween it did not touch * fix(studio): a move pressed while the preview changes lands on the new preview, at the time pressed * test(studio): bench waiting presses, a held box resized twice, and reloads at the last playhead * refactor(studio): tidy the waiting press, bound its wait, and freeze edit stamps after early exits * test(studio): load the property panel once so its first test stops timing out * fix(studio): presses queued on a held box keep their release, hover and newest outline * test(studio): judge bench undo by the history groups Studio claims, not by file writes * refactor(studio): one waiting-box lookup in the bench and one raf-pause write per release Behaviour-identical tidy of the waiting-press work: the bench reads the waiting box through one helper, releaseActiveGesture sets the raf pause once, clearPointerState writes the false it always computed, and previewGestureStarts calls the opts setters directly instead of through aliases named like the gesture hook's gated setters. * fix(studio): a queued press lands on the element it pressed and survives a window switch * fix(studio): undo cancels a waiting press, a stuck save stops holding presses, scene swaps hold them * refactor(studio): keep the complexity waiver on clearPointerState itself * fix(studio): undo of a queued press leaves nothing waiting, and hosts keep their own undo * fix(studio): a waiting press keeps the box still after a blur, and undo reports what it took back * style(studio): bring the PR's comments within the comment limits * fix(studio): bank the four bench cases this fixes and meet the comment, complexity and duplication gates * test(studio): pin that a waiting press is never a pending edit, and name the new duplication waivers |
||
|
|
00553e685c |
test(studio): the edit bench checks the keyframe rule outside a range and for new property groups (#5011)
* test(studio): the edit bench checks the keyframe rule outside a range and for new property groups Adds playheads before a range that starts late and after every range to the keyframed grid, and fails the keyframe rule when an edit makes the timeline animate a property group (position, size, scale, rotation) on the target that nothing animated before. * test(studio): trim the keyframe-rule bench comments to the comment ratchet * test(studio): split the bench's property-group reader into small steps * test(studio): bank new keyframe guard cases and match any script tag casing * test(studio): skip the same non-animated keys as the parser when grouping * test(studio): bank the keyframe guard cases from this head's gate run |
||
|
|
7f3464921c |
test(studio): the edit bench render serves GSAP from the repo, never the CDN (#4996)
* test(studio): the edit bench render serves GSAP from the repo, never the CDN * test(studio): the edit bench render opens no second page that fetches GSAP * test(studio): the render test checks the CDN pattern matches the fixture's GSAP URL * test(studio): match the CDN pattern the way Chrome does * test(studio): the render test checks the whole interception pattern |
||
|
|
2f14008b3c |
test(studio): serve the edit bench GSAP from the repo, never the network (#4968)
* test(studio): serve the edit bench GSAP from the repo, never the network * test(studio): serve the installed gsap dist and never crash the bench on a closed request * test(studio): serve only regular files from the bench gsap dist |
||
|
|
7dea1e581f |
fix(studio): playhead keyframe edits keep their ease, undo names its edit and never waits on videos (#4889)
* fix(studio): an edit on a GSAP-animated layer writes its value at the playhead into the file's tween
* fix(studio): undo pressed while an edit saves undoes that edit, not one started after the key
* fix(studio): an edit stays saved when the history reply after it cannot be read
* feat(studio): export ColorField and GradientField; a session style commit takes a map
* refactor(studio): name the map form instead of commenting it
* 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.
* 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.
* fix(studio): an edit no longer reopens the live-updates stream, and thumbnails ask one at a time
* fix(studio): an undo no longer waits behind paused preview videos for a connection
* feat(studio): a host whose API needs same-origin cookies can have Studio send them
* docs(studio-server): a host on same-origin cookies sets the Studio credentials opt-out
* test(studio): an undo is not held up by the preview's paused videos
* fix(studio): a resize inside one gesture writes a mixed tween once, in place, never beside it
* chore(studio): keep the carried fixes inside the comment ratchet; telemetry posts through studioApiFetch
* test(studio): a drag on a mixed tween is one write under the gesture key
* fix(studio): freeze-frame, loudness and peak-map requests go through studioApiFetch too
* fix(studio): an undo with no project open reloads in full instead of skipping nested files
* refactor(studio): drop the soft reload's reparse seeding, the held-element sweep covers it
* test(studio): keep the undo-restore browser test off the network and inside its timeout
* test(studio): nested composition reads expect the cookie-free request studioApiFetch sends
* fix(studio): an edit at the playhead rewrites its tween in place, so later tweens keep their times
* fix(studio): a rotate on a tween that turns another axis holds its angle and never turns early
* 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.
* chore(studio): the fetch lint rule also catches window.fetch, globalThis.fetch and self.fetch
* docs(studio-server): set the credentials flag before Studio loads; a mounting host injects it
* test(studio): the undo socket test needs six pinned videos under Vite and checks each undo restores
* fix(studio): Studio leaves cookies out of its requests only when served from loopback
* fix(studio): undo takes back the first edit, and the first save never waits on media
* fix(studio): undo of a move whose save failed stays undone and steps back no older edit
* fix(studio): a style set by its JavaScript name saves under its CSS name
* test(studio): the undo socket test holds round 0 to a full restore too
* fix(studio): the host revert keeps returning what shows the edit again
* fix(studio): an entrance rewritten at the playhead still shows its start state before it starts
* fix(studio): undo takes back the edit pending at the key even after a later edit claims
* chore(studio): lift the late-write quarantine now that undo never waits on videos; format
* test(studio): pin an entrance's start render on the written tween, not a happy-dom GSAP run
* revert(studio): leave entrances as on main, immediateRender does not render a keyframed start
This reverts commit
|
||
|
|
dbe6bb7f9c |
test(studio): the edit accuracy bench uses the port its server bound (#4953)
* test(studio): the edit accuracy bench uses the port its server bound A busy port made the CLI bind the next free one, and the bench then failed the case with "studio moved from port N to N+1" instead of using it. * test(studio): drop a comment the doc line already says * test(studio): the bench server test removes its temp dir * test(studio): the bench stops its Studio server on Windows too Windows has no process groups, so the group kill never reached the server and the stop waited forever (the new server test timed out on windows-latest). taskkill /T, the CLI helper for the same job, ends the tree there. * test(studio): a failed taskkill surfaces, and the server opens no console on Windows |
||
|
|
438ea9d59f |
perf(studio): manual edits stay under 8 ms per frame (#4898)
* ci(studio): measure any edit cases on quiet runners, five runs in parallel * perf(studio): an undo or save stops re-rendering every panel * test(studio): the edit bench types one key per frame, as a person does * fix(studio): the edit bench measures frame work when a task outside the drag has no thread time * refactor(studio): hooks hand back stable handlers themselves, keeping App.tsx under 600 lines * test(studio): the edit bench says why a case's frame work is unknown * fix(studio): the edit bench counts a task without thread time at its wall time * perf(studio): draw toasts on an opaque surface without backdrop blur * fix(studio): keep stable handlers bound to the project they were made in * fix(studio): every stable handler names the project it belongs to * style(studio): format the stable handler call sites * refactor(studio): name the timeline editing handler objects before wrapping them |
||
|
|
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 |
||
|
|
6388845ac9 |
fix(studio): a hand drag moves only with its own pointer pressed (#4880)
* fix(studio): a hand drag moves only with its own pointer pressed Chromium re-sends the last known pointer point with no button held after a layout change. The overlay's move handler took those as drag travel, so the element flipped between the pointer and that stale point, and the release committed whichever came last. * test(studio): the edit accuracy grid drops a drag after a buttonless move at the press point Nine pathstray cases: a 180,90 drag whose last move before the release is a buttonless pointermove back at the press point, as Chromium resends after a layout change. Main saves the element where it started; this head saves it where the pointer let go. The frame sampler ignores that untrusted move as pointer position. * fix(studio): keep the drag rule's comment to one line * fix(studio): crop handles and the marquee band also ignore a buttonless move mid-gesture * test(studio): bank the nine stray-move cases in the edit accuracy baseline * test(studio): one crop drag helper, the band's candidate refresh in its own step, and formatting * style(studio): wrap the pointer gesture comment under 120 characters |
||
|
|
9c19327e38 |
test(studio): catch teleports and multi-step edit bugs in the edit accuracy bench (#4801)
* test(studio): catch teleports and multi-step edit bugs in the edit accuracy bench * test(studio): share the edit accuracy case harness between single gestures and sequences * test(studio): keep edit accuracy helpers private unless shared * test(studio): score plain-CSS edits on pages that load GSAP for other elements * test(studio): add an idle GSAP axis value so plain-CSS edits are scored on GSAP pages * test(studio): report a slow undo save as late with its latency, apart from a lost one * test(studio): sample the gap between back-to-back drags and allow one frame of lag * test(studio): read the edge from the element's fractional size, so a crop edge is exact * test(studio): keep waiting for a late save until an undone file stays put for 3 s * ci(studio): run the edit accuracy grid in 12 shards to stay near 25 minutes each * test(studio): read edit bench frames just before paint, so unpainted states never count * test(studio): scope the edit bench frame sampler so page globals cannot clash * test(studio): let a lagging box catch up the pointer travel it owes, so a held frame is no jump * test(studio): record every save a sequence makes, even two that land 10 ms apart * test(studio): end a drag's teleport scoring at its pointer-up, not at the next element's press * test(studio): bank for each edit accuracy case a run that agrees with the gate's verdict * test(studio): fail the edit accuracy gate on a teleport or an unmeasured drag * test(studio): fail the edit accuracy gate when a text edit is not saved or shown * test(studio): measure but do not gate the edit accuracy cases a known Studio race flips * test(studio): bank the edit accuracy cases that newly pass with the teleport metric * test(studio): quarantine the two nudge sequences whose redo write sits at the 2 s limit * style(studio): cut three bench comments to one line each |
||
|
|
d0404b450c |
fix(studio): undo and redo are no longer held behind thumbnail renders (#4842)
* fix(studio): undo and redo are no longer held behind thumbnail renders * test(studio): composition card tests share one mount, and the bench's 2 s undo rule is tested * fix(studio): a composition card and its timeline clip share one thumbnail render * test(studio): bank opening a film at 15 thumbnail requests, one per composition * fix(studio): composition cards load near the viewport and keep their last frame until the next * fix(studio): a composition card keeps its last frame under cache pressure, and loads 200 px early |
||
|
|
ca54631464 |
test(studio): measure render drift against a producer frame in the edit accuracy bench (#4764)
* test(studio): measure render drift against a producer frame in the edit accuracy bench
Finds the target's box in a producer-captured frame by its flat colour, with sub-pixel edges from area moments, and compares it with the reloaded preview. The baseline gains the render column from the same full run on main.
* test(studio): mark the pixel box scan as intentionally complex for fallow
* test(studio): regenerate the edit accuracy baseline with render drift on main
Same full run on main
|
||
|
|
0c6f5fd80e |
test(studio): an edit accuracy benchmark for manual editing (#4760)
* test(studio): start an edit accuracy benchmark for manual editing (work in progress) * test(studio): an edit accuracy benchmark for manual editing Drives real pointer and keyboard gestures in the built CLI Studio on generated one-element projects and scores tracking, drop jump, reload drift, undo fidelity and smoothness in composition px. * test(studio): move render drift out of the first benchmark PR Render drift against a producer frame ships in the stacked follow-up so this PR stays near the size budget. * test(studio): keep the edit accuracy bench clean under fallow Builds the grid as a product of its axes, drops unused exports and marks the harness functions that fallow scores as complex. * test(studio): report edit accuracy with the Studio and bench commits it measured Moves scoring and the report files into report.mjs, stamps both commits at start, counts undo byte failures apart from the worst box, and survives Studio swapping the preview iframe mid-read. * test(studio): bank the edit accuracy baseline measured on main 660 cases on main |