Skip to content

fix(components): fix annotation symbol check in MutationWithPerMutationInfoOverride story - #1132

Merged
fhennig merged 2 commits into
mainfrom
fix/mutation-annotation-story-symbol-check
Aug 26, 2026
Merged

fix(components): fix annotation symbol check in MutationWithPerMutationInfoOverride story#1132
fhennig merged 2 commits into
mainfrom
fix/mutation-annotation-story-symbol-check

Conversation

@fhennig

@fhennig fhennig commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

The play function reused getAnnotationIndicator() which always queries for the '*' symbol, but this story uses 'c'. The check always failed because '*' was never in the DOM.

regression in bccd701

…onInfoOverride story

The play function reused getAnnotationIndicator() which always queries for
the '*' symbol, but this story uses 'c'. The check always failed because
'*' was never in the DOM.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard-components Ready Ready Preview Aug 26, 2026 7:50am

Request Review

@fhennig

fhennig commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Now it looks like other tests are flaky?

@fhennig
fhennig marked this pull request as ready for review August 26, 2026 07:20
@fhennig

fhennig commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Weird, now there are other tests that seem to fail/be flaky. I've asked Claude again.

…GrowthAdvantage story

The story was relying on the real network call to cov-spectrum.org
returning a non-ok response, making the test flaky in CI. Add an
explicit 422 mock so the NotEnoughDataToComputeFitError path is
triggered deterministically.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@fhennig

fhennig commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

Ok, added a mock response, the endpoint was throwing with 500 - not enough data. IMO the mock response here is a good way to fix that.

@fhennig
fhennig requested review from fengelniederhammer and a lite review from Copilot August 26, 2026 08:23
@fhennig fhennig self-assigned this Aug 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes Storybook interaction tests by aligning story assertions and fetch mocks with the actual rendered annotation symbol / network behavior, preventing a regression where the play function looked for an annotation indicator that never appeared.

Changes:

  • Updates MutationWithPerMutationInfoOverride story play function to assert against the correct annotation symbol (c) instead of reusing a helper hardcoded to *.
  • Adds a missing fetch mock for the chen2021Fitness POST request in the “TooFewDataToComputeGrowthAdvantage” story so the “not enough data” path is exercised deterministically.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
components/src/preact/relativeGrowthAdvantage/relative-growth-advantage.stories.tsx Adds a missing computed-model fetch mock to support the “too few data” error scenario reliably.
components/src/preact/components/annotated-mutation.stories.tsx Fixes the story’s play-function assertion to check for the actual annotation symbol used by that story.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread components/src/preact/components/annotated-mutation.stories.tsx
@fhennig
fhennig merged commit be308ee into main Aug 26, 2026
7 checks passed
@fhennig
fhennig deleted the fix/mutation-annotation-story-symbol-check branch August 26, 2026 10:14
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.

3 participants