The box around a text layer inside the playground card stopped mid-word. The
layer is 260px wide and paints 313, because its parent carries `scale(1.2)`,
and the chrome read only the element's OWN transform. The top-left looked
right, since the corners are anchored to the real bounding rect, so only the
right and bottom edges fell short, by exactly 1/1.2.
The same read decides whether to draw the box rotated at all, so an element
whose parent is rotated got an upright box over a rotated one.
The transform is now accumulated from the element up to the composition root.
Only the linear part matters: each transform's origin contributes translation,
and translation is already discarded by matching the corners to the element's
bounding rect, so composing the matrices is enough and no per-ancestor origin
has to be unpicked. The walk stops inside the composition document, because the
canvas zoom lives on the iframe in Studio's own document and is applied
separately.
The fake DOMMatrix the geometry tests use gained the `multiply` it now needs.
Colouring a word in the shipped playground saved correctly and rendered white,
because that composition sets `-webkit-text-fill-color` on the text element.
That property inherits and paints the glyph fill, so it wins over any `color`
a run below it sets. The composition is not doing anything wrong; from the
editor it reads as the colour picker being broken.
The run now says its colour twice when, and only when, something else would
paint over it: the rendered span is asked whether its fill differs from its own
computed colour, and only then is the fill written alongside. Both sides come
from the same computed style, so neither colour notation nor inheritance has to
be untangled by hand, and a composition that does not do this keeps the markup
it had.
Every colour chosen in the preview was dropped on the way out, silently, for
any element whose text contains a line break.
Two gates disagreed. The press that opens an edit asks whether the element's
own markup can be rewritten. The commit asked the design panel's question
instead: does this element have text fields. It has none when its text
contains a `<br>` — a `<span>` holding one is not a leaf, so nothing inside
counts as a field and the element reports no editable text at all. So the
caret opened, the toolbar worked, the preview showed the styling, and the
commit returned without a request, a file change or a word about it.
The commit now asks the same question the press did. The panel's own text
commits still use the panel's rule, which is theirs.
Also stops the writer's own `data-hf-id` counting as a layer identity: it is
stamped onto every element on the way to disk, so once a file had been saved
the wrapper this rebuild adds inside a flex container looked like a layer
again and went back to hiding the real ones underneath it.
Choosing one colour for three characters painted a different shade onto each
character of the whole line.
Two faults, both in putting the selection back after the rebuild. The offset
walk counted a line break as a character everywhere except the one place that
maps an offset back to a DOM position, so in an element containing a `<br>`
the restored selection sat one character further along for every break before
it. And a native colour picker reports every sample while the pointer moves
inside it, so one choice of colour arrives as a stream of them — each restyling
a selection that had walked on since the last.
The wrapper this rebuild adds inside a flex container carries nothing, and
reading it as the layer it sits around hid the real one below it, so a second
edit of the same element threw away every identity the first one had kept. An
element with nothing on it is no longer taken as an identity.
Three faults that met in one place: an element whose children are text layers.
Removing a layer, or adding one, could never save. The per-child operations
can only address children that already exist, so they refuse any change in how
many there are — which is every add and every delete. The panel offered both
buttons and both ended in "Couldn't save this text structure change". A
structure change now writes the structure, through the same operation an
inline style edit already uses.
Styling a run of characters threw away the identity of every layer in the
element. The rebuild emitted fresh, bare spans, so the attribute the panel
tracks a layer by went with them, and afterwards nothing the panel offered
could match a layer to its source. Runs now carry the child they came from and
the rebuild puts its identity back, without duplicating it onto a run that was
split off.
Saving a styled run deleted its neighbours' typography. The allowlist was
paint-only, on the reasoning that text edits should not move or resize things
— but the design panel writes exactly those typography properties onto exactly
those spans, so the rule did not stop text changing layout, it deleted the
layout the user had set. Colouring one word dropped a sibling's font size.
Double-press a text element in the canvas and the caret opens where you
pressed, in the element itself rather than in a panel. Select characters
and a small toolbar offers colour, bold, italic and underline, applied to
exactly those characters.
Styling text needed a capability Studio did not have. The patch vocabulary
was inline-style, attribute, html-attribute and text-content, and
text-content assigns textContent; the text-field model escapes markup on
the way out and refuses a change in child structure. No route existed for
a span to reach a composition file.
Adds a rich-text operation that has one, guarded by a single sanitiser in
packages/core called on both ends of the trip: in the browser so the
preview shows what will be saved, and on the server because that is where
the file is written. Tags and style properties are a small allowlist, and
an unexpected tag loses its formatting rather than its words.
Styling is applied by reading the element into a flat list of runs and
rebuilding it, not by wrapping a DOM range. Replacing a colour, removing
one, and styling across an existing run stop being special cases, and the
markup cannot grow with repeated edits. In a flex or grid container the
runs go inside one wrapper so a coloured word cannot reflow the element.
Also fixes the keyboard: the shortcut guards matched contenteditable=true
only, so playback shortcuts ate letters typed into the composition.
A near-uniform drag collapses to the `scale` shorthand, but the finalize step
measured the element at the per-axis pair it computed rather than the single
value the commit writes. The element was measured at a scaleY the file never
gets, so the position correction came out tilted by the difference.
Adds a sweep over the shapes a composition produces — shrink, grow, first
resize, rotated, steeply rotated, non-uniform, near-zero, inline-sized, no
position write, animated position, and two drags in a row — each checking the
element renders on its drop point from the PERSISTED scale and position. The
geometry model is calibrated against real gesture traces: the same inputs
reproduce the rects the browser reported to three decimals.
A scale resize measured its drop-point correction while the gesture's own
translation was still applied, but the position commit adds that correction
onto the element's PRE-gesture position, which it reads from the gesture's
base attributes. The two disagreed by the whole drag distance, so the commit
persisted a position a drag-length from where the element was dropped: it
held the drop point for one frame and then slid off.
Move the element back to that base before measuring, so the residual and the
commit share one origin. For an element whose position is a static hold that
usually means no correction at all, which is the right answer: scaling about
the centre already leaves it on the drop point.
An element whose position is animated left the drop point anyway. The
finalize step wrote its correction as a static position hold, and the
element's position tween rendered its own value a frame later and won.
Before that it stood down entirely on such elements, on the grounds that
a keyframed path has no single anchor to preserve, which had the same
visible result: the element moved.
It has an anchor, the frame the user is looking at. The correction now
goes into that tween at the playhead, through commitGsapPositionFromDrag,
which is the same commit a drag on the same element already uses. Static
holds keep the existing path.
This is the difference the debug log showed between an element carrying
position:to, which moved after release, and one carrying position:set,
which did not.
The finalize step measures where the committed scale put the box and
shifts the position hold by the difference. Whether the commit had
actually rendered when it measured was luck: on a first resize the
timeline had not re-seeked, so it measured the element at its natural
size still sitting on the drop point, saw no residual, and skipped the
correction. The scale then landed, GSAP rendered it about the element's
centre, and the element jumped by the whole drag distance. Elements
resized before got a correction only because their previous scale made
the residual non-zero by accident.
The committed scale is now applied to the live element before measuring,
so the measurement means what its comment says either way, and a skipped
correction is logged rather than silent.
Confirmed against a real session: a first resize of a 630px chip now
reports residual -109.93 and lands on the drop point, where it previously
logged no scale-finalize at all.
A uniform drag committed the `scale` shorthand. If the tween's keyframes
already stated `scaleX` and `scaleY`, the commit left both forms in the
same keyframe, and GSAP animates each property name independently, so the
longhands ran alongside the shorthand and won.
The resize therefore computed the right number, wrote it to the file, and
did nothing: the element snapped back to its old size the moment the
handle was released. Reproduced from a real session, where a drop at 384px
on a 630px element wrote {scaleX: 1, scaleY: 1, scale: 0.61} and rendered
at the original size.
The mixing hazard was already known in the other direction, where a
non-uniform drag takes a rewrite path that normalizes every keyframe to
the longhands. This makes the condition symmetric: whenever the tween
already speaks longhands, a uniform drag speaks them too.
Resizing an element whose size is driven by a scale animation committed a
scale computed against a hardcoded 200px fallback, because the only
original size the draft recorded was the element's INLINE width, and a
composition sizes its elements from the stylesheet.
A 630px chip dropped at 1260px wide committed a scale of 6.3 instead of 2,
so it landed at over three times the size it was dropped at. The next drag
compounded it, because that wrong scale then counted as the element's live
one.
The draft now records the box it measured, once, before it writes a width
of its own, and the intercept reads that. The inline attributes keep their
own job of restoring an inline style, which is why they cannot answer this
question.
Review caught that the same anti-pattern was still live in the Studio binding:
canaryEventProperties destructured only `enabled` and dropped the reason. Its
own doc comment promised 'identical shape to the CLI, so a rollout spanning
both reads as one flag' — which the CLI-only fix had just made false.
This matters beyond symmetry. A CLI-launched Studio adopts the CLI's decisions
and shares its bucket seed, so a cohort flip can surface on either surface.
Emitting attribution on only one leaves Studio-observed flips unattributable
and makes the two flip counts irreconcilable — and Studio is the surface most
likely to expose a shared-seed-with-diverging-id pattern, which is the open
question the reason exists to answer.
Also adds the no_unit_id emission test the CLI side advertised but never
asserted, and a Studio pair pinning that a URL override and a cohort roll
produce the same assignment with different reasons.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- A long-lived preview cached its telemetry posture in two places
(readConfig and shouldTrack). Running `telemetry disable` in another
terminal left it resolving canaries and injecting the CLI id for hours.
Both caches are now dropped together at a request boundary.
- Studio minted and shipped a telemetry id for every render regardless of
the browser profile's opt-out, and the server emitted the outcome under
CLI policy, which cannot see localStorage or DNT. The browser now sends
an explicit telemetryOptOut, distinct from an old client's omission.
- Any non-empty HYPERFRAMES_PREVIEW_HOST disabled the DNS-rebinding guard,
so even a loopback bind accepted a hostile Host. The guard now holds for
loopback binds and, on a LAN bind, admits only names this machine
answers on.
- sunsetAfter had no reader of the current date. A scheduled workflow runs
scripts/check-canary-sunset.ts weekly, so a failure lands on the
rollout's owner rather than on an unrelated PR author.
- The install-state seed memo outlived `rm -rf ~/.hyperframes`,
resurrecting a cleared cohort. Removed; it only saved a read on a
readConfig cache miss.
Docs updated for the Host rule and the 100% exclusion carve-out.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>