Skip to content

Add GHCP fix action for publish dialog errors#21455

Merged
caohai merged 2 commits into
mainfrom
hacao/ghcp-fix-button
Mar 5, 2026
Merged

Add GHCP fix action for publish dialog errors#21455
caohai merged 2 commits into
mainfrom
hacao/ghcp-fix-button

Conversation

@caohai
Copy link
Copy Markdown
Member

@caohai caohai commented Mar 5, 2026

Description

Adds a GHCP-assisted recovery path in Schema Designer publish flow.

  • Shows “Ask GitHub Copilot to Fix” in publish dialog error states (ReportError, PublishError).
  • Sends a prompt override to mssql.openCopilotChatFromUi with current error details.
image Screenshot 2026-03-04 at 5 50 10 PM

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

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 GitHub Copilot Chat recovery path from Schema Designer’s publish dialog when publish/report errors occur, by surfacing an “Ask GitHub Copilot to Fix” action and passing error context as a prompt override into the existing mssql.openCopilotChatFromUi command.

Changes:

  • Adds a new publish-dialog error-state button that opens Copilot Chat with a generated prompt containing the current error details.
  • Extends CopilotChat.OpenFromUiArgs / openCopilotChatFromUi to accept an optional prompt override.
  • Adds unit tests for the new prompt-building helpers, button behavior, and main controller prompt override handling.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
localization/xliff/vscode-mssql.xlf Adds new localizable strings for the new publish-dialog Copilot action + tooltip
extensions/mssql/l10n/bundle.l10n.json Adds runtime l10n entries for the new UI strings
extensions/mssql/src/reactviews/common/locConstants.ts Exposes new Schema Designer localized strings
extensions/mssql/src/reactviews/pages/SchemaDesigner/toolbar/publishChangesDialogButton.tsx Adds visibility logic + button to open Copilot Chat with error-context prompt
extensions/mssql/src/reactviews/pages/SchemaDesigner/toolbar/publishChangesDialogPrompts.ts Introduces prompt template + labels/fallback text for error-context prompt
extensions/mssql/src/sharedInterfaces/copilotChat.ts Extends EntryPoint and adds optional prompt to OpenFromUiArgs
extensions/mssql/src/controllers/mainController.ts Uses prompt override (when provided) when opening Copilot Chat
extensions/mssql/test/unit/publishChangesDialogButton.test.ts Adds unit coverage for helpers + the new button click behavior
extensions/mssql/test/unit/mainController.test.ts Adds unit coverage for prompt override behavior

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

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

github-actions Bot commented Mar 5, 2026

PR Changes

Category Target Branch PR Branch Difference
vscode-mssql VSIX 6391 KB 6390 KB ⚪ -1 KB ( 0% )
sql-database-projects VSIX 7024 KB 7024 KB ⚪ 0 KB ( 0% )
data-workspace VSIX 535 KB 535 KB ⚪ 0 KB ( 0% )

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.46%. Comparing base (45f5fe6) to head (d5b0813).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21455      +/-   ##
==========================================
- Coverage   72.84%   72.46%   -0.39%     
==========================================
  Files         325      330       +5     
  Lines       96454    97758    +1304     
  Branches     5411     5427      +16     
==========================================
+ Hits        70262    70839     +577     
- Misses      26192    26919     +727     
Files with missing lines Coverage Δ
extensions/mssql/src/controllers/mainController.ts 30.36% <100.00%> (+0.04%) ⬆️
...nsions/mssql/src/reactviews/common/locConstants.ts 25.17% <100.00%> (+0.40%) ⬆️
...emaDesigner/toolbar/publishChangesDialogButton.tsx 54.77% <100.00%> (ø)
...emaDesigner/toolbar/publishChangesDialogPrompts.ts 100.00% <100.00%> (ø)
...tensions/mssql/src/sharedInterfaces/copilotChat.ts 100.00% <100.00%> (ø)

... and 3 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.

@caohai caohai merged commit a9e8034 into main Mar 5, 2026
3 checks passed
@caohai caohai deleted the hacao/ghcp-fix-button branch March 5, 2026 17:21
@caohai caohai linked an issue Mar 5, 2026 that may be closed by this pull request
17 tasks
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]: Copilot publish validation errors & 'fix error' button

4 participants