test(storybook): wait for context menu to settle - #4889
Merged
Astro-Han merged 1 commit intoSep 6, 2026
Conversation
The loading-catalog context menu updates asynchronously when switching from an existing session to a new task. Wait up to five seconds for the menu to remain visible after activating the loading Skills row, avoiding a race in the Storybook smoke assertion. Generated-by: OpenAI Codex
liugddx
force-pushed
the
fix/storybook-context-menu-visibility
branch
from
September 6, 2026 03:55
783babc to
92c7a46
Compare
Astro-Han
approved these changes
Sep 6, 2026
This was referenced Sep 6, 2026
Astro-Han
pushed a commit
that referenced
this pull request
Sep 6, 2026
The Storybook smoke intermittently read the composer's + menu as hidden right after it opened: jest-dom's `toBeVisible` reads the Astryx layer's computed `opacity`, and the layer's entry keyframes use `animation-fill-mode: backwards`, so the value is `0` until the first frame ticks. On a loaded runner the assertion landed inside that window, and `main` failed on `plus-menu-during-skill-refresh` (run 34017497207). #4889 already wrapped the same read in the slash-menu story; this wraps the app-shell sibling and the two `findByRole('listbox')` reads after it in the same `waitFor`. The app-shell harness also held its Skill refresh on a 150ms timer, which a slow runner outlived before the story clicked the row, so the click activated the row for real and closed the menu. The harness now settles on an explicit release the story calls after the busy-row assertions. Story-only change; no product code touched. Generated-by: Claude Code
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 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.
Problem
The Storybook smoke test for switching from an existing session to a new task intermittently asserted that the context menu was visible during its asynchronous loading-catalog update. Hosted smoke failed at
menu.toBeVisible()while the menu was between renders.Fix
Wait for the menu to settle before asserting it remains visible after clicking the loading Skills row. The story behavior and production Composer code are unchanged.
Validation
AI use
Generative tooling contributed substantively to this patch. The commit carries
Generated-by: OpenAI Codex.