Add Simple Browser option for dashboard launch#15896
Add Simple Browser option for dashboard launch#15896adamint wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Add 'simpleBrowser' as a new dashboard browser option that opens the Aspire Dashboard in VS Code's built-in Simple Browser tab. This is now the default value for aspire.dashboardBrowser. Auto-closing the Simple Browser tab on debug end is tracked separately in microsoft#15895, blocked on VS Code exposing proper TabInput types for Simple Browser. Fixes microsoft#14942
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15896Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15896" |
There was a problem hiding this comment.
Pull request overview
Adds a new simpleBrowser option for aspire.dashboardBrowser so the Aspire Dashboard can be opened inside VS Code’s built-in Simple Browser, and updates localization/configuration to support it.
Changes:
- Add
simpleBrowserto theDashboardBrowserTypeunion and handle it inopenDashboard()viasimpleBrowser.show. - Update the
aspire.dashboardBrowsersetting enum and change its default tosimpleBrowser. - Add/update localized strings for the new setting value in NLS/XLF files.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| extension/src/debugger/AspireDebugSession.ts | Adds simpleBrowser browser type and opens dashboard via simpleBrowser.show. |
| extension/package.json | Adds simpleBrowser to setting enum and makes it the contributed default. |
| extension/package.nls.json | Adds localized enum description for the new simpleBrowser option. |
| extension/loc/xlf/aspire-vscode.xlf | Adds XLF entries for the new configuration enum description (and other updated strings). |
Comments suppressed due to low confidence (1)
extension/package.json:695
- The configuration schema default is now
simpleBrowser, but runtime code still uses a hard-coded fallback of'openExternalBrowser'when readingaspire.dashboardBrowser(seeextension/src/server/interactionService.tswhereget('dashboardBrowser', 'openExternalBrowser')is used). This means users who haven’t set the setting will still get external browser launches, so the new default won’t take effect. Consider removing the explicit fallback or updating it tosimpleBrowserso the contributed default is honored.
"aspire.dashboardBrowser": {
"type": "string",
"enum": [
"openExternalBrowser",
"simpleBrowser",
"debugChrome",
"debugEdge",
"debugFirefox"
],
"default": "simpleBrowser",
"description": "%configuration.aspire.dashboardBrowser%",
"enumDescriptions": [
"%configuration.aspire.dashboardBrowser.openExternalBrowser%",
"%configuration.aspire.dashboardBrowser.simpleBrowser%",
"%configuration.aspire.dashboardBrowser.debugChrome%",
"%configuration.aspire.dashboardBrowser.debugEdge%",
"%configuration.aspire.dashboardBrowser.debugFirefox%"
],
| "configuration.aspire.enableAspireDashboardAutoLaunch.off": "Do nothing — the dashboard URL is still printed in the terminal.", | ||
| "configuration.aspire.dashboardBrowser": "The browser to use when auto-launching the Aspire Dashboard.", | ||
| "configuration.aspire.dashboardBrowser.openExternalBrowser": "Use the system default browser (cannot auto-close).", | ||
| "configuration.aspire.dashboardBrowser.simpleBrowser": "Open in VS Code's built-in Simple Browser tab (does not auto-close).", |
There was a problem hiding this comment.
What do other extensions call opening a website inside VS? Do they call it Simple Browser? tbh I've never heard of that so I don't know if its common term amongst extensions.
davidfowl
left a comment
There was a problem hiding this comment.
You can work on the naming, this looks fine.
Description
Adds
simpleBrowseras a newaspire.dashboardBrowseroption that opens the Aspire Dashboard in VS Code's built-in Simple Browser tab, keeping the developer in the IDE. This is now the default value for the setting.The existing options (
openExternalBrowser,debugChrome,debugEdge,debugFirefox) continue to work unchanged.What's NOT included (tracked separately)
Auto-closing the Simple Browser tab when the debug session ends is blocked on VS Code exposing proper
TabInputtypes for Simple Browser tabs (currentlytab.inputisundefined). Tracked in #15895.Closes #14942
Changes
AspireDebugSession.ts: Added'simpleBrowser'toDashboardBrowserTypeunion and a newcase 'simpleBrowser'inopenDashboard()that callssimpleBrowser.showpackage.json: Added"simpleBrowser"to theaspire.dashboardBrowserenum, set as new defaultpackage.nls.json: Added localized description for the new optionaspire-vscode.xlf: Updated XLF with the new localization keyChecklist
simpleBrowsersetting value should be documented