Skip to content

Conversation

@allancascante
Copy link
Contributor

Description

This PR addresses critical bug fixes identified during code review and implements a feature flag to gate the Data-tier Application dialog behind experimental features. This allows for controlled rollout and user opt-in while ensuring stability of the core extension.

Changes in this PR:

  • Feature Flag Implementation: This allows users to opt into the feature while ensuring it doesn't impact users who prefer stability over new features.
    Enable the Feature:

{    "mssql.enableExperimentalFeatures": true}
After enabling, reload VS Code. The "Data-tier Applications..." menu item will appear in Object Explorer for Server and Database nodes. And the operations for the quick lunch for Data-tier will be available also.

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
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

This PR enhances the DACPAC/BACPAC dialog functionality by implementing experimental feature gating, improving user experience with application version validation and success notifications, and updating terminology from "Deploy" to "Publish" for consistency.

  • Implements experimental feature flag to conditionally register and display DACPAC/BACPAC commands
  • Adds application version format validation (n.n.n or n.n.n.n) for Extract operations
  • Introduces success notifications with "Reveal in Explorer" actions for Extract/Export operations

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/controllers/mainController.ts Conditionally registers DACPAC commands based on experimental features flag and sets VS Code context for menu visibility
src/controllers/dacpacDialogWebviewController.ts Adds success notifications for all operations, filters system databases from listings, and updates terminology in comments
src/reactviews/pages/DacpacDialog/dacpacDialogForm.tsx Implements application version validation, reorders UI sections for better UX, and adds Learn More link
src/reactviews/pages/DacpacDialog/ApplicationInfoSection.tsx Adds validation support with error display for application version field
src/reactviews/common/locConstants.ts Updates terminology from "Deploy DACPAC" to "Publish DACPAC" and adds validation message
src/constants/locConstants.ts Adds new localized success messages and validation error message
package.json Updates menu visibility condition to include experimental features check
test/unit/mainController.test.ts Updates tests to handle conditional command registration based on experimental features
test/unit/dacpacDialogWebviewController.test.ts Updates test descriptions to use "Publish" terminology and adds stub for notification messages
localization/xliff/vscode-mssql.xlf Updates localization entries for terminology changes and new messages
localization/l10n/bundle.l10n.json Updates localization bundle with new and updated strings

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

"Database not found on the server": "Database not found on the server",
"Validation failed. Please check your inputs": "Validation failed. Please check your inputs",
"Files": "Files",
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)": "Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)",
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

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

There are two different validation messages for application version format in this localization bundle. Line 855 correctly describes the validation logic allowing "n.n.n or n.n.n.n", while line 1990 only mentions "n.n.n.n". This creates inconsistency in error messages. Only one message should be used, and it should match the validation logic that accepts both 3 and 4 part versions.

Suggested change
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)": "Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)",
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)": "Application version must be in format n.n.n or n.n.n.n where n is a number (e.g., 1.0.0 or 1.0.0.0)",

Copilot uses AI. Check for mistakes.
};

/**
* Validates application version format (n.n.n.n where n is a number)
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

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

The comment incorrectly states "n.n.n.n format" when the regex below (line 385) actually allows both 3-part and 4-part version formats (e.g., "1.0.0" or "1.0.0.0"). Update the comment to: "Validates application version format (n.n.n or n.n.n.n where n is a number)"

Suggested change
* Validates application version format (n.n.n.n where n is a number)
* Validates application version format (n.n.n or n.n.n.n where n is a number)

Copilot uses AI. Check for mistakes.
public static Save = l10n.t("Save");
public static Files = l10n.t("Files");
public static InvalidApplicationVersion = l10n.t(
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)",
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

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

The validation message format is inconsistent with the actual validation logic. The regex on line 385 accepts both n.n.n and n.n.n.n formats (3 or 4 parts), but this error message only mentions n.n.n.n. This should be updated to match the frontend version: "Application version must be in format n.n.n or n.n.n.n where n is a number (e.g., 1.0.0.0)"

Suggested change
"Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)",
"Application version must be in format n.n.n or n.n.n.n where n is a number (e.g., 1.0.0.0)",

Copilot uses AI. Check for mistakes.
Comment on lines +231 to +233
<trans-unit id="++CODE++70e9cc5a50f7eb5ba95c18dffd367c22caeef8814be8188d6af4f5654a8fc728">
<source xml:lang="en">Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)</source>
</trans-unit>
Copy link

Copilot AI Nov 8, 2025

Choose a reason for hiding this comment

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

There are two different validation messages for application version format with different IDs (lines 228-230 and 231-233). The first one correctly describes the validation logic allowing "n.n.n or n.n.n.n", while the second only mentions "n.n.n.n". This creates inconsistency in error messages. Only one message should be used, and it should match the validation logic that accepts both 3 and 4 part versions.

Suggested change
<trans-unit id="++CODE++70e9cc5a50f7eb5ba95c18dffd367c22caeef8814be8188d6af4f5654a8fc728">
<source xml:lang="en">Application version must be in format n.n.n.n where n is a number (e.g., 1.0.0.0)</source>
</trans-unit>

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Nov 8, 2025

PR Changes

Category Target Branch PR Branch Difference
Code Coverage 59.62% 59.62% ⚪ 0.00%
VSIX Size 5233 KB 5234 KB ⚪ 1 KB ( 0% )
Webview Bundle Size 5252 KB 5252 KB ⚪ 0 KB ( 0% )

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 67.64706% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.60%. Comparing base (609dc9a) to head (39ba016).

Files with missing lines Patch % Lines
src/controllers/mainController.ts 0.00% 7 Missing ⚠️
src/controllers/dacpacDialogWebviewController.ts 76.47% 4 Missing ⚠️

❌ Your patch status has failed because the patch coverage (67.64%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #20505   +/-   ##
=======================================
  Coverage   57.59%   57.60%           
=======================================
  Files         207      207           
  Lines       18798    18826   +28     
  Branches     1175     1178    +3     
=======================================
+ Hits        10827    10845   +18     
- Misses       7971     7981   +10     
Files with missing lines Coverage Δ
src/constants/locConstants.ts 83.26% <100.00%> (+0.18%) ⬆️
src/controllers/dacpacDialogWebviewController.ts 91.40% <76.47%> (-0.96%) ⬇️
src/controllers/mainController.ts 16.86% <0.00%> (-0.41%) ⬇️
🚀 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants