[ Widget Preview ] Add UUID to registered DTD streams and services#180140
Merged
auto-submit[bot] merged 4 commits intoJan 5, 2026
Merged
Conversation
DTD only supports a single instance of a registered service with a given name. For widget preview development, we sometimes want to use a DTD instance that's attached to an IDE to test IDE integration. However, IDEs frequently spawn their own widget preview instances which register services with DTD. In the case where `flutter widget-preview start --dtd-url=<dtd-url>` is run and `dtd-url` points to a DTD instance with another widget preview service running, the process simply crashes. This change adds a unique identifier to the widget preview DTD service and stream names that allows for each `flutter widget-preview start` instance to register its own unique widget preview DTD services, even if other widget preview instances are using the same DTD instance. Fixes flutter#179883
bkonyi
requested review from
DanTup and
jyameo
and removed request for
DanTup
December 19, 2025 20:44
Contributor
There was a problem hiding this comment.
Code Review
This pull request addresses an issue where multiple widget preview instances could not connect to the same DTD instance by introducing unique identifiers (UUIDs) for DTD service and stream names. The changes are well-implemented, including a new flag to disable this behavior for testing purposes. I have one suggestion regarding code organization to improve maintainability.
Contributor
|
autosubmit label was removed for flutter/flutter/180140, because - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
DanTup
approved these changes
Dec 20, 2025
DanTup
left a comment
Contributor
There was a problem hiding this comment.
lgtm!
I am assuming that:
- The IDEs aren't expect to make any changes here
- The UUIDs don't affect anything outside of the widget preview (because these are just its own internal services), so the uuids being enabled by default even by the version spawned by the editor will not affect anyone
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 6, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Jan 7, 2026
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
DTD only supports a single instance of a registered service with a given name. For widget preview development, we sometimes want to use a DTD instance that's attached to an IDE to test IDE integration. However, IDEs frequently spawn their own widget preview instances which register services with DTD. In the case where
flutter widget-preview start --dtd-url=<dtd-url>is run anddtd-urlpoints to a DTD instance with another widget preview service running, the process simply crashes.This change adds a unique identifier to the widget preview DTD service and stream names that allows for each
flutter widget-preview startinstance to register its own unique widget preview DTD services, even if other widget preview instances are using the same DTD instance.Fixes #179883