Skip to content

Don't give up on popstate event too quickly - #2485

Closed
rmunn wants to merge 1 commit into
developfrom
bug/popstate-await-giving-up-too-soon
Closed

Don't give up on popstate event too quickly#2485
rmunn wants to merge 1 commit into
developfrom
bug/popstate-await-giving-up-too-soon

Conversation

@rmunn

@rmunn rmunn commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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.

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.
@rmunn rmunn self-assigned this Jul 24, 2026
@github-actions github-actions Bot added the 💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related label Jul 24, 2026
@argos-ci

argos-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Jul 24, 2026, 7:48 AM
e2e (Inspect) ✅ No changes detected - Jul 24, 2026, 7:55 AM

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@rmunn, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f22e9c9-65b6-4e8f-964a-52d24ea20285

📥 Commits

Reviewing files that changed from the base of the PR and between 1b8927e and 7eec69b.

📒 Files selected for processing (1)
  • frontend/viewer/src/lib/utils/history.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bug/popstate-await-giving-up-too-soon

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rmunn
rmunn requested a review from myieye July 24, 2026 07:58
@myieye

myieye commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

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.

@myieye myieye closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FW Lite issues related to the fw lite application, not miniLcm or crdt related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Intermittent "Timed out waiting for popstate event"

3 participants