mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-20 20:38:34 +00:00
c3b6e55f7eb6eea845dc001889b50fc35b841d4e
250
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c3b6e55f7e |
fix(studio): undo right after an edit undoes that edit, even before its save lands (#4807)
* fix(studio): undo right after an edit undoes that edit, even before its save lands * fix(studio): undo right after a nudge undoes the nudge * fix(studio): undo during a nudge's wait for more keys never paints the edit before it * fix(studio): a failed save never blocks undo, and a nudge burst always ends its pending edit * fix(studio): undo waits out every failed or conflicting edit, and Delete counts as pending * fix(studio): every GSAP script commit counts as a pending edit, so undo waits for it * fix(studio): keep App under the file size limit * test(studio): bank the nudge-then-undo sequences the gate now passes |
||
|
|
a59d93a027 |
fix(studio): a focused video or audio player keeps its arrow and play keys (#4854)
* fix(studio): a focused video or audio player keeps its arrow and play keys * fix(studio): every remaining shortcut asks the shared typing check |
||
|
|
83035e08b8 |
fix(studio): an undo that lands mid-drag keeps the box under the pointer (#4853)
* fix(studio): an undo that lands mid-drag keeps the box under the pointer * fix(studio): an undo that lands on a pressed layer keeps what its gesture draws * fix(studio): every gesture mark names what it draws, and a text edit draws nothing * test(studio): gate the drag, undo, drag cases again now that their race is fixed * fix(studio): a text edit's gesture mark draws nothing, so an undo under it reverts * test(studio): keep the one drag, undo, drag case whose press can still jump in quarantine * test(studio): bank the drag, undo, drag cases that now pass |
||
|
|
57da627e76 |
fix(studio): a hand edit after a preview reload draws on the element now on screen (#4856)
* fix(studio): a hand edit after a preview reload draws on the element now on screen * fix(studio): a preview reload waits for the gesture on screen to end * fix(studio): a marquee after a reload selects from the preview on screen * fix(studio): a reload requested before a canvas save loads again once the save lands |
||
|
|
ce76be50c7 |
feat(studio): paste and duplicate can keep a clip at its own time (#4859)
* feat(studio): paste and duplicate can keep a clip's own time, on the next free track * fix(studio): an in-place paste uses the copied time only in the composition it was copied in * test(studio): an in-place duplicate inside a sub-composition keeps its local time * refactor(studio): the paste anchor is its own function, and the in-place tests share their setup * refactor(studio): paste names its undo step and note in one place, and two paste tests share their steps |
||
|
|
9f4d9e64b2 |
feat(studio): a light and dark theme toggle in the header that remembers the choice (#4839)
* feat(studio): a light and dark theme toggle in the header that remembers the choice The sun and moon button flips Studio between Graphite light and dark with a circular reveal, saves the choice, and follows the system until one is made. * fix(studio): studio opens light the first time, then keeps the saved theme * fix(studio): drop the theme field's comment, the theme owner states the rule * fix(studio): the theme toggle shows only in studio's own app and follows the theme on screen A host that embeds StudioApp gets no toggle; the button reads the document's theme, the reveal drops the default crossfade, and reduced motion skips it. * fix(studio): the theme reveal leaves other view transitions alone; one default for the toggle The crossfade rule applies only while the toggle's own transition runs, StudioApp passes the header's single default through, and the reveal's reduced-motion and keyboard paths are tested. * fix(studio): a second theme click mid-reveal keeps the crossfade off Only the latest reveal clears the document marker; tests pin the marker while a reveal runs and the circle's radius. * refactor(studio): the theme toggle shares its icon props and reads as plain functions Simplify pass: one icon props object for the sun and moon, no useCallback around a handler nothing memoises, cannotReveal named for what it answers, the test reuses the theme reader. * fix(studio): studio's own app turns the theme toggle on through context; tests parse index.html App.tsx stays at main's size: main.tsx provides ShowThemeToggle and the header reads it, default off for hosts. The boot-script tests read index.html through DOMParser instead of an HTML regex. |
||
|
|
07af05c816 |
feat(studio): fade handles ride the fade's end and the waveform shows the fade (#4844)
* feat(studio): fade handles ride the fade's end and the waveform shows the fade * refactor(studio): read fade handle keys from one lookup * fix(studio): fade handle keys stay with the handle and snap past the clip's own edges * fix(studio): Cmd shortcuts keep working on a focused slider and fade boxes stay on their tabs * fix(studio): keep a fade handle while it is in use and restore the viewport gate's Chrome path * fix(studio): a fade's draft clears with its own save and grow drags never shrink it * fix(studio): saved fades reach the timeline store so the handle stays where it was dropped * fix(studio): a fade longer than its clip starts a drag or key from the clip's end * fix(studio): fade comments state the rule, not its history |
||
|
|
658f22bb7f |
feat(studio): graphite colour system with a light theme that passes contrast (#4836)
* feat(studio): graphite colour system with a light theme that passes contrast Studio's tokens take the Graphite values: a lifted dark, a light set behind data-theme="paper", the player dark in both. Every text role clears 4.5:1 and every icon and ring 3:1 on the fills it sits on, held by the contrast ratchet. * fix(studio): every studio surface follows the light theme and passes contrast The dock no longer inherits dockview's forced dark scheme, popovers sit on the raised surface, stock white, red and amber text map to roles, the keyframe diamonds and track headers use roles, and the contrast ratchet measures every pair in both themes (150 pairs). * fix(studio): stock white, red and amber stay colours; studio text and fills use roles Round-two review: white, red and amber are colour content as well as text, so they keep Tailwind's values and hosts keep their palettes. Text, toasts, the feedback card, the FX popover, destructive buttons, category labels and the dock take Graphite roles instead; the contrast gate rejects an unparseable colour. * fix(studio): every light-theme ink, icon, dot and focus ring holds its contrast Stock white, red, amber and file-type hex left in Studio chrome now use roles or a light-dark pair; the file tree icons carry a contrast test. * chore(studio): drop two comments the names already carry * fix(studio): red marks, teal outlines and colour curves hold contrast in both themes Danger graphics use the danger ink, file tree outlines use the accent ink, the colour-curve well stays dark like the scopes, and six timeline token pins come back. * fix(studio): invalid readouts, the curve focus ring and editor dots stay distinct in both themes The invalid readout border is dashed as well as red, the curve graph's ring sits inside its dark well, the radius dots and ease handle centre follow the theme. * refactor(studio): ease and radius editors use colour classes; the dashed invalid border has a test Simplify pass: the ease editor's inline accent styles become stroke and fill classes, the radius dot class is computed once, the ratio check is one expression, and the alias table is named for what it holds. |
||
|
|
3d8325e7a4 |
fix(studio): a pasted element keeps the look its id gave the original (#4852)
* fix(studio): a pasted element keeps the look its id gave the original * fix(studio): drop a comment the parameter name already says |
||
|
|
a369708fa5 |
fix(studio): open projects named with a colon and keep preview assets for names with # (#4829)
* fix(studio): open projects whose folder name has a colon * fix(studio): open projects named with a colon or '#' in Studio and its preview * fix(studio): refuse a Windows stream id reached through a session alias One adapter rule, isServableProjectId, now guards the requested id, a session's projectId and the folder listing. The bundler-failure preview places its <base> inside an attributed <head>, and the media metadata cache keys on the encoded URL so ids with ':' can't collide. |
||
|
|
6ba35c9e3b |
fix(studio): undo and redo show on the next frame instead of after the server answers (#4798)
* fix(studio): undo and redo show on the next frame instead of after the server answers * fix(studio): an undo pressed before the history caught up still restores in place * fix(studio): undo and redo of an edit inside a nested composition apply in place * fix(studio): undo of a nested edit reloads when its composition has a GSAP script * refactor(studio): a nested restore with a GSAP script has no in-place scope * fix(studio): an undo after an outside write shows the file the server restored |
||
|
|
7719f973c0 |
feat(studio): a host app can mount the dock with its own panels, storage key and width (#4812)
* feat(studio): a host app can mount the dock with its own panels, storage key and width * refactor(studio): the dock keeps a host layout through Studio's own preference storage * fix(studio): a dock reopens a panel beside the preview only when its usual neighbour is not in the dock |
||
|
|
ca3a3f6e0b |
fix(studio): keep sub-pixel position and angle while dragging and on drop (#4766)
* fix(studio): keep sub-pixel position and size while dragging and on drop * test(studio): expect three-decimal rotation in the manual edits rotation test * fix(studio): keep resized boxes on whole pixels so a centred element stays put |
||
|
|
f1c1f1d69c |
fix(parsers): moving a clip on the timeline moves its inner animations too (#4761)
* fix(parsers): moving a clip on the timeline moves its inner animations too * fix(parsers): a timeline move keeps chained and partly known tweens where they belong * fix(parsers): moving a clip leaves chained outside tweens and template aliases in place * fix(studio): a clip timing edit syncs its animations once, not twice * fix(studio): a timing edit falls back to the server when the SDK wrote no animation change * fix(studio): the SDK sync check reads scripts inside a template too * fix(studio): the SDK sync check finds template scripts through the DOM walker * fix(core): a clip retime writes only its own timed tweens, never outside ones * style(core): format the clip tween import |
||
|
|
7734697872 |
fix(studio): a copied clip keeps its look and motion, and a duplicated section keeps its name (#4756)
* fix(studio): a copied clip keeps its look and motion, and a duplicated section keeps its name * fix(studio): a copy's tweens start where their originals do and stay in the timeline's scope * fix(studio): a copy takes only tweens it can place exactly, and never moves the film's own * fix(studio): a copy leaves out a tween that sits inside a callback or a guard * fix(studio): a copy leaves out a set that runs only inside an if or an else * chore(studio): keep the copy change under the comment ratchet |
||
|
|
be5beaee61 |
fix(studio): font faces a host saves keep their own weight and style (#4753)
* fix(studio): a family's saved font faces keep their own weight and style * fix(studio): keep the font face change within the comment ratchet * fix(studio): a saved font face cannot break the page, and only weights a browser keeps are written |
||
|
|
efd3c51ac9 |
fix(studio): undo puts a resized, rotated or moved element back on screen (#4740)
* fix(studio): undo puts a resized, rotated or moved element back on screen * fix(studio): undo no longer drifts an element with a Studio offset and a GSAP tween A soft reload killed the old timeline but kept its children, and the runtime seeks that captured timeline until the rebind swaps it. The old tween painted its transform after the authored-transform restore, and the new tween folded it into its start. Clear the timeline before killing it. The restore also covers SVG elements now, and the save path has a test. |
||
|
|
65d66cb2c3 |
fix(studio): a clip dropped on a row stays on that row at the nearest free time (#4663)
* fix(studio): keep a dropped clip on the row it was dropped on * fix(studio): keep group moves, new-track file drops and audio drops where they were aimed * fix(studio): drop assets on the row's own track and keep locked clips as obstacles * fix(studio): keep multi-file audio drops together and stop locked clips sliding in the drag preview * fix(studio): read a dropped asset's track from every clip of the target file * refactor(studio): move the drag preview and shell wiring out of the timeline provider state * docs(studio): drag floor comments name the host start, not 0 * docs(studio): shorten the drag commit and landing comments * docs(studio): the drag commit comment says a new track renumbers rows * fix(studio): a clip released on its own spot stays there A clip whose neighbours end off the centisecond grid no longer jumps to the end of its row when dropped back where it was; the snap guide clears when the row moves the clip. * fix(studio): a clip keeps its own spot when float sums overshoot a neighbour 0.333 + 1.733 is 2.0660000000000003, so the own-spot check allows a hair of slack at both ends. |
||
|
|
3dc3a9ca1a |
fix(studio): clips inside nested compositions sit at their master time (#4681)
* fix(studio): clips inside nested compositions sit at their master time * fix(studio): nested clip starts read authored scene lengths as the runtime does * test(studio): drop a reference-start case the DOM fallback never reads * test(studio): a clip inside a referenced scene sits after its authored length * fix(studio): drag and trim a nested clip to where it is drawn * fix(studio): keep a root-time nested video's drag in master time * fix(studio): duplicate and keyframe edits on a nested clip use its own clock * fix(studio): nested clip drops stop at the host start and trims scale on its clock * fix(studio): a nested clip's head trim stops at its host's start * fix(studio): a dropped nested clip stops at its host's start before snapping |
||
|
|
1bede4742a |
perf(studio): clicking an element in the preview selects it without restyling the whole film (#4707)
* perf(studio): clicking an element in the preview selects it without restyling the whole film
Every hit test added a `* { pointer-events: auto !important }` style element to the
preview document and removed it again. Each insert and removal restyled every element,
and the head mutation made the off-canvas indicators rebuild their layer walk from
scratch. The override only let pointer-events:none elements into the hit list, and the
author pointer-events filter removed them again, so the hit test now uses the browser's
own result: the candidates are what Chrome itself hit-tests.
* docs(studio): the double-press hit test comment no longer claims it lifts pointer suppression
|
||
|
|
9e1dbca7a2 |
fix(studio): undo and redo update the preview in place instead of reloading it (#4718)
* fix(studio): undo and redo swap the restored scene in place instead of reloading * fix(studio-server): a preview asked for right after an undo shows the undone state * fix(studio): an undo that restores a page outside every scene still reloads in full * fix(studio-server): a preview built across a write is not cached under the old signature * test(studio): a soft undo keeps the scene hashes so the next edit still swaps |
||
|
|
5eec513281 |
fix(studio): the timeline takes m4v video and flac audio (#4649)
* fix(studio): the timeline takes m4v video and flac audio * fix(studio-server): check and label flac uploads as audio |
||
|
|
078c493448 |
perf: the preview loads and decodes only the images of scenes on screen or due next (#4578)
* perf(core): skip hidden clips' content so the browser stops decoding their images Hidden timed clips get content-visibility:hidden while their inline visibility is hidden, from script evaluation on. A clip due within the look-ahead (2 s by default) keeps its content live, so its images load before it shows. * perf(studio-server): load preview images lazily so hidden scenes fetch nothing * fix(core): stop the readiness scan waiting on and decoding later scenes' images * perf(studio-server): keep first-frame images eager so the preview opens as fast as before Only images inside a clip with a numeric start after 0 go lazy; a start the route cannot read stays eager. * perf(core): keep clips that start at 0 laid out before the first pass so the first frame is on time * perf(core): open the preview on time by hiding only lazy images before the first pass GSAP reads the computed style of the elements it animates while timelines build. Inside a content-skipped clip every read forces a style update, which cost about 65 ms at open on the bench composition. Before the first pass the rule now takes only lazy images out of layout, so hidden later scenes still do not load theirs; after it, the skip rule keeps their content skipped. * fix(core): hold a paused jump on the previous picture until the next scene's images decode * fix(studio): swap in a reloaded preview only after its restore seek has painted * fix(core): apply a held paused jump after 1 s when an image never decodes * fix(core): keep hidden-scene image skipping and held jumps to Studio's preview, never renders * fix(studio): reapply manual edits once a held paused jump lands * fix(studio): copy a clip without the preview's lazy-loading marks * fix(studio-server): mark preview images lazy without re-encoding the document's entities * fix(core): share one preview-mark constant between the runtime and the preview route * fix(studio): reapply manual edits a second time only after a seek that was held * refactor(core): share the hidden-ancestor walk between clip visibility and image holds * fix(core): import the studio preview mark from its own subpath * fix(studio-server): find preview images with the linear html scanner * chore(core): drop two doc comments the scanner's names already carry * fix(studio-server): serve the preview mark as its own meta, apart from the GSAP fallback script * fix(studio-server): capture thumbnails and frames from the preview without lazy images or the mark * fix(core): let the full readiness scan wait on every image except lazy ones off the first frame * fix(studio-server): keep an authored loading attribute in any letter case on preview images * fix(core): leave template content out of findStartTags so preview images match the DOM * fix(studio): send Ask agent the live markup without the preview loading marks * chore(core): drop the template note from findStartTags, its test carries it * perf(studio-server): splice lazy attributes into the preview in one pass * fix(studio): keep authored image loading on copy and Ask agent by marking preview-made lazy images * test(studio-server): follow the capture preview URL back to its sub-composition for every project id * refactor: name the upcoming-clip and GSAP fallback marks once * fix(studio-server): keep capture builds out of the on-disk preview store |
||
|
|
d4801086c4 |
fix(studio): quick saves no longer refuse each other as outside changes (#4612)
* fix(studio): quick timeline saves no longer refuse each other as outside changes * fix(studio): canvas edits and block writes wait their turn in the file queue * fix(studio): animated clip moves and the last direct writes wait their turn in the file queue |
||
|
|
1a53681de1 |
fix(studio): an automation lane edit is refused on a locked clip and reports how it saved (#4533)
* fix(studio): an automation lane edit is refused on a locked clip and reports how it saved Lane drags, Delete and paste save through the timeline's gated clip or group save instead of the property panel's commit, so the host's canEdit applies and the commit resolves saved, refused or failed. A landed save refreshes the lane store and the panel's selection, as the panel's commit did. * fix(studio): a refused automation save puts the preview and the lane back A save that does not land (recording, no id, a failed write) reverts the live preview it was given, the lane drops a draft whose save came back refused or failed, the no-id and no-project failures toast like the others, and the panel refresh reads the current selection. The panel commit's unused coalesce option goes, and the lane value reuses automationAttrValue. * fix(studio): a failed save restores the preview it was given, not an older one Each timeline save claims the preview's before-value when it starts, so a gesture begun while it is in flight records its own and a later failed save cannot put back a value from before an earlier save landed. * chore(repo): allow the automation gesture key files this branch removes * fix(studio): a refused automation save leaves the lane store and paste mark as saved Reverting a live value re-syncs the lane store from the restored preview, so an overlapping save that landed first cannot leave the store holding a later value that failed. A paste whose save is refused or fails gives back the selection and paste chain it replaced. * fix(studio): a failed save settles on what the file holds and a refused paste marks nothing A save that does not land settles the preview and store on the file's value (the claimed before-value only when the file cannot be read), and leaves a gesture begun meanwhile alone apart from correcting its before-value, so two overlapping failed saves cannot leave either on a value that never landed. A paste selects and marks its span only once it lands and only over the selection it was pasted at. * fix(studio): a failed save reads the file only after writes queued to it land The settle read goes through the same per-path queue as the writes, so a save that fails while another is queued settles the preview, the store and any newer gesture's before-value on what that queued save wrote. * fix(studio): an older failed save never settles over a newer edit on the same lane Live-preview bookkeeping moves to createLiveLanes, one owner for both timeline saves: each lane key carries a generation that every live write and save start advances, and a save settles the preview and store (on its landed value, or on the file after a failure) only while it is still the newest. A paste marks its span only if it is still the latest paste. * test(studio): a newer live drag keeps its preview when an older save recovers * fix(studio): every finished save records what the file holds, even under a newer edit A save's settle now always writes the file's value (landed, or read back after a failure) into the lane store and a live gesture's before-value, and moves the preview only while nothing newer has touched the lane. The clip store is set from that value rather than copied from the preview. A paste marks its span only while its clip is still the selected one. * fix(studio): an older automation save never overrides a newer gesture on its lane A failed save's recovery read could settle after a newer save started, and the save's own optimistic preview patch and failure unwind ran over a newer drag. Every preview write a save makes now goes through the lane's ownership check, only the newest save records its value, and a refused drag hands the lane back to the newest pending save. * fix(studio): timeline attribute saves land in the order they start An attribute save read the file before joining its write queue, so an older save with a slow read could land after a newer one, overwrite it on disk and leave the lane showing the newer value. The save now joins the queue first and reads, patches and writes inside it. A save moves the preview only while it is the newest save and no drag is live, which replaces the per-lane generation. * refactor(studio): name the in-queue history write for the queue it needs * test(studio): pin save start order and a newer release's preview mid-flight * fix(studio): a drag keeps its points when an older save lands under it An older save that landed mid-drag wrote the lane store, the lane dropped its draft, and the release committed the older points. The lane now keeps its draft while a gesture is live. A save that cannot read the file back settles on the last value read or saved on its lane, never on an unsaved one, and an older save that lands records its value there even when a newer save is pending. * fix(studio): a lane's first failed save still puts its drag back With the claimed-value fallback gone, a first save on a lane that failed and could not read the file back settled on nothing, leaving the drag playing. A save begun with no other save pending now records the value under its drag as verified, since that is what the file last settled on. * fix(studio): only a before-value read with no save pending counts as saved The value under a drag was trusted when its save started with nothing pending, but it was read when the drag began, possibly over a paste that later failed. A lane now marks a before-value clean only when no save was pending as the drag began. A group lane's preview carries its store mirror, as its live writes do. * fix(studio): a lane's saved value never crosses into another project The lane bookkeeping outlives a project switch and its keys had no project, so a value saved in one project could settle into another project's clip with the same key when a save there failed and could not read the file back. Lane keys now carry the open project, and a save moves the preview or store only while the project it was made in is still open. * fix(studio): a failed save reads its file back from its own project A save that failed after a project switch read its recovery from the newly opened project and recorded that project's value as its own. Each save now captures its project when it starts and reads back from it. * fix(studio): a failed save never brings back a value an undo removed A lane kept its last verified value after its saves settled, so after an undo a save that failed and could not read the file back settled on the removed value. The value now lives only while a save on the lane is in flight, and each save records what its own in-queue file read found. The group preview's store mirror is no longer needed and is gone. * test(studio): pass the file-read callback in the direct attribute-save tests * fix(studio): a drag whose before-value a save settled counts as clean When a settle rewrites a live drag's before-value to a verified value, that value is known saved, so the drag's own save can fall back on it even when its read and read-back both fail. Adds a test for a failed save reading back from its own project while another save is in flight across a switch. * fix(studio): a save started in one composition never lands in another of the same project Live lanes were scoped to the project only, so a save held across a switch to another composition of that project settled its value into the new composition's preview (clip and group lanes) and store (group lane). Lanes are now scoped to the project and the composition open when the save starts. createLiveLanes moves to its own module for the 600-line cap. * fix(studio): an undo during or after a lane gesture stays undone when the next save fails A live gesture records the lane's value before it starts, and a later save that cannot read the file settles on that value. An undo mid-drag, or after a gesture that ended without saving, left that value stale, so the save brought back what the undo removed. Every undo and redo now re-reads each open lane's value from the files it restored. * fix(studio): undoing group automation clears it from the members' lanes at once The group-info cache only noticed a change when its MutationObserver callback ran, so the soft restore's store sync, which reads it synchronously, mirrored the pre-undo group automation onto the members. A read now counts mutations the observer has not delivered yet. * fix(studio): an undo reaches every lane and pending save it rewrote, in any composition The undo re-read only covered lanes in the open composition and live gestures. History is project-wide, so undoing from another composition left the rewritten composition's lanes on the pre-undo value, and a save released while the undo was in flight kept that value as its fallback. The re-read now covers every lane of the project on a restored path, including saves still pending, and an undone file it cannot read makes the value untrusted instead of dropped. A missing element reads as unreadable, the same as a save's read-back. * fix(studio): a cancelled fade, stretch or preset audition leaves no stale lane value behind A cancel put the gesture's start back through a live write, which left the lane's before-value in place until the next save trusted it, even after the property panel, the source editor or an agent had changed the file. The fade cancel, the edge-stretch cancel and leaving a preset audition now end through the lanes' revert, so a before-value exists only during a live gesture. * test(studio): pin that a group write is read back fresh in the same task * style(studio): drop two comments the names already carry * fix(studio): a failed group save reads its own file back; fade cancels work without revert - The group save's failure read-back used the file of whatever composition was loaded when the write failed. It now reads the file captured when the save started, as the clip save does. - A fade cancel writes its start back live before it reverts, like the other cancel sites, so a host without the optional revert callback still puts the fade back. - The edge-stretch cancel comment says what the code now does. - The save test harness passes the revert callbacks, as the app does; without them the cancelled-gesture tests exercised a host that lacks them. * refactor(studio): trim three long comments on live automation saves |
||
|
|
516320c28d |
fix(studio): a copied clip pastes as saved, not with the preview's hidden styles (#4506)
* fix(studio): a copied clip pastes as saved, not with the preview's hidden styles Copy took each clip's markup from the live preview, so a clip copied before its start carried the runtime's visibility:hidden and display:none into the pasted source and could never show. Copy now reads the element from its saved file (matched by data-hf-id, then id, the lookup the GSAP soft reload already used, now shared). Copy still answers the key at once; paste and cut wait for the read, so a cut never deletes before its markup is taken. * fix(studio): copy finds a clip's saved markup in templates and after saves Copy now stamps the saved file the way the preview does, so a film without hf-ids on disk still resolves; searches template contents for sub-composition clips; falls back to the element id; and reads the file after any save in flight. A failed read keeps the previous clipboard and a cut with a failed copy deletes nothing. * fix(studio): a copied sub-composition clip keeps working asset paths when pasted Copy now rebases the saved markup's relative src, href and style url() paths to the project root, as the preview does when it inlines a sub-composition, so a clip copied from compositions/ and pasted into index.html keeps its images. It also waits for DOM edit saves still in flight, as undo does, and parses each file once per copy. The authored-source lookup uses an escaped attribute selector over cached search roots, searches composition templates only, and falls back to an id only for an element with no hf-id; copy alone still tries the id when the hf-id misses. * fix(studio): copy works after a failed save and with any relative asset path Copy waits for DOM edit saves only for their order, so a save that failed no longer makes every later copy, cut or duplicate fail. Asset paths are joined segment by segment instead of through URL and decodeURI, so a path with a stray % or a url() with spaces is rebased instead of crashing or being skipped. |
||
|
|
224388ad29 |
fix(studio): every project opens its preview at Fit, and a zoom says so (#4473)
* fix(studio): every project opens its preview at Fit, and a zoom says so Preview zoom was one saved value for every project, so a single pinch made each project open at 245%. It now lasts only while the project is open. While the preview is not at Fit, a chip at the top says how far it is zoomed with a Fit button, and a navigator shows the visible part. * fix(studio): Fit keeps the selection, and the zoom chip and navigator follow review A click on Fit no longer reaches the pane that clears the timeline selection, focus returns to the preview, one rule decides at-Fit, and a project switch resets the zoom before paint. * chore(studio): the zoom change keeps each file's comment share at or under main's * refactor(studio): the zoom chip and navigator live beside the preview, under the file size cap |
||
|
|
828c434f76 | refactor(studio): drop recordEdit's kind, which the project history never read (#4474) | ||
|
|
36f8bd0e91 |
feat(studio): undo and redo step through the project history, whoever made the change (#4456)
* feat(studio-server): an undo taken from Studio is not mistaken for an outside edit * feat(studio): undo and redo step through the project history, whoever made the change * feat(studio): the dev server keeps each project history, in the same folder as preview * fix(studio-server): an undo that deletes a file reads as Studio's, and dev histories close * fix(studio-server): a claim keeps an agent's earlier write the agent's and takes back Studio's own * chore: allow the removal of Studio's browser edit history files * test(studio): mock the project history in the runtime smoke * fix(studio): step past a jammed undo and say why a step fails * fix(studio-server): an agent turn cut by a claim commits its part before the claim * fix(studio-server): a claim's cut ends a held drag and takes only the cut files out of a turn * fix(studio-server): a held drag ends when someone else changed a file it already holds |
||
|
|
f873734cc4 |
perf(studio): open a large film ready to play in about 4 s instead of 32 s (#4401)
* perf(studio): keep lint off the preview open path The bundler linted every build only to print a StaticGuard warning; a preview bundle now skips it through a staticGuard option, since Studio lints on its own route. That route now lints in the CLI child-process worker the render path already uses, so seconds of parsing no longer stall the preview and every other Studio request on the server event loop. * perf(parsers): parse identical GSAP source once Studio re-requests the parsed animations of unchanged source on every open, and several lint rules parse the same script in one run. A small memo keyed by the script text serves repeats; each caller gets its own copy. * perf(studio): build each preview document once per content version The preview route rebuilt the document for every browser without a cached copy. It now serves one build per ETag from memory, and the CLI keeps the last build on disk salted with its own file, so a restarted server serves the previous document without stale code. * perf(studio): build the opening film's preview while the browser starts The preview server built the document only when the player asked for it, after Studio had booted, so a first open waited about a second of idle server time. The CLI now requests the opening project's preview right after listening, and requests that arrive while a build runs share it instead of starting another. * perf(studio): request the preview document at page load Studio asked for the preview only once the player mounted, about 640 ms into a first open. It now requests it the moment the page loads, and again when the hash names another project, so the build or cache read overlaps Studio's boot. * feat(studio): show the cached frame 0 while the live preview boots Studio covers the live preview with frame 0 as the thumbnail route last rendered it, sized from the image so the stage does not shift, and removes it when the live frame is ready to show. The request is cache-only, so a miss never starts a render on the open path; the missing poster is rendered after the live frame shows, for the next open. * perf(cli): start Studio before the startup lint finishes hyperframes preview linted the whole project before it listened, 4 to 6 s on a large film, and did so in --json mode where the result is discarded. The lint now runs in the CLI worker while Studio starts and prints its summary when done; --json skips it. * perf(studio): render thumbnails from one loaded page, after the preview boots Every thumbnail opened a page and loaded the whole composition to shoot one frame, and the Compositions card asked for one while the live preview was still booting. The server now keeps one loaded page per preview document and seeks it per frame, reloading only when the project changes; card thumbnails wait for the project first ready preview. * perf(studio): parse GSAP animations after the preview boots Studio asked the server to parse the composition animations while the preview was opening; on a fresh server that cold parse ran on the event loop ahead of the preview build. The request now waits for the live preview to boot, or to fail loading, since only keyframes need it. * perf(cli): find orphaned browsers with one process-table read preview ran pgrep three times and then ps once per matching browser, all synchronously before listening: about half a second on a machine running other headless Chrome. One ps listing now finds every orphan in ~20 ms. * perf(studio): keep lint off the boot Opening a project started two lint processes while Studio booted: the terminal's startup lint and Studio's background lint, ~4 s of CPU next to the boot. Studio's background lint now waits until the live preview has booted, and lint processes run at the lowest CPU priority so they only take idle CPU. * perf(studio): open the editing session after the preview boots Opening a project read the composition source and parsed it for the editing session (linkedom plus hf-id assignment) on the main thread while the live preview was booting on the same thread: ~300 ms on a large film. The session now opens once the preview has booted; nothing the first frame shows needs it. * perf(studio): park the editor overlays until the preview boots The overlay frame loop polled preview geometry and off-canvas indicators from the first frame, forcing layout on a preview document that was still loading, on the thread its boot runs on: ~200 ms before the first frame on a large film. The loop now skips its subscribers until the preview has booted, then wakes. * perf(studio): treat the preview as booted once it can play Work deferred until the boot (editing session, lint, overlays, GSAP parse, card thumbnails) started at timeline-ready, which fires before the asset gate, so the editing-session parse ran inside the wait for play. The Player now latches the boot when the preview can show and play, or fails to load. * fix(studio): keep a left project's deferred work out of the one now open Deferred open-time work (source parse, background lint, editing session) waited on one global boot flag, so leaving a project before its preview booted let the next project's boot run the old project's work and write its results. The wait is now per project and resolves false once another project opens. A preview stuck without an error stops deferring that work after 5 s. * perf(cli): let the play page revalidate instead of refetching hyperframes play served the composition, its assets, the player and the runtime with no validator, so every reload refetched everything, the mp4 in full three times. They now carry an ETag and stay no-cache, so unchanged bytes cost a 304 and an edit is still seen. * fix(cli): serve an edited text asset even when its size and mtime match The play page tagged every asset by mtime and size, so a same-size rewrite within one filesystem tick kept the old tag and the browser kept stale bytes. Text assets now get a content-hash tag; media keeps the mtime and size tag Studio already uses. * fix(studio): close idle thumbnail pages so an idle Studio runs no composition Kept-loaded thumbnail pages stayed open for the life of the server, each running a live composition, so an idle Studio cost server CPU and memory that main does not. A page now closes after 10 s unused, and a page is closed only after the frame still running on it finishes. * fix(studio): stop a first open from reloading the preview once per scene file Studio stamped hf-ids into a composition the first time that composition was served, so opening a film of external scenes wrote to index.html and every scene file mid-session. Each write reached Studio as an outside edit and reloaded the preview, which failed for a large film. The server now stamps every composition once before it starts watching the project. * fix(studio): ignore play until the preview can play, so it is never undone Space (and any play() caller) could start playback before the preview frame finished loading. Its load step then paused and rewound to the restore point, so the play was silently lost. play() now waits for timelineReady, the same gate the Play button already uses. * fix(studio): hold play on a composition switch until the new preview loads Readiness was reset only when the project changed. Drilling into another composition kept the old ready flag while the new preview loaded, so Play or Space could start a play that its load step then undid. * refactor(studio): split background lint and thumbnail page reuse into single-purpose steps Keeps the boot wait in the background lint only, moves page lookup and idle close out of withPage, and drops a suppression the startup worker no longer needs. Behaviour unchanged. * chore(cli): declare the render-setup worker as a fallow entry It is spawned by path from cancellableProcess.ts, so it has no import-graph referrer; the entry list is where the repo records that, replacing the per-file ignore removed in the previous commit. * fix(cli): close a thumbnail page whose load fails The page never leaves the promise that loads it, so when the load throws (a WebGPU composition with no adapter, or the navigation timeout on a big film) nothing could close it. * fix(cli): match text assets by exact type and keep Range on them The pattern anchored only its first alternative, and text assets skipped buildRangeResponse, so a ranged request for a stylesheet or SVG got a full 200. * test: open the next project as Studio does, and read the stamped file once The absent-read guard test switched project without beginning its timeline session, so the per-project boot wait held the read. The stamp test checked then read the same file. * test(cli): rewrite the scene file without opening it first Opening the file by path counted as a check before the later read of the same path. * perf(cli): take a thumbnail's version from the cached project signature Each thumbnail walked the project and hashed every text file for its page version; the adapter already caches that signature and clears it from the watcher. An aborted request now also stops before its screenshot. * fix(studio): keep Play off until the preview's load step has run Play could enable before the preview document's load event, from the runtime's timeline message or from the blank page's load step settling on the preview's first message. The load step then paused and rewound the preview, so a Play pressed in between did nothing; a film with large images loads late enough for this to hit a cold open. Readiness now waits for the document's load step, whichever path asks for it. * refactor(studio): move the preview poster's state into usePreviewPoster NLEPreview.tsx passed the 600-line limit once main grew it; the poster's state and callbacks belong beside PreviewPoster. No behaviour change. * fix(cli): take an earlier thumbnail on a fresh page A composition need not draw the same frame when seeked back, so a kept page that had shown 20 s drew a different 10 s thumbnail than a fresh load. A kept page now only seeks forward, as a render does; an earlier time loads a fresh page. * perf(cli): close a kept thumbnail page a second after its last frame Held for 10 s, the page went on running its composition after the open's thumbnail burst, about 5 % of a core in the thumbnail browser while Studio sat idle. A burst's requests arrive back to back, so it still loads the page once. * fix(studio): count the preview as booted at its first frame The boot waited for every video and audio in the preview to finish buffering, which on a project with media took until the 5 s fallback. The thumbnails, editing session and lint that wait for the boot then started seconds late and kept an idle Studio busy. They now start once the first frame is up; media finishes buffering alongside. * perf(studio): render one thumbnail per composition for its card and clip A composition's sidebar card asked for its frame at 3.00 s and its timeline clip for the clip's midpoint, so opening a project rendered every scene twice. The clip now asks for the card's frame (the midpoint still, for compositions under 3 s), and the thumbnail cache serves both from one render: 20 scene renders drop to 12 on a 12-scene project. * chore: keep each changed file's comment share at or under main's The comment ratchet counts the comment lines this branch added. Each is cut, or kept as one line where it states an invariant (the GSAP parse cache returns copies; the boot starts waiting work at the first frame). The orphan-cleanup docblock is condensed and now names the process-table read it uses instead of the pgrep scan it replaced. No code line changed. * fix(studio): keep a 3 s clip off its end frame and give card and clip one encoded URL A composition exactly 3 s long asked for its thumbnail at 3.00 s, its end instant, which after a fade-out is an empty frame; compositions of 3 s or less now use their midpoint. The card built its thumbnail URL from the raw path while the clip encoded it, so names with & + [ or % asked for two different URLs, and a % in the name made the card's request fail on the server; both now encode. The readiness comment says the boot latches at the first frame, as it has since the boot moved. * fix(studio): encode the card's live preview URL too, and document the bundler's static guard The card's hover preview built its URL from the raw composition path, so a % in the file name made the preview route fail to decode it. The card now builds its composition URL in one place, encoded, for both its thumbnail and its hover preview. The static-guard bundle option keeps a one-line doc (its default and what it warns about); a neighbouring docblock is rewrapped to keep the comment share. * test(cli): mock studio-server once so the signature spy and the history hook both apply The main merge brought a second vi.mock of @hyperframes/studio-server into studioServer.test.ts; the later one replaced the first, so createProjectSignature was no longer a spy and the cached signature test read .mock of undefined. One mock now carries both overrides. |
||
|
|
24c3e197ef |
fix(studio): cutover gate classification, SSE cross-project bleed, benign races (#4269)
Implements the fixes from the 2026-09-21 cutover dashboard read
(plans/sdk/2026-09-21-cutover-dashboard-fixes-plan.md):
- sdk_cutover_failed now carries `family` and `error_kind`
(network/conflict/http/sdk). The one production gate event was a raw
`TypeError: Failed to fetch` from an unwrapped fetch (readProjectFile /
writeProjectFile's preflight), which an instanceof-only classifier would
still file as "sdk" and trip the rollback gate — added a message-based
fallback for the browser's fetch-rejection strings.
- studio:sdk_session_unavailable's `network` reason now carries `elapsed_ms`
and `hidden` (document.visibilityState at rejection), separating a
near-instant policy block (CSP/PNA/extension) from a dropped connection
the tab or server going away mid-flight.
- The ownership-race branch in useSdkSession's open effect now emits
sdk_session_superseded instead of sdk_session_unavailable{stage:ownership}
— it's a benign race (identity moved on mid-open), not a broken
precondition, and was being counted as one on the dashboard.
- Root-caused and fixed the read-404 "storm": /api/events (CLI host) and
the vite-dev hot-reload channel are one connection per SERVER, not per
project. A stale tab left open after `hyperframes preview` restarts on a
different folder (same port) received every save the CURRENT project
made, reloading its preview (which then 404s) and re-reading its own
composition on each one. Both transports now carry `projectId`; the
client-side coordinator drops a delivery whose projectId doesn't match
the tab's (absent field still passes, for one release of skew).
- studio-server's file routes report `why` on 403/404: `project_dir_missing`
(new — the CLI host's static resolveProject kept answering for a project
whose folder was renamed/deleted under a running server, which used to
fail closed as an indistinguishable path-traversal 403) vs `nul` vs
`outside_project`.
- absent_or_empty reads now carry `path_in_tree` (against the caller's
loaded file tree). Instrumentation only, per the graveyard page
(clearing-activecomppath-on-tree-absence) that refuted the "clear
activeCompPath" fix this was the proposed next step for.
Tests: unit coverage added for every change (sdkCutover.test.ts,
useSdkSession.lifecycle.test.tsx, useExternalFileChangeCoordinator.test.tsx,
studioServer.test.ts, files.pathSafety.test.ts). oxlint/oxfmt clean,
tsc --noEmit clean on studio/studio-server/cli.
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
|
||
|
|
6f6d24248c |
feat(studio): audio meter faders for groups and master (#4203)
* feat(studio): audio meter faders for groups and master * fix(studio): meter's mid band uses amber-500, the theme's actual token yellow-500 was reset to nothing by palette-reset.css (--color-*: initial) and never redefined in theme.css, so the mask never revealed any color for -6 to -3dB; the token gate test already catches this and was red. * refactor(studio): rename YELLOW_AT to AMBER_AT to match the amber token * fix(studio): fader nudge and aria-valuenow match the visual dB position * refactor(studio): use core StereoLevel for meter channel shape * fix(core): emit levelTap in the packed core build * fix(studio): name the preview fader Monitor and share clampNumber * fix(studio): split the meter rAF tick and cover its branches * style(studio): oxfmt AudioMeterStrip tests * fix(studio): preserve authored gain in audio meter faders * fix(studio): make timeline audio meters opt-in |
||
|
|
839ae426dd |
feat(studio): typed audio values, clip fades, audible video drops (#4250)
* feat(studio): typed audio values, clip fades, audible video drops Audio rows in the media inspector (Volume, Speed, Media start) take a typed value: click the readout, type "-6 dB", "1.5x" or "2.5s", Enter. Speed presets are hidden on <audio> clips. Clip-edge fades: data-fade-in / data-fade-out in seconds, honoured by the preview runtime (per-tick gain), the render mixer (afade after volume) and Studio (Fade in / Fade out rows, and drag dots at the top corners of audio clips and audible videos). Linear on both sides so preview and render agree; fades that outrun the clip scale to meet inside it. Dropped videos with an audio stream now land with data-has-audio="true" instead of muted, so the mixer keeps their sound. The media metadata endpoint reports hasAudio from the ffprobe call it already makes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * fix(audio): one owner for fades, dB, and afade-after-volume Illegal fade values become no-fade at fadeGain; typed inspector input still returns null so the readout stays red. Master and group mixes share one filter chain with volume then afade. Fade-out stays anchored to the trimmed clip end. * fix(studio): share audio helpers and bound typed media values * fix(studio): reserve sibling fade duration when editing --------- Co-authored-by: Jake Moran <jakemoran2011@gmail.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: Miguel Angel Simon Sierra <miguel.sierra@heygen.com> |
||
|
|
97420736d5 |
feat(studio): audio level meters at the timeline's right edge (#4193)
* feat(studio): audio level meters at the timeline's right edge * test(core): cover metering started before the audio context finishes init * fix(studio): keep meter follow after a dead preview and start bars at silence * fix(studio): keep the 0 dB peak tick inside the meter * fix(studio): keep the 0 dB peak tick visible without calc() * fix(core): tap meters on the program bus, mute on a monitor gain * style(core): wrap applyMasterGain to satisfy oxfmt |
||
|
|
7abbe49638 |
feat(studio): a per-page tab id, and the hash-validation verdict (#4224)
Two telemetry gaps, both pure instrumentation with no behaviour change.
`tab_id` — distinct_id identifies a browser, not a page. Several
investigations stalled on "two tabs, or one tab switching?", because a burst
of events alternating between two project hashes is indistinguishable from a
user moving between projects, and `session_start` fires once per page load so
counting it cannot tell them apart either. One id per page load, from one
shared module, attached by BOTH transports (`studio:*` and `studio_*`) — those
two families already drifted once on how `agent_runtime` is encoded.
Deliberately not persisted. Storage would survive a reload and quietly turn
this into a tab-session id, changing what every query means, and blocked or
cleared storage would make the property intermittently absent — which reads as
"old client" rather than "storage unavailable".
`project_hash_validated` — a tab that keeps its hash because the check itself
failed ("unknown") is currently indistinguishable in production from one that
never ran the check. Different causes, different fixes, one silent bucket.
Emits `stage` (mount | hashchange), `outcome` (ok | missing | unknown), and
the HTTP status when the server answered.
Verified: 8 mutants, 8 caught — including dropping tab_id from either
transport, regenerating it per read, persisting it to storage, emptying it in
the no-DOM fallback, and collapsing "unknown" into "missing". Full studio
suite 5,314 passed.
Co-authored-by: Claude Code <noreply@anthropic.com>
|
||
|
|
85a1a8f789 |
fix(studio): swap the preview via a shadow iframe instead of blanking on reload (#4207)
* fix(studio): reloading the preview swaps in a ready copy instead of blanking * fix(player): report painted once assets are ready and the loader has faded out assetsready fires when the loader fade starts, so a consumer promoting on it can expose a raised or fading panel. painted fires once per document load after the fade completes, with a getter for late listeners; it resets on each load. * fix(studio): promote the shadow preview only when painted, under one wait budget Studio waited for ready plus two frames, which can land while the player's loader panel is still up or fading. It now also waits for the player's painted event. The shadow no longer arms the 5s adapter give-up, so a slow but live load fails only at the single 15s budget. Set-destination availability follows the live iframe across a swap. |
||
|
|
0c158be165 |
feat(studio): edit a clip's speed ramp with a rate lane and presets (#4153)
* feat(studio): edit a clip's speed ramp with a rate lane and presets * fix(studio): keep the live preview attribute in sync with what gets persisted * fix(cli): snapshot picks the source frame through a rate lane and up to 10x hyperframes snapshot clamped the constant playback rate at 5 and ignored a rate lane in data-automation, so a sped-up or ramped clip showed the wrong frame. It now reads the rate through the runtime's own reader and maps time with the shared source-time function. * docs(skills): teach speed ramps as a rate lane in one reference page Adds the speed-ramps reference, corrects the 0.1 to 5 rate range to 0.1 to 10 and the 'speed ramps are not supported' lines in the skills, and regenerates the skills manifest. * docs(skills): say what fixes a ramped clip's length and how the render approximates pitch * fix(studio): hide the speed preset until the clip has a known duration A preset on a clip with no data-duration was stretched over a made-up one second. The panel now offers presets only when the duration is known. * docs(skills): fix the last stale ramp line in the editing recipes and the slice-cap wording |
||
|
|
05d5abb926 |
feat(studio): a blocked GSAP edit records which of seven causes it hit (#4214)
`edit_blocked` is the largest interaction failure in Studio: 575 users in 14 days, 17% of everyone who touches an editing control, and 41% of them are blocked on their first or second attempt. Only 30% ever commit anything afterwards. Almost all of it is one message. "This animation is computed at runtime. Edit the animation in the Code tab." covers ~460 of those users and is thrown from seven different places — runtime-dynamic provenance, unresolved keyframes, an unresolved selector, a geometry commit over unresolved source, and three live-tween-without-a-source-match cases across position and rotation. The telemetry carried only that string, so the classes were indistinguishable. The copy is also only literally true for the first. The rest are parser or source-matching limits where the animation may be plain authored source, and we send the user to the Code tab to rewrite something that could be fine. Adds a `detail` beside the coarse reason, set at each of the seven origins and emitted as `block_detail`. Telemetry only; nothing branches on it, and the user-facing copy is unchanged. Which cause dominates decides whether the fix is better copy, a parser gap, or an Unroll-style recovery path — and guessing that without the split is what this is meant to avoid. `directEditOutcomeForProperties` rebuilt blocked outcomes from `reason` alone, so it dropped the detail for the three causes that flow through it; it now carries it. Mutation testing caught that, not review. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|
|
98e8372a0a |
feat(studio): all panels move onto the dockable, persisted layout (#4192)
* feat(studio): every Studio panel is a dock panel and the shell moves onto it
EditorShell, App.tsx, the left and right panel columns, and the
inspector hooks now render through Dock.Panel instead of the old
fixed-width sidebars and split-pane inspector. usePanelLayout becomes
a thin facade over the dock store; fitPanels, the resize divider and
the split-inspector hook are dead and removed.
* refactor(studio): drop dead inspector flags and stale fallow entries after dock migration
Collapse inspectorButtonActive into inspectorPanelActive, remove unread
layers/design active fields, un-export unused prop types, flatten a nested
ternary, and point fallow ignores at the renamed/deleted files.
* fix(studio): keep right-panel behaviours the dock migration dropped
Block params dismiss on selection or when Design is hidden, the slideshow
panel can be closed, the selection outline follows the inspector intent,
caption editing focuses Design, and a URL slideshow tab opens once the
panel exists.
* refactor(studio): name the inspector-open state once in the header
* fix(studio): right-panel behaviours survive selection, restore and reopen after the dock migration
Block params stay open over an element that was already selected, caption mode wins over block params, the slideshow panel waits for the dock, the Renders tab title survives a reopen, each side column remembers the tab it last showed, tab switches are reported only when the tab changes, and the e2e thumbnail selector follows the dock.
* docs(studio): describe the dock layout and point comments at the renamed right panels
* fix(studio): block params survive a preview reload of the selected element, and panel titles are covered
The dismissal compares the selected element by its target key instead of object identity, because a preview reload rebuilds the selection for the same element. A closed and reopened panel keeps its custom title, with a test, and the e2e selector is formatted.
* fix(studio): block params leave with any other tab pick, and a restored slideshow placement survives loading
Block params are now dismissed by the tab setter the way their old tab was, including a re-pick of the same element, instead of by comparing selections. The slideshow panel is only closed after a file that was a slideshow stops being one, so a restored layout is not discarded while the file loads.
* refactor(studio): drop the duplicate inspector-open computation
The rebase onto main left two identical inspectorButtonActive/inspectorOpen
constants after a conflict resolution; only the first was still referenced.
* chore(studio): allow the dock migration deletions in the guard
StudioLeftSidebar.tsx, LeftSidebar.tsx and its storage test,
TimelineResizeDivider.tsx, useInspectorSplitResize.ts and fitPanels
are replaced by the dock; the CI deletion guard needs each named
with its reason.
* style(studio): oxfmt the deletion-guard entries
* fix(studio): rename Timeline's aria-label so it does not collide with its dock panel wrapper
Every dock panel wrapper now carries aria-label=<title>, matching the "Timeline"
title for the timeline panel. Timeline.tsx also set aria-label="Timeline" on its
own content div, so `document.querySelector('[aria-label=\"Timeline\"]')` found
the dock wrapper first and the timeline viewport gate CI check timed out waiting
for an attribute the real content div actually carried. Renamed to "Timeline
track view" and updated every consumer: the production diagnostics selector,
its tests, and the e2e viewport-gate script.
* fix(studio): restore inspectorButtonActive as a real prop after a rebase regression
Rebasing PR2 onto main replayed an older local commit whose diff did not
textually overlap main's newer inspectorButtonActive prop, so git applied
it with no conflict marker and silently reverted the header to computing
the value itself instead of receiving it. StudioHeader.dom.test.tsx already
asserts the prop is respected; restoring it makes that test meaningful
again. App.tsx now computes it once (panelLayout.rightCollapsed is already
the dock's effective collapse state, no separate railed-by-width case) and
passes it down.
* chore(studio): wrap a long doc comment in useRightPanelIntents
|
||
|
|
f9fc552188 |
feat(studio): move undo and redo into the timeline toolbar (#4196)
* feat(studio): move undo and redo into the timeline toolbar Undo and Redo now live in the flat timeline toolbar next to Select, Razor and the rest of the CapCut-style tools, instead of the header. Same actions, shortcuts and disabled states, with a shortcut-aware tooltip; disabled reads clearly dimmer than enabled at a glance. The header's right side is now segmented: Capture and Inspector share one rounded, bordered group with a hairline separator and one control height and radius, Inspector fills when on, and Export stays the lone separate primary action. Below about 1000px Capture drops to icon-only. * test(studio): tighten the Inspector fill check and cover Undo/Redo hotkeys An exact class token now proves the fill, since bg-hover also names a hover variant that was always present. Undo and Redo at their new toolbar spot get the same hotkey-classification proof the header used to carry for them. * fix(studio): undo and redo lead the timeline toolbar, left of select Miguel's call from the mockups: undo/redo read as the first tools reached for, ahead of selection and razor, matching where his reference places them. |
||
|
|
3ec26b5e27 |
feat(studio): shared menu, popover and value-control primitives (#4191)
* feat(studio): shared Menu, ContextMenu and Popover primitives One menu chrome and one popover chrome, on Base UI, wearing the theme tokens. Dismissal is plain Base UI with no capture-phase wrapper: its outside-press listeners are registered on document with capture set, so the canvas overlay's bubble-phase stopPropagation cannot starve them. Menu items carry an optional mono shortcut hint, a disabled state and a danger tone. ContextMenu opens at the pointer. Popover shares the surface, radius and open motion but owns no item semantics, so a text field inside it keeps its own keys. Also adds [role='menuitemradio'] to the playback-shortcut ignore list. The hand-rolled speed menu spelled its rows as buttons, which that list already matched; the shared radio item is a div with the same role, and nothing else in the list matched it, so an open speed menu would have leaked arrow keys and Space to the player. * feat(studio): shared Input, NumberField, Select, Slider and Toggle primitives The five value controls exist once, on Base UI, wearing the theme tokens. Each is boxed with a visible border and a focus ring so an inspector value reads as an input rather than as its own label. Value writes happen at a commit boundary, never per keystroke or per pointer move: one drag is one onCommit and one telemetry call. Right-click and Escape abort a drag in flight and put the pre-drag value back. The switch role joins the typing-target selector list, so a Toggle keeps the keys the native checkbox it replaces owned. No consumer moves onto these yet. * refactor(studio): shorten the primitives' comments and stop a default string reading as a class Main's comment gate rejects long comment blocks, and the class gate read the MenuItem tone default as a Tailwind class. The prop is optional instead. * feat(studio): export the shared primitives from the package entry A host mounting Studio pieces in its own tree imports them from the package: cn, Menu family, Popover, Input, NumberField, Select, Slider and Toggle. |
||
|
|
93ff9a994d |
feat(studio): fail the suite on a class that resolves to nothing (#3623)
* feat(studio): fail the suite on a class that resolves to nothing Tailwind silently drops a class it cannot compile, so `rounded-button` renders as no radius at all and nothing goes red. Two tests close that: - the token gate compiles Studio's entry stylesheet with every class the source claims and reports `file: class` for anything that produces no selector. Tailwind is the judge, so there is no allowlist. - the hex ratchet counts colour literals per file against a committed baseline. It fails on a rise, and on a fall it prints the command that banks the lower number. The baseline is only written under a named flag, never as a side effect of a run. The gate's first run found seven names the markup has always asked for and no config has ever defined: rounded-button, shadow-btn-primary, bg-surface-hover, bg-accent-red, ease-standard, text-2xs and two panel backgrounds. Each is added to theme.css, the semantic ones by role and the rest as deprecated aliases for the sweep to remove. It also found a dead state class on the timeline clip, styled nowhere, which is deleted. * fix(studio): gate a class by where it is used, not what it is called The extractor treated a string as a class candidate only when its binding matched Styles/Classes/ClassName(s), so the same twelve classes were gated in `sizeStyles` and invisible in `buttonSizes`. A name is not a contract. Candidate-ness now follows one file's data flow: an identifier used inside a className attribute or a class-building call marks whatever is bound to it as classes, under any name. A subscript is excluded, so the key of `variantStyles[variant]` is not mistaken for a class list. The name-based anchor stays for the map whose only consumer is another module. The sweep this opened found one class no config has ever defined: the automation menu's hover row asked for a background that compiled to nothing, and now uses the token the rest of that row already uses. * fix(studio): the colour ratchet counts code, not colour-shaped numbers in comments * fix(studio): draw the drop preview and preview guides from theme colours instead of literals * chore(studio): bank the lower colour-literal baseline now that comments are not counted * docs(studio): shorten the style test and extractor comments to fit the comment gate * fix(studio): the colour ratchet keeps strings when stripping comments * fix(studio): escape every regex metacharacter when following a bound class list * fix(studio): find a class list bound to a dollar-prefixed name * fix(studio): style source paths use forward slashes on every platform |
||
|
|
dc94692441 |
feat(studio): dock engine for a movable Studio layout, not yet wired in (#4165)
* feat(studio): dockview-backed dock engine, not yet wired into the shell Registry, layout schema/builder, zustand store, the Dock component and a persisted studioUiPreferences.dockLayout field. No panel moves onto it in this change; Studio shell is untouched and looks identical. * fix(studio): dock.css reads panel tokens as css variables so it compiles standalone Tailwind v4 processes dock.css without the studio theme, so theme() calls failed to resolve. Use the --color-panel-* variables instead. Also drop the unused DockController.open member. * test(studio): dock restore and schema cross-checks fail when their code is removed * fix(studio): a reopened side panel rejoins its column's tab group instead of opening a new column * test(studio): pin the dock reopen paths for the centre zone and a fully closed column |
||
|
|
c2ca2291ca |
fix(studio): dropping an asset between or above timeline rows opens a new row (#4160)
* fix(studio): dropping an asset between or above timeline lanes opens a new track there * refactor(studio): reuse the source patcher and shared drop-placement type for track inserts * fix(studio): the dropped clip must carry its peers' sourceFile, not the resolved path planDropTrackInsert stamped the synthetic dropped element with the resolved target path string, but real elements on the main document carry no sourceFile at all. sameSourceFile compared the two directly, so the dropped element always read as belonging to a different file and every peer was skipped as unwritable, silently landing the drop on an existing track instead of opening one. * refactor(studio): trim drop-track comments and share one can-insert-track predicate Drop the TimelinePlacement alias, compute the file-or-asset check once for dragover and drop, and shorten two comments that narrated history. * fix(studio): plan a dropped-in track against the visible rows, not clips the timeline hides The insert row counts the rows the timeline shows, but the plan was built from every same-file clip. A clip the timeline does not show as its own row shifted the boundary and renumbered lanes it should have left alone. * test(studio): assert the dropped clip lands on the opened lane * fix(studio): a row drop measures its boundary on the same row order a clip drag does The drop path indexed the insert row against the rows the timeline shows, which include audio-group anchor rows, but planned it against a plain sorted track list. An audio group above the boundary shifted the new row by one. The placement now carries the displayed row order and the planner uses it, as the clip drag already does. |
||
|
|
ea07f0e93b |
Merge pull request #4139 from heygen-com/sdk-cutover-decline-reason
fix(studio): a composition with a <canvas> no longer kills the SDK session |
||
|
|
7797c5ead4 |
feat(studio): the timeline shows one row per top-level element and no child rows (#4132)
* feat(studio): the timeline shows one row per top-level element and no child rows * test(studio): cover the top-level id collection the timeline rows come from * chore(studio): shorten the row-elements comment * fix(studio): keep implicit layers as rows and say why a nested element cannot be hidden * refactor(studio): drop implicit layers; rows are exactly what topLevelElements returns * test(studio): untimed root wrappers are not timeline rows * fix(studio): an empty timeline message clears the rows; drop the unused implicit contract * fix(studio): an empty clip manifest reaches the timeline and clears the rows * fix(studio): an empty clip manifest does not shrink the transport to its 1s floor * chore(ci): allow deleting the child-row expansion hook and its test |
||
|
|
db78b4fe68 |
fix(studio): keep a literal relative require out of the canvas-stub docs
verify-packed-manifests scans packed JavaScript for relative import
specifiers with a set of regexes that do not strip comments, so the
`require('./canvas-shim.cjs')` inside the stub's doc comment read as a real
import of a file that is not in the studio tarball, and the Build job failed.
Describes linkedom's try/catch guard in prose instead. The same literal was in
the test file's header comment; CI only reported the first match, so both are
fixed here.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
d5e1de9201 |
fix(studio): a composition with a <canvas> no longer kills the SDK session
linkedom's HTMLCanvasElement constructor calls createCanvas(300, 150) from the
Node-only `canvas` package, behind this guard:
try { module.exports = require('canvas') }
catch { module.exports = require('./canvas-shim.cjs') }
The guard only works with a runtime require. Vite resolves the specifier
statically, so the bundled form is `try { exports = <module> } catch {...}` — a
plain assignment that cannot throw. The catch never runs, linkedom's own shim is
bundled but unreachable, and createCanvas lands undefined. Verified in the built
artifact: the canvas module namespace carried only a `default` export.
Parsing any <canvas> tag therefore threw inside openComposition, so Studio lost
its SDK session for the entire composition. Every edit then fell back to the
server path, and the resolver shadow did not run either, which is why this was
invisible before v0.8.47 added studio:sdk_session_unavailable. In the 72h after
the flip it accounted for 1065 of 1544 session-open failures, across a large
share of 197 users. Canvas is common in compositions: Three.js, shaders,
particle effects, charts.
Aliases `canvas` to a local browser stub that mirrors linkedom's shim
(measurement-only; nothing in the SDK rasterizes through it). Reimplemented
locally rather than pointing at linkedom's commonjs/canvas-shim.cjs, which its
exports map does not expose.
Confirmed against a rebuild: the namespace now carries createCanvas, so the
call returns a stub instead of throwing.
Note the unit tests here pass with or without the fix — vitest resolves the
require at runtime, so only the bundled build was ever broken. The regression
guard therefore pins the alias itself, since nothing else in the suite can
observe the bundler.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
||
|
|
898d27869e |
feat(studio): preview ruler and safe-margin toggles (#4127)
* feat(studio): preview ruler and safe-margin toggles * test(studio): cover guides placement in the preview pane and the caption band box * feat(studio): safe margins are two nested 90 and 80 percent boxes with edge ticks * fix(studio): safe box ticks centred on the line, no halo, tighter skill wording test |
||
|
|
a192701adb |
feat(studio): add per-project UI preference scoping (#4093)
* feat(studio): scope UI preferences per project Panel widths, timeline zoom, and other UI preferences shared one localStorage entry across every project. Key by the active project id (from the existing hash route), falling back once to the pre-scoping entry so an existing project's first load doesn't look reset. * docs(studio): trim a comment past the repo's 4-line cap * fix(studio): make per-project preference scoping opt-in Auto-deriving the project id from the URL by default would have silently flipped every existing caller into per-project mode, most of which read once at mount and never again across a live project switch, and some of which (playback rate, mute, snap) are documented as deliberately project-agnostic in playerStore's reset. Require an explicit projectId instead so today's 9 call sites are unaffected. |