Fix Object Explorer filter icon missing for single database connections #20035
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.
The Object Explorer filter icon was not appearing when connecting to a single database (as opposed to an entire server) with schema grouping enabled. This issue occurred because the filter icon visibility depends on the
filterable
property in the tree node's context value, which was only set totrue
when the SQL Tools Service providedfilterableProperties
. However, the SQL Tools Service doesn't sendfilterableProperties
for single database connections, causing the filter icon to be hidden.Root Cause
filterable
property in tree node contextnodeInfo.filterableProperties?.length > 0
filterableProperties
for single database connectionsfilterable: false
and hid the filter iconSolution
Modified
ConnectionNode.updateToConnectedState()
to ensure database connections are always marked as filterable:This change:
filterableProperties
Testing
Added comprehensive unit tests covering:
Fixes #20024.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
update.code.visualstudio.com
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:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.