Skip to content

fix(site/src/components/Chart): wait for chart before tabbing in TooltipHovered story - #31930

Merged
jeremyruppel merged 1 commit into
mainfrom
fix-chart-tooltip-story-race
Nov 9, 2026
Merged

jeremyruppel merged 1 commit into
mainfrom
fix-chart-tooltip-story-race

Conversation

@jeremyruppel

Copy link
Copy Markdown
Collaborator

The TooltipHovered story added in #30891 calls userEvent.tab() before ResponsiveContainer has mounted the chart SVG. Focus stays on <body>, ArrowRight does nothing, the tooltip never opens, and findByText("February") times out. Pixel then marks the build as failed, so the Storybook job has failed on every main commit since #30891, for example this run.

The story now waits for the chart with findByRole, as the Default story 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
  • Last green main Storybook run: 70f62ae42. Every run from 6a95ba257 (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 by required, so the PR merged.
  • The 17 Monaco webWorkerBootstrap.js uncaught exceptions in the logs also appear in the last green run, so they don't affect the build verdict.
  • A probe in the static build showed that svg.recharts-surface is absent when the play function starts. With the wait, tab() focuses the SVG and the tooltip shows "February".
  • I chose findByRole instead of a fixed delay or waitFor. It waits for exactly the element the next step needs, and it matches the existing story.

Generated by Coder Agents on behalf of @jeremyruppel.

…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.
@jeremyruppel
jeremyruppel temporarily deployed to main November 9, 2026 15:18 — with GitHub Actions Inactive
@jeremyruppel
jeremyruppel temporarily deployed to main November 9, 2026 15:18 — with GitHub Actions Inactive
@jeremyruppel
jeremyruppel marked this pull request as ready for review November 9, 2026 15:19
@jeremyruppel
jeremyruppel temporarily deployed to main November 9, 2026 15:19 — with GitHub Actions Inactive
@jeremyruppel
jeremyruppel merged commit 17f6d8f into main Nov 9, 2026
73 of 75 checks passed
@jeremyruppel
jeremyruppel deleted the fix-chart-tooltip-story-race branch November 9, 2026 15:54
@jeremyruppel
jeremyruppel temporarily deployed to main November 9, 2026 15:54 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 9, 2026

This branch was previously deployed

1 inactive deployment
main — 8d25f35a Deployed Nov 9, 2026 by jeremyruppel via cla #252577
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants