Skip to content

Conversation

@iinozemtsev
Copy link
Member

  1. reuse reconnection logic between websockets and sse connections
  2. persist app instance id on the client side

If we treat reloads as parts of an app lifecycle, it seems natural to preserve an app instance id on full reloads, and looks like a session storage is a good fit.

Fixes #2726.

  • Thanks for your contribution! Please replace this text with a description of what this PR is changing or adding and why, list any relevant issues, and review the contribution guidelines below.

  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.

If we treat reloads as parts of an app lifecycle, it seems natural to
preserve an app instance id on full reloads, and looks like a session
storage is a good fit.

Fixes dart-lang#2726.
Copy link
Contributor

@jyameo jyameo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me and addresses the breakpoint flakiness. My main concern is ensuring this doesn't regress multi-browser support or standard stability. Please manually verify that page refreshes, hot restarts, and hot reloads all continue to work as expected. In particular, make sure we can open the app in multiple browsers simultaneously and perform hot reloads on all of them without any interference or connection collisions. Since we lack automated tests for the multi-browser scenario, this manual validation is essential.

Thanks @iinozemtsev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dwds does not block main execution on page reload

2 participants