Skip to content

Code Analysis: PR2 - Initial Code Analysis dialog setup: React view, state wiring, and controller integration #21270

Merged
ssreerama merged 18 commits intomainfrom
sai/mar/codeAnalysis_mssqlSampleDialog
Feb 23, 2026
Merged

Code Analysis: PR2 - Initial Code Analysis dialog setup: React view, state wiring, and controller integration #21270
ssreerama merged 18 commits intomainfrom
sai/mar/codeAnalysis_mssqlSampleDialog

Conversation

@ssreerama
Copy link
Copy Markdown
Contributor

@ssreerama ssreerama commented Feb 19, 2026

Description

This PR Adds:

  • This PR delivers the initial Code Analysis dialog scaffold with a minimal, iterative-first implementation focused on UI and wiring, without backend save/apply behavior.
  • React dialog view structure for Code Analysis configuration.
  • State management setup for loading and rendering rules in the dialog.
  • Webview controller integration to open/initialize the dialog flow.
  • Shared contracts and message flow alignment between controller and webview.
  • Localization hookup for dialog labels/actions.
  • UX consistency alignment with existing dialog/table patterns.
  • Added Icon for the dialog tab and header
  • Added couple of basic tests to validate the dialog

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

image

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

This PR adds the initial scaffold for a Code Analysis configuration dialog in the mssql extension. The implementation follows an iterative-first approach, focusing on UI structure and state wiring without backend save/apply functionality, as stated in the PR description. The dialog allows users to view code analysis rules for SQL database projects with a table-based interface showing rule status, severity, and enabled state.

Changes:

  • Added React-based Code Analysis dialog with table view for displaying SQL code analysis rules
  • Integrated webview controller with telemetry and state management
  • Added localization support for dialog labels and messages
  • Added SVG icons for light and dark themes
  • Registered command handler in mainController and integrated with sql-database-projects extension

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
extensions/mssql/src/codeAnalysis/codeAnalysisWebViewController.ts New controller managing the Code Analysis webview, state, and RPC handlers with placeholder rule loading
extensions/mssql/src/sharedInterfaces/codeAnalysis.ts Type definitions for Code Analysis state, rules, reducers, and provider interface
extensions/mssql/src/reactviews/pages/CodeAnalysis/codeAnalysis.tsx React component implementing the dialog UI with rules table and action buttons
extensions/mssql/src/reactviews/pages/CodeAnalysis/codeAnalysisStateProvider.tsx React context provider for managing Code Analysis state and webview RPC
extensions/mssql/src/reactviews/pages/CodeAnalysis/codeAnalysisSelector.ts Custom hook for selecting Code Analysis state slices
extensions/mssql/src/reactviews/pages/CodeAnalysis/index.tsx Entry point for rendering the Code Analysis page with providers
extensions/mssql/src/reactviews/common/locConstants.ts Added codeAnalysis localization section and common.save string
extensions/mssql/src/constants/locConstants.ts Added CodeAnalysis.Title localization constant
extensions/mssql/src/constants/constants.ts Added command constant and view ID for Code Analysis
extensions/mssql/src/enums.ts Added RuleSeverity enum for code analysis severity levels
extensions/mssql/src/controllers/mainController.ts Registered configureCodeAnalysisSettings command handler
extensions/mssql/src/sharedInterfaces/telemetry.ts Added telemetry actions for Code Analysis dialog events
extensions/mssql/test/unit/codeAnalysisWebViewController.test.ts Basic unit tests for controller initialization and icon paths
extensions/mssql/scripts/bundle-reactviews.js Added codeAnalysis entry point to build configuration
extensions/mssql/media/codeAnalysis_light.svg Light theme icon for Code Analysis dialog
extensions/mssql/media/codeAnalysis_dark.svg Dark theme icon for Code Analysis dialog
localization/xliff/vscode-mssql.xlf Added localization entries for Code Analysis strings
extensions/mssql/l10n/bundle.l10n.json Added/reorganized localization strings including Code Analysis entries

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

Comment thread extensions/mssql/src/reactviews/pages/CodeAnalysis/codeAnalysis.tsx Outdated
Comment thread extensions/mssql/src/reactviews/pages/CodeAnalysis/codeAnalysis.tsx Outdated
Comment thread extensions/mssql/src/sharedInterfaces/codeAnalysis.ts Outdated
Comment thread extensions/mssql/src/reactviews/common/locConstants.ts Outdated
Comment thread extensions/mssql/test/unit/codeAnalysisWebViewController.test.ts
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Feb 19, 2026

PR Changes

Category Target Branch PR Branch Difference
vscode-mssql VSIX 6114 KB 6119 KB ⚪ 5 KB ( 0% )
sql-database-projects VSIX 7027 KB 7027 KB ⚪ 0 KB ( 0% )
data-workspace VSIX 535 KB 535 KB ⚪ 0 KB ( 0% )

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 85.30806% with 31 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.88%. Comparing base (1727a64) to head (02f73b8).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
extensions/mssql/src/controllers/mainController.ts 33.33% 18 Missing ⚠️
...nsions/mssql/src/reactviews/common/locConstants.ts 63.88% 13 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21270      +/-   ##
==========================================
+ Coverage   71.84%   71.88%   +0.04%     
==========================================
  Files         281      283       +2     
  Lines       90090    90333     +243     
  Branches     4648     4651       +3     
==========================================
+ Hits        64722    64934     +212     
- Misses      25368    25399      +31     
Files with missing lines Coverage Δ
.../src/codeAnalysis/codeAnalysisWebViewController.ts 100.00% <100.00%> (ø)
extensions/mssql/src/constants/constants.ts 100.00% <100.00%> (ø)
extensions/mssql/src/constants/locConstants.ts 74.98% <100.00%> (+0.03%) ⬆️
extensions/mssql/src/enums.ts 100.00% <100.00%> (ø)
extensions/mssql/src/sharedInterfaces/telemetry.ts 100.00% <100.00%> (ø)
...nsions/mssql/src/reactviews/common/locConstants.ts 21.74% <63.88%> (+0.65%) ⬆️
extensions/mssql/src/controllers/mainController.ts 29.42% <33.33%> (+0.03%) ⬆️
🚀 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.

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 16 out of 18 changed files in this pull request and generated 3 comments.


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

Comment thread extensions/mssql/src/codeAnalysis/codeAnalysisWebViewController.ts
Comment thread extensions/mssql/test/unit/codeAnalysisWebViewController.test.ts Outdated
Comment thread extensions/mssql/src/reactviews/pages/CodeAnalysis/codeAnalysis.tsx Outdated
Copilot AI review requested due to automatic review settings February 19, 2026 21:59
@ssreerama ssreerama changed the title Code Anlysis: PR2 - Initial Code Analysis dialog setup: React view, state wiring, and controller integration Code Analysis: PR2 - Initial Code Analysis dialog setup: React view, state wiring, and controller integration Feb 19, 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

Copilot reviewed 16 out of 18 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.

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 16 out of 18 changed files in this pull request and generated 4 comments.


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

Comment thread extensions/mssql/src/reactviews/pages/CodeAnalysis/codeAnalysis.tsx Outdated
Comment thread extensions/mssql/src/reactviews/common/locConstants.ts
Comment thread extensions/mssql/test/unit/codeAnalysisWebViewController.test.ts
Comment thread extensions/mssql/src/reactviews/pages/CodeAnalysis/codeAnalysis.tsx
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 16 out of 18 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.

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 16 out of 18 changed files in this pull request and generated 2 comments.


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

Comment thread extensions/mssql/src/sharedInterfaces/codeAnalysis.ts
Comment thread extensions/mssql/src/reactviews/pages/CodeAnalysis/codeAnalysis.tsx
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 16 out of 18 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.

@ssreerama ssreerama merged commit 61371f5 into main Feb 23, 2026
7 checks passed
@ssreerama ssreerama deleted the sai/mar/codeAnalysis_mssqlSampleDialog branch February 23, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants