Repository navigation
fix(site/src/components/Chart): wait for chart before tabbing in TooltipHovered story - #31930
Merged
Merged
Conversation
…tipHovered story The play function tabbed before ResponsiveContainer mounted the chart SVG, so focus stayed on body, the tooltip never opened, and Pixel failed the Storybook build on every main commit since #30891.
deansheather
approved these changes
Nov 9, 2026
This branch was previously 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The
TooltipHoveredstory added in #30891 callsuserEvent.tab()beforeResponsiveContainerhas mounted the chart SVG. Focus stays on<body>, ArrowRight does nothing, the tooltip never opens, andfindByText("February")times out. Pixel then marks the build as failed, so the Storybook job has failed on everymaincommit since #30891, for example this run.The story now waits for the chart with
findByRole, as theDefaultstory in the same file already does.The story passes under Vitest, which is why the PR's tests missed it. I reproduced the failure with Playwright against a static Storybook build at Pixel's 1900px viewport, and confirmed that the wait fixes it.
Investigation notes
mainStorybook run:70f62ae42. Every run from6a95ba257(fix(site/src): make hover tooltips hoverable and persistent #30891) on fails with the same play-function error. The PR's own Storybook check also failed (run 41037601859), but the job isn't gated byrequired, so the PR merged.webWorkerBootstrap.jsuncaught exceptions in the logs also appear in the last green run, so they don't affect the build verdict.svg.recharts-surfaceis absent when the play function starts. With the wait,tab()focuses the SVG and the tooltip shows "February".findByRoleinstead of a fixed delay orwaitFor. It waits for exactly the element the next step needs, and it matches the existing story.Generated by Coder Agents on behalf of @jeremyruppel.