GeezerVison is showing github.com — test(storybook): skip app-chunk warm-up in story tests by Storypapst · Pull Request #1983 · OpenResilienceInitiative/ORISO-Frontend
Conversation
Storypapst
commented
Nov 1, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
The consent stories in RegistrationFlowSurface.stories.tsx fail intermittently (CI run 41296768319, PR #1976). On the last step, Registration warms the authenticated app when the browser is idle. In story tests that evaluates hundreds of unbundled modules, which blocks the page for 0.7–2.7 s. A story's findByRole('region', { name: 'Datenschutz' }) or its 15 s timeout runs out during that block.
Change
- Add
.storybook/noChunkWarming.ts: a spy-mode vi.mock that replaces only warmAppChunks and warmClosingDestination. This mirrors src/test/noChunkWarming.ts.
- Import it from
.storybook/vitest.setup.ts, before any product module loads.
- No story or product code changes, and no assertion is loosened.
Verification
- Red: unchanged story file, 10 runs of
npx vitest run --project storybook src/components/registration/RegistrationFlowSurface.stories.tsx → 4 failed. Instrumented runs showed 0.7–2.7 s main-thread blocks inside the region wait.
- Green: the same command, 12 runs with the fix → 11 passed, 0 story failures. The other run lost its browser connection under machine load average 28 (
VITEST_BROWSER_CONNECTION_CLOSED).
npx prettier --check on both changed files passed.
npx tsc --noEmit reported no errors in the changed files.
Closes #1982
Part of OpenResilienceInitiative/ORISO-Admin#1269.
https://claude.ai/code/session_012oHuLwgsF18sXNLUVhMCvk
Generated by Claude Code
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The last registration step warms the authenticated app when the browser
is idle (warmAppChunks, Registration.tsx:410). In the story tests that
import()s hundreds of unbundled modules, including the
@mui/icons-material barrel, whose evaluation blocks the page for 1-3 s.
It runs once per document, so it lands in whichever later story is
active: the consent stories' findByRole('region', Datenschutz) runs past
its 1000 ms default, or the story hits the 15 s test timeout.
Mirror src/test/noChunkWarming.ts for the storybook project: a spy-mode
mock replaces only warmAppChunks and warmClosingDestination. Every other
export, including the lazy-screen loaders, stays real. No story
assertion changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012oHuLwgsF18sXNLUVhMCvk
coderabbitai
Bot
commented
Nov 1, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Warning
Review limit reached
Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.
Next included review available in 27 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available. Your 107 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.
Learn how review limits work.
Review configuration:
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 2aaa43b and 11d3ee8.
Files ignored due to path filters: 1
-
vitest.config.mts is excluded by none and included by none
Files selected for processing: 1
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
CI note on 2aaa43b: the unit job, lint, type-check, build and test frontend, failed on an unhandled ReferenceError: document is not defined. It comes from lottie-web's readiness timer, the known issue #1977, and is not caused by this PR. All 15 244 tests passed.
The fix is #1978, which is not merged yet. I ported it here as 11d3ee836; once #1978 is on dev, the ported commit changes nothing.
Generated by Claude Code
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 1, 2026
This was referenced Nov 1, 2026
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
shazia-k
shazia-k approved these changes
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|