Skip to content

Add disconnect button next to edit button in Object Explorer connection panel #19927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 9, 2025

This PR adds a disconnect button inline next to the edit button for connection nodes in the Object Explorer panel, matching the behavior available in Azure Data Studio.

Problem

Currently in VS Code MSSQL extension, connected servers only show an edit button inline in the Object Explorer. Users have to right-click to access the disconnect option, which is less convenient than the Azure Data Studio experience where both edit and disconnect buttons are visible inline.

Before (VS Code):

  • Only edit button (pencil icon) visible inline
  • Disconnect only available via right-click context menu

After (matches Azure Data Studio):

  • Edit button (pencil icon) appears first
  • Disconnect button (debug-disconnect icon) appears second inline
  • Both buttons easily accessible without right-clicking

Implementation

The changes leverage existing functionality and commands:

  1. Added inline menu configuration for mssql.disconnectObjectExplorerNode command
  2. Enhanced command definition with $(debug-disconnect) icon for proper inline display
  3. Set appropriate group priorities to ensure correct button ordering

The disconnect functionality already existed and was fully implemented - this change simply makes it more accessible by adding it to the inline action buttons alongside the existing edit button.

Technical Details

  • Uses existing mssql.disconnectObjectExplorerNode command (no new functionality required)
  • Follows established patterns for inline menu items in the codebase
  • Maintains all existing context menu functionality
  • Only appears for connected servers (type=Server viewItem context)

Fixes #19781.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: node ./out/test/unit/runTest.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] [Feature Request]: Add disconnect button next to edit button on row in the connection panel Add disconnect button next to edit button in Object Explorer connection panel Aug 9, 2025
@Copilot Copilot AI requested a review from aasimkhan30 August 9, 2025 04:46
Copilot finished work on behalf of aasimkhan30 August 9, 2025 04:46
@aasimkhan30 aasimkhan30 marked this pull request as ready for review August 19, 2025 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]: Add disconnect button next to edit button on row in the connection panel
2 participants