Skip to content

Make Forwarded Ports status bar entry toggle the Ports view - #320092

Closed
Alex Ross (alexr00) with Copilot wants to merge 2 commits into
mainfrom
copilot/make-forwarded-ports-toggleable
Closed

Alex Ross (alexr00) with Copilot wants to merge 2 commits into
mainfrom
copilot/make-forwarded-ports-toggleable

Conversation

Copilot AI commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

Clicking the Forwarded Ports status bar entry opens the PORTS panel but a second click does nothing. This makes it toggle.

  • New command <TUNNEL_VIEW_ID>.toggle in remoteExplorer.ts: closes the Ports view if visible, otherwise opens and focuses it (mirrors the workbench.actions.view.toggleProblems pattern).
  • Status bar entry now invokes the toggle command instead of <TUNNEL_VIEW_ID>.focus.
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);
    }
});

Copilot AI requested review from Copilot and removed request for Copilot June 5, 2026 12:35
Copilot AI linked an issue Jun 5, 2026 that may be closed by this pull request
Copilot AI requested review from Copilot and removed request for Copilot June 5, 2026 12:42
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
Copilot AI requested a review from Alex Ross (alexr00) June 5, 2026 12:42
@alexr00
Alex Ross (alexr00) marked this pull request as ready for review June 5, 2026 12:54
Copilot AI review requested due to automatic review settings June 5, 2026 12:54
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) June 5, 2026 12:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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}.toggle that 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);
}
});
auto-merge was automatically disabled July 24, 2026 13:36

Pull request was closed

@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Oct 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make status bar Forwarded Ports toggleable

4 participants