fix(laboratory): improve initialization timeout handling - #5250
Conversation
- Increased test timeout from 10s to 30s in ModalPage.ts to prevent premature failures in slower CI/CD environments - Added 20s timeout diagnostic message in InitializeBoundary.tsx to help identify stuck initialization issues - Diagnostic message includes timestamp for debugging This addresses the issue where tests fail with "Initializing..." stuck state, particularly in canary tests. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
📦 Bundle Size Check✅ All bundles are within size limits 📊 View detailed bundle sizes> @reown/appkit-monorepo@1.7.1 size /home/runner/work/appkit/appkit > size-limit |
Coverage Report
File CoverageNo changed files found. |
…eBoundary Inverted condition in useEffect to avoid inconsistent return pattern. Now the effect either returns a cleanup function or undefined implicitly, satisfying the ESLint consistent-return rule. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Visual Regression Test Results ❌ FailedChromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=476 👉 Please review the visual changes in Chromatic and accept or reject them. |
| Initializing... | ||
| {hasTimedOut && ( | ||
| <div style={{ marginTop: '10px', fontSize: '12px', color: '#888' }}> | ||
| Still initializing after 20s (started: {new Date().toISOString()}) |
There was a problem hiding this comment.
Bug: Startup timestamp misleads by using current time instead of start time
The timestamp displays the current time when the diagnostic message renders, not when initialization actually started. The label says "started:" but new Date().toISOString() creates a fresh timestamp approximately 20 seconds after initialization began, making it misleading for debugging stuck initialization issues.
| } | ||
|
|
||
| return undefined | ||
| }, [isInitialized]) |
There was a problem hiding this comment.
Bug: Timeout flag leaks across reinitializations
The hasTimedOut state is never reset when isInitialized transitions from false to true or back to false. If initialization completes and later resets (e.g., reconnection), the diagnostic message appears immediately instead of after 20 seconds because hasTimedOut remains true from the previous initialization attempt.
This addresses the issue where tests fail with "Initializing..." stuck state, particularly in canary tests.
🤖 Generated with Claude Code
Description
Should improve failing tests like https://reown-inc.slack.com/archives/C09FN4W5CHJ/p1760844979492769?thread_ts=1760800590.498999&cid=C09FN4W5CHJ
Type of change
Checklist
Note
Adds a 20s timeout in
InitializeBoundaryto display a diagnostic message with timestamp if initialization is slow.apps/laboratory/src/components/InitializeBoundary.tsx:hasTimedOutstate anduseEffecttimer (20s) to detect prolonged initialization.Written by Cursor Bugbot for commit 68ced57. This will update automatically on new commits. Configure here.