Skip to content

Count chart redraws instead of timing the resize check (fix #495) - #497

Merged
stephaniehobson merged 1 commit into
agents-md-stale-notesfrom
495--resize-timing-flake
Nov 10, 2026
Merged

stephaniehobson merged 1 commit into
agents-md-stale-notesfrom
495--resize-timing-flake

Conversation

@stephaniehobson

@stephaniehobson stephaniehobson commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

One-line summary

Make the hardware resize check count chart redraws instead of timing them, so it stops failing on slow CI runners.

Significant changes and points to review

  • resize.spec.js no longer compares long tasks against a 1000 ms budget. It counts writes to each chart's path.mg-main-line d attributes during the resize sequence, and expects one write per line per chart: a single redraw, with no animation. That checks the same two regressions as before (lines animating on resize, and charts redrawing on every resize event) without depending on how fast the runner is.
  • The spec turns tracing off. On CI's traced first retry, tracing slowed each viewport step past ChartContainer's 150 ms debounce, so every chart redrew at all seven widths. That's where the 6946 ms failure came from.
  • The issue suggested a chart was still animating from page load when measuring started. It wasn't: each chart draws once during load, with no transition. The findings are in the comment on Resize timing check can start measuring before the hardware charts finish their first animation #495.

Issue / Bugzilla link

Fixes #495

Testing

  • Revert the transition_on_update: false redraw in src/components/views/MetricsGraphics.jsx and run npx playwright test fixtures/resize.spec.js --project=chromium --retries=0. It fails with 2 writes per line.
  • Replace the setTimeout debounce in ChartContainer._onResize with a direct this._setChartSize() call and run the same command. It fails with 7 writes per line.

@stephaniehobson stephaniehobson changed the title Count chart redraws instead of timing the resize check (#495) Count chart redraws instead of timing the resize check (fix #495) Nov 9, 2026
@stephaniehobson
stephaniehobson removed this pull request from stack #494 November 10, 2026 04:28
The 1000 ms long-task budget failed on slow CI runners because the
resize itself costs more there, and the traced retry slowed each step
past the resize debounce so every chart redrew at every width. Counting
line d writes checks the same two regressions without depending on
runner speed.
@stephaniehobson
stephaniehobson force-pushed the 495--resize-timing-flake branch from 31e4724 to b47c51f Compare November 10, 2026 15:41
@stephaniehobson
stephaniehobson marked this pull request as ready for review November 10, 2026 15:52

@stevejalim stevejalim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rubbestamp+

@stephaniehobson
stephaniehobson merged commit 57e6a5e into main Nov 10, 2026
7 checks passed
@stephaniehobson
stephaniehobson deleted the 495--resize-timing-flake branch November 12, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resize timing check can start measuring before the hardware charts finish their first animation

2 participants