test(studio): an edit accuracy benchmark for manual editing - #4760
Draft
miguel-heygen wants to merge 9 commits into
Draft
miguel-heygen wants to merge 9 commits into
miguel-heygen wants to merge 9 commits into
Conversation
Drives real pointer and keyboard gestures in the built CLI Studio on generated one-element projects and scores tracking, drop jump, reload drift, undo fidelity and smoothness in composition px.
Render drift against a producer frame ships in the stacked follow-up so this PR stays near the size budget.
Builds the grid as a product of its axes, drops unused exports and marks the harness functions that fallow scores as complex.
…it measured Moves scoring and the report files into report.mjs, stamps both commits at start, counts undo byte failures apart from the worst box, and survives Studio swapping the preview iframe mid-read.
660 cases on main ae91433: 0 pass all six checks, 304 pass everything but smoothness. Five cases that hit a harness error in the full run were rerun and spliced in.
5 of 6 tasks
Rounding to the nearest 0.01 stored seven 0.502 px tracking results as 0.5, which reads as a pass at the 0.5 px limit.
5 of 6 tasks
This branch has not been deployed
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
A benchmark that measures how accurately manual editing in Studio follows the person doing it. One command drives real pointer and keyboard gestures in the built CLI Studio, one generated project per case, and scores each case in composition pixels.
This first part ships the grid, the project generator, the runner and five of the six metrics, plus
baseline.jsonfrom a full run on main. Render drift (the check against a producer frame) is the stacked follow-up. The CI gate is a separate later PR.Flags:
--grid full|pr,--shard i/n,--jobs N,--filter <regex on case id>,--out <dir>,--port <first>,--cli <cli.js>.Why
Nothing measured whether a move, resize, rotate, crop or nudge lands where the pointer put it, survives undo and a reload, or stays smooth. Manual edit fixes had no score to hold them to, and the benchmark is that score. Later edit PRs should raise it and never lower it.
Related work
Refs the stacked render drift PR (to follow). The CI gate and ratchet over
baseline.jsoncome next, in their own PR.How
Grid (660 cases)
gsap.sethold.translatein px,translatein %,left/top: 50%with a-50%translate, or GSAPxPercent/yPercent: -50. The last is not applicable without GSAP.Measurement
DOM.getContentQuads), mapped to composition px through the root composition's own quad.studio_seekis used only to seek.Metrics (all in composition px)
A case passes at ≤ 0.5 px on 1-3, byte-identical undo and redo with the box ≤ 0.5 px, and frame p95 ≤ 16.7 ms. The table also counts cases passing everything except smoothness, because smoothness gating is still an open decision.
Test plan
baseline.json.fallow audit --base origin/mainand the comment ratchet pass.Baseline on main: 0/660 pass all five checks here; 304/660 pass everything but smoothness.
What the failures are:
translateapplied again on top of GSAP's folded x/y after an undo.Before
There was no benchmark. This is one of its generated case projects in Studio before any gesture, which is where every case starts.
After
The baseline table from the full run on main, then two of the worst cases as the bench captured them: a resize that jumped 222.6 px on release, and a crop whose undo left the element displaced.