Uh oh!
There was an error while loading. Please reload this page.
perf(scripts): settle the alignment audit on DOM quiescence, not a flat budget - #2453
Merged
jackwener merged 1 commit intoAug 7, 2026
Conversation
…at budget Part of apache#2389. The alignment audit slept a flat 2.5s per fixture after its readiness selector, to cover content that populates after the shell mounts (the QR-onboarding modal, the usage stats tables) — 27.5s of unconditional waiting across the 11 fixtures on every CI run. Content arriving after mount lands as DOM mutations, so the audit now waits for the observable fact instead: a MutationObserver quiet window (500ms with no mutations, AUDIT_QUIET_MS), bounded by the same 2.5s budget as before (AUDIT_SETTLE_MS) so a never-quiet page still proceeds on the old CI-gate schedule. It runs after withFixtureWindow's own settle expression, which has already frozen animations and awaited document.fonts — the only remaining movement is real content landing. The quiet window outlasts the longest fixture-internal deferral (the settings-bots-onboarding waiting state arms ~300ms after mount), so every surface the flat budget covered is still measured fully populated. Timing (local, full audit, all 11 fixtures clean before and after): 42.5s -> 22.7s wall.
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Part of #2389 (alignment audit; Pi TUI landed as #2448, Runtime Host as #2450, desktop e2e in its own PR).
What changed
The alignment audit slept a flat 2.5s per fixture after its readiness selector to cover content that populates after the shell mounts — 27.5s of unconditional waiting across 11 fixtures on every CI run, sized for the slowest runner and paid by every runner.
Post-mount content lands as DOM mutations, so the audit now waits for that observable fact: a MutationObserver quiet window (
AUDIT_QUIET_MS, 500ms with no mutations), bounded by the unchanged 2.5s budget (AUDIT_SETTLE_MS) so a never-quiet page still proceeds on the old CI-gate schedule.Two properties keep coverage intact:
withFixtureWindow's own settle expression, which has already frozen animations/transitions and awaiteddocument.fonts— so the only remaining movement is real content landing, and animation churn can't fake "busy".settings-bots-onboardingwaiting state arms ~300ms after mount), so every surface the flat budget measured fully populated is still measured fully populated.Timing (local, full audit)