Skip to content

Show option to open widget preview in separate browser in the case of embedded error#8701

Merged
auto-submit[bot] merged 4 commits into
flutter:mainfrom
helin24:widget-preview-error
Jan 8, 2026
Merged

Show option to open widget preview in separate browser in the case of embedded error#8701
auto-submit[bot] merged 4 commits into
flutter:mainfrom
helin24:widget-preview-error

Conversation

@helin24
Copy link
Copy Markdown
Member

@helin24 helin24 commented Jan 8, 2026

Fixes #8605 by showing an error panel in the case that the embedded browser cannot be found / loaded. To test, make sure the widget preview can open in the normal case, then replace FlutterUtils.embeddedBrowser(project) with null to test the error case.

I will be making a separate PR to fix another issue where the widget preview panel seems to render multiple times.

CC @bkonyi

@helin24 helin24 requested review from jwren and pq January 8, 2026 16:50
@helin24 helin24 changed the title Widget preview error Show option to open widget preview in separate browser in the case of embedded error Jan 8, 2026
@helin24 helin24 added the autosubmit When this label is applied to a PR, the PR will be submitted as soon as all checks are green. label Jan 8, 2026
@auto-submit auto-submit Bot merged commit 5be69be into flutter:main Jan 8, 2026
8 checks passed
@helin24 helin24 deleted the widget-preview-error branch January 8, 2026 18:11
jwren pushed a commit that referenced this pull request Jan 8, 2026
Follow up to #8701

The widget preview was loading multiple times because the `whenComplete`
listener was being added for each line from the widget preview server
output.

To verify this is working, check `dash.log` and ensure that this only
appears once, not multiple times:
```
2026-01-08 08:44:28 io.flutter.widgetpreview.WidgetPreviewPanel [INFO   ] Widget preview URL received: http://localhost:62494  
2026-01-08 08:44:28 io.flutter.widgetpreview.WidgetPreviewPanel [INFO   ] Embedded browser is available: true  
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit When this label is applied to a PR, the PR will be submitted as soon as all checks are green.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Offer to open widget previewer in browser if error

3 participants