Skip to content

Fix operator precedence in OE context menu when clauses for Database/DockerContainerDatabase nodes#21504

Merged
Benjin merged 2 commits into
dev/benjin/contextMenufrom
copilot/sub-pr-21502
Mar 6, 2026
Merged

Fix operator precedence in OE context menu when clauses for Database/DockerContainerDatabase nodes#21504
Benjin merged 2 commits into
dev/benjin/contextMenufrom
copilot/sub-pr-21502

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

Description

Three when clauses in package.json mixed && and || without parentheses, causing view == objectExplorer to only gate the first branch of the OR — the subType branch was visible outside Object Explorer.

Affected commands: mssql.searchDatabase, mssql.restoreDatabase, mssql.flatFileImport

Before:

"when": "view == objectExplorer && viewItem =~ /\\btype=(Database)\\b/ || viewItem =~ /\\bsubType=(Database|DockerContainerDatabase)\\b/"

After:

"when": "view == objectExplorer && (viewItem =~ /\\btype=(Database)\\b/ || viewItem =~ /\\bsubType=(Database|DockerContainerDatabase)\\b/)"

Code Changes Checklist

  • New or updated unit tests added
  • All existing tests pass (npm run test)
  • Code follows contributing guidelines
  • Telemetry/logging updated if relevant
  • No regressions or UX breakage

Reviewers: Please read our reviewer guidelines


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…ase nodes

Co-authored-by: Benjin <1609827+Benjin@users.noreply.github.com>
Copilot AI changed the title [WIP] WIP addressing feedback on OE context menu organization Fix operator precedence in OE context menu when clauses for Database/DockerContainerDatabase nodes Mar 6, 2026
@Benjin Benjin marked this pull request as ready for review March 6, 2026 21:35
@Benjin Benjin merged commit 8ba259b into dev/benjin/contextMenu Mar 6, 2026
1 check passed
@Benjin Benjin deleted the copilot/sub-pr-21502 branch March 6, 2026 21:35
Benjin added a commit that referenced this pull request Mar 7, 2026
* Menu updates

* Loc

* Removing backup from server (not valid entrypoint)

* Loc

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix operator precedence in OE context menu `when` clauses for Database/DockerContainerDatabase nodes (#21504)

* Initial plan

* Fix when clause operator precedence for Database/DockerContainerDatabase nodes

Co-authored-by: Benjin <1609827+Benjin@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Benjin <1609827+Benjin@users.noreply.github.com>

* Updating labels

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
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.

2 participants