Repository navigation
test(ui): hold interactions to counted work budgets - #1569
Merged
Merged
Conversation
Count what each interaction costs instead of timing it: layouts, style recalculations, DOM mutations, DOM nodes, rows or cards drawn, and mock client reads, for graph pan and zoom, Checks, and plan sections on the large mock project. The graph's settle timer is held while a gesture is counted, so DOM changes and reads are the same on every run. Each budget notes where its count comes from, and the budgets run as a required step in the UI job.
kvlonge
marked this pull request as ready for review
November 18, 2026 09:01
kvlonge
enabled auto-merge
November 18, 2026 09:03
kvlonge
added a commit
that referenced
this pull request
Nov 18, 2026
…rk budgets The 10K wall-time checks for Ack and going back to the Overview sat at their budgets and failed under ordinary load. Following #1569, the required budgets project now counts layouts, style recalculations, DOM changes, nodes, rows drawn and mock reads for each interaction the timing test covers: opening the folder view, expand all, opening one folder, scrolling the opened tree, going back to the Overview and acknowledging nodes out of date. The wall-time test stays as it was, in the non-required UI timings job, which reports it. Acknowledging holds back the Overview's read that follows (the mock client's reply timer) and requires the item to have left the list already, so the settling that moves it at once is checked without timing it. Budgets come from 10 runs each at 1x and 6x CPU, with #1569's headroom. Both regressions tried are caught: with the folder tree's windowing off, expand all draws 4,480 rows against 28; with settling off, the item stays listed while the read is held, and styles go over budget.
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.
Why
The UI's speed guards time interactions, so they can't block merges on hosted runners whose speed varies. This adds guards that count work instead. A regression that re-renders on every frame, draws every row or reads twice gives the same numbers on any machine, so the check can be required.
Changes
ui/e2e/budgets.spec.tsruns fixed gestures on the large mock project: wheel zoom and drag-pan on the large group and the Lineage overview, reopening Checks with thousands of checks and scrolling its list, switching plan sections, and Show more. For each gesture it counts Chrome's layouts and style recalculations, DOM mutation records, DOM nodes, rows or cards drawn, and mock client reads, and checks them against a budget. Each budget has a comment saying where its count comes from.?stilloption stops mock runs from advancing on their own.budgetsPlaywright project runs as a required step in the UI job.Verification
npm run check,npm test, and the layout project.