refactor(studio): delete the move writer no Studio path calls - #4837
Merged
Merged
Conversation
miguel-heygen
force-pushed
the
refactor/studio-delete-var-offset-move-writer
branch
from
October 1, 2026 06:36
65743a5 to
c3d9bc9
Compare
Edit accuracy: 557 passing here, 557 on the base branchThe gate passes. |
miguel-heygen
force-pushed
the
refactor/studio-delete-var-offset-move-writer
branch
3 times, most recently
from
October 1, 2026 11:12
998b018 to
1785197
Compare
miguel-heygen
force-pushed
the
refactor/studio-delete-var-offset-move-writer
branch
from
October 1, 2026 11:28
1785197 to
439257a
Compare
miguel-heygen
marked this pull request as ready for review
October 1, 2026 12:44
miguel-heygen
deleted the
refactor/studio-delete-var-offset-move-writer
branch
October 1, 2026 12:46
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Deletes
handleDomPathOffsetCommitfromuseDomGeometryCommits. It is the old move writer that adds a move as--hf-studio-offset-x/yon top of the layer's translate, and no Studio path calls it.Every move in Studio reaches
handleGsapAwarePathOffsetCommitinstead:ConnectedDomEditOverlay;StudioRightPanels;moveTo;handleDomPathOffsetCommit.useDomEditSessionmaps that name to the GSAP-aware handler. It never takes theuseDomGeometryCommitsone, whichuseDomEditCommitsreturned without anyone reading it.How
useDomGeometryCommitsand fromuseDomEditCommits's return.buildPathOffsetPatches. Since fix(studio): resize an element without GSAP by its own width, height and translate #4805 the resize writes its anchor as a plain translate, so the deleted handler was its last caller.applyStudioPathOffsetstays: the seek re-apply and the drag still use it.buildClearPathOffsetPatches(Reset).buildPathOffsetPatches's own tests and its combined-with-box-size tests (manualEditsDomPatches.test.ts);persistSeam.integration.test.ts);anchoredResizeReleaseShift.test.ts). The anchor-loop tests in that file stay.manualEditsDom.tsthat citedbuildPathOffsetPatches.rejectGsapCssFallback), the hook'spreviewIframeRefparameter andgsapTargetCache.ts. Since fix(studio): a rotate without GSAP saves where you let go, nested too #4802 the rotate no longer uses the guard, so the deleted handler was its last caller and the cache's only consumer; their.fallowrc.jsoncentries go too.gsapTargetCache.tstoALLOWED_DELETIONSinscripts/check-no-main-deletions.mjs, with the reason.Proof it was dead
git grep -n buildPathOffsetPatchesnow finds nothing.git grep -n handleDomPathOffsetCommitin this repo finds the name only in:useDomEditCommitspassthrough and its tests.The session's
useDomEditCommitsdestructure (useDomEditSession.ts) never took it.Tests
useDomGeometryCommits.test.tsx,useDomEditCommits.test.tsx,manualEditsDomPatches.test.ts,manualEdits.test.ts,persistSeam.integration.test.tsandanchoredResizeReleaseShift.test.tspass, and so does the whole studio suite (6289 tests). Studiotsc, oxlint and oxfmt are clean on the changed files.Before
Main at this PR's merge base, a box with no GSAP and
translate: 40px 30px. Typing X = 100 in the Layout row saves onlystyle="translate: 100px 30px"on the box; dragging it +90/+60 then saves onlystyle="translate: 190px 90px". Each panel shows the Studio after that step; below them is the saved file's diff for each step.After
Same fixture and steps on this PR's head: the same two saves,
style="translate: 100px 30px"and thenstyle="translate: 190px 90px", byte for byte the same files as on main.