Repository navigation
Make Forwarded Ports status bar entry toggle the Ports view - #320092
Closed
Alex Ross (alexr00) with Copilot wants to merge 2 commits into
Closed
Alex Ross (alexr00) with Copilot wants to merge 2 commits into
Alex Ross (alexr00) with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: alexr00 <[email protected]>
Copilot
AI
changed the title
[WIP] Add toggle functionality for Forwarded Ports status bar
Make Forwarded Ports status bar entry toggle the Ports view
Jun 5, 2026
Alex Ross (alexr00)
marked this pull request as ready for review
June 5, 2026 12:54
Alex Ross (alexr00)
approved these changes
Jun 5, 2026
Alex Ross (alexr00)
approved these changes
Jun 5, 2026
Alex Ross (alexr00)
enabled auto-merge (squash)
June 5, 2026 12:55
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the Remote Explorer “Forwarded Ports” status bar interaction by making it toggle the Ports view instead of only focusing it, aligning behavior with other toggleable views in the workbench.
Changes:
- Adds a new command
${TUNNEL_VIEW_ID}.togglethat closes the Ports view if it’s visible, otherwise opens and focuses it. - Updates the “Forwarded Ports” status bar entry to invoke the new toggle command instead of
${TUNNEL_VIEW_ID}.focus.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/remote/browser/remoteExplorer.ts | Registers a new Ports-view toggle command and wires the forwarded-ports status bar entry to use it. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
Comment on lines
+47
to
+54
| CommandsRegistry.registerCommand(TOGGLE_PORTS_VIEW_ACTION_ID, async (accessor) => { | ||
| const viewsService = accessor.get(IViewsService); | ||
| if (viewsService.isViewVisible(TUNNEL_VIEW_ID)) { | ||
| viewsService.closeView(TUNNEL_VIEW_ID); | ||
| } else { | ||
| viewsService.openView(TUNNEL_VIEW_ID, true); | ||
| } | ||
| }); |
roblourens
approved these changes
Jun 5, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Clicking the
Forwarded Portsstatus bar entry opens the PORTS panel but a second click does nothing. This makes it toggle.<TUNNEL_VIEW_ID>.toggleinremoteExplorer.ts: closes the Ports view if visible, otherwise opens and focuses it (mirrors theworkbench.actions.view.toggleProblemspattern).<TUNNEL_VIEW_ID>.focus.