Skip to content

Add mssql_dab show flow and improve tool descripiton#21511

Merged
caohai merged 5 commits into
mainfrom
hacao/dab-show-open-ui
Mar 7, 2026
Merged

Add mssql_dab show flow and improve tool descripiton#21511
caohai merged 5 commits into
mainfrom
hacao/dab-show-open-ui

Conversation

@caohai
Copy link
Copy Markdown
Member

@caohai caohai commented Mar 6, 2026

Description

Adds a show operation to mssql_dab so Copilot can open the Data API Builder tab for a connection, and aligns the DAB tool contract with the existing schema-designer pattern.

  • Adds mssql_dab.show and wired it to open the DAB tab from a connectionId
  • Aligned the DAB manifest/tool description with schema-designer and made enabledActions the canonical DAB change field

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

aasimkhan30
aasimkhan30 previously approved these changes Mar 6, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a show flow to the mssql_dab Copilot tool so it can open the Data API Builder (DAB) view for a specified connection, and aligns the tool contract/schema with the schema-designer tool pattern.

Changes:

  • Added mssql_dab.show operation (opens DAB view from a provided connectionId) and wired it through MainController.
  • Updated DAB tool contract/schema + internal change shape (actionsenabledActions) and adjusted handler validation accordingly.
  • Added/updated localization strings and unit tests to cover the new behavior and updated schema expectations.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
localization/xliff/vscode-mssql.xlf Adds new trans-units for DAB tool messaging (show success + error guidance).
extensions/mssql/l10n/bundle.l10n.json Adds corresponding VS Code l10n bundle entries for new DAB strings.
extensions/mssql/src/constants/locConstants.ts Introduces new localized strings used by mssql_dab show/error paths.
extensions/mssql/src/copilot/tools/dabTool.ts Implements show operation, injects dependencies, and uses localized messages.
extensions/mssql/src/controllers/mainController.ts Registers DabTool with required dependencies and adds openDabDesigner.
extensions/mssql/package.json Updates mssql_dab tool manifest description and input schema (adds show, uses top-level object schema).
extensions/mssql/src/sharedInterfaces/dab.ts Renames DAB change field to enabledActions for set_entity_actions.
extensions/mssql/src/reactviews/pages/SchemaDesigner/schemaDesignerRpcHandlers.ts Updates DAB change application to validate/apply enabledActions; waits for initialization before serving state.
extensions/mssql/src/reactviews/pages/SchemaDesigner/schemaDesignerStateProvider.tsx Exposes isInitializedRef + waitForInitialization on SchemaDesigner context.
extensions/mssql/src/reactviews/pages/SchemaDesigner/dab/dabContext.tsx Passes initialization gating into DAB tool RPC handlers.
extensions/mssql/src/copilot/prompts.ts Clarifies DAB prompt to reference “active schema designer” context.
extensions/mssql/test/unit/dabToolManifest.test.ts Updates tests for new top-level schema shape and show/enabledActions changes.
extensions/mssql/test/unit/dabTool.test.ts Adds unit coverage for show behavior and updated messages/field names.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread localization/xliff/vscode-mssql.xlf
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 6, 2026

PR Changes

Category Target Branch PR Branch Difference
vscode-mssql VSIX 6402 KB 6402 KB ⚪ 0 KB ( 0% )
sql-database-projects VSIX 7060 KB 7025 KB ⚪ -35 KB ( 0% )
data-workspace VSIX 535 KB 535 KB ⚪ 0 KB ( 0% )

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 98.59155% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.69%. Comparing base (a6faae9) to head (7207ae6).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
...ges/SchemaDesigner/schemaDesignerStateProvider.tsx 50.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21511      +/-   ##
==========================================
+ Coverage   72.54%   72.69%   +0.15%     
==========================================
  Files         330      330              
  Lines       98008    98120     +112     
  Branches     5438     5446       +8     
==========================================
+ Hits        71096    71326     +230     
+ Misses      26912    26794     -118     
Files with missing lines Coverage Δ
extensions/mssql/src/constants/locConstants.ts 75.97% <100.00%> (+0.10%) ⬆️
extensions/mssql/src/controllers/mainController.ts 34.16% <100.00%> (+3.63%) ⬆️
extensions/mssql/src/copilot/prompts.ts 100.00% <100.00%> (ø)
extensions/mssql/src/copilot/tools/dabTool.ts 99.06% <100.00%> (+0.14%) ⬆️
.../pages/SchemaDesigner/schemaDesignerRpcHandlers.ts 83.17% <100.00%> (+0.87%) ⬆️
extensions/mssql/src/sharedInterfaces/dab.ts 97.59% <100.00%> (ø)
...ges/SchemaDesigner/schemaDesignerStateProvider.tsx 16.52% <50.00%> (+0.22%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI review requested due to automatic review settings March 6, 2026 23:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@caohai caohai linked an issue Mar 7, 2026 that may be closed by this pull request
10 tasks
@caohai caohai removed a link to an issue Mar 7, 2026
10 tasks
@caohai caohai linked an issue Mar 7, 2026 that may be closed by this pull request
17 tasks
@caohai caohai merged commit 942122c into main Mar 7, 2026
7 checks passed
@caohai caohai deleted the hacao/dab-show-open-ui branch March 7, 2026 02:16
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]: Open Data API Builder Designer directly from GitHub Copilot chat

4 participants