Don't give up on popstate event too quickly - #2485
Conversation
Occasionally, in dev, popstate can take more than 100ms to return, such as when a dialog change ends up loading new code that Vite hasn't compiled yet (which happens synchronously while the await is still waiting to be fulfilled). A 500ms timeout should be enough for most situations, while still being short enough not to be annoying to wait for if it is reporting an actual error.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing, because I found something I like a bit more that is also not a huge change. It's currently weird how we decide if we need to wait for a popstate event. It'd be cleaner if we triggered and waited for it in exactly the same place. I'm going to refactor to that. Then I feel comfortable increasing the timeout to at least 500ms. |
Occasionally, in dev, popstate can take more than 100ms to return, such as when a dialog change ends up loading new code that Vite hasn't compiled yet (which happens synchronously while the await is still waiting to be fulfilled). A 500ms timeout should be enough for most situations, while still being short enough not to be annoying to wait for if it is reporting an actual error.
Fixes #2480.