Skip to content

Conversation

@spboyer
Copy link
Member

@spboyer spboyer commented Dec 22, 2025

Introduces significant improvements to the Azure Developer CLI VS Code extension, focusing on enhanced environment management, improved resource navigation, and better user experience.

📋 Summary of Changes

🆕 New Features

1. Standalone Environments View

  • Added a dedicated Environments view separate from the workspace view
  • Provides a unified interface for managing all azd environments across projects
  • Includes environment status indicators and management commands

2. Extensions Management View

  • New Extensions view for managing azd CLI extensions
  • Support for installing, uninstalling, and upgrading extensions
  • Visual status indicators for installed extensions

3. "Show in Azure Portal" Command

  • Quick navigation from VS Code directly to Azure resources in the portal
  • Context menu integration for services
  • Automatic portal URL construction with proper resource ID handling

4. Enhanced Environment Operations

  • Unified command support across workspace and standalone views
  • Commands: env-refresh, env-edit, env-delete, revealAzureResourceGroup
  • Automatic view synchronization after operations
  • Dual refresh mechanism ensures both views stay in sync

🔧 Improvements

Resource Navigation

  • Extended revealAzureResourceGroup to support standalone environments
  • Improved RevealStep with:
    • Automatic Azure extension activation based on resource type
    • Tree refresh mechanisms before reveal attempts
    • Multi-attempt reveal logic with fallback options
    • Resource group pre-expansion for better navigation
    • User-friendly error messages with action buttons

User Experience

  • Removed automatic environment selection on click for better control
  • Enhanced error messages with "Copy Resource ID" and "Open in Portal" actions
  • Improved context menu organization with proper grouping
  • Updated Help and Feedback links to point to AZD Blog Posts
  • Better visual feedback for environment status

Code Quality

  • ESLint compliance fixes (naming-convention warnings resolved)
  • Improved regex patterns for better linting compliance
  • Added comprehensive debug logging throughout wizard steps
  • Added documentation comments explaining API limitations
  • Better type handling with EnvironmentTreeItem support

📊 Commits Included

  1. bec9154f - Remove Environments from My Project view
  2. 89d29243 - Add extensions view and enhanced environment management
  3. ab57695c - Update Help and Feedback link from Resources to AZD Blog Posts
  4. 15197c3d - Add 'Show in Azure Portal' command for services
  5. a9f3d191 - Integrate environment commands with standalone Environments view

🧪 Testing Checklist

  • Environment creation from standalone view
  • Environment deletion and refresh operations
  • Resource group reveal from standalone environments
  • "Show in Azure Portal" command functionality
  • View synchronization after operations
  • Extension management operations
  • Cross-view command compatibility
  • Error handling and user feedback
  • Context menu integrations

🔍 Related Issues

<- Improved regex patterns in RevealStep for better linting compliance Link any related issues here -->

📝 Notes

This is a work in progress. Additional testing and refinement may be needed before final review.

- Add new Extensions view with tree data provider for managing azd extensions
- Implement extension commands: install, uninstall, and upgrade
- Add ExtensionProvider service for interacting with azd extension APIs
- Add environment variables tree node for displaying env vars in workspace
- Enhance environment tree views with toggle visibility and .env file viewing
- Add inline actions to environment view (view .env, select environment)
- Add navigation buttons to view titles (new environment, install extension)
- Improve tree view type checking with isTreeViewModel utility
- Update telemetry IDs for new extension and environment operations
- Refactor command handlers to support both workspace and environment tree views
…g Posts

- Rename 'Resources' link to 'AZD Blog Posts' in Help and Feedback view
- Update URL to point to Azure SDK blog filtered by azure-developer-cli tag
- Update command title to 'Open AZD Blog Posts'
- Added new command to open Azure resources directly in the Azure Portal
- Created OpenInPortalStep wizard step to handle portal URL opening
- Enhanced RevealStep with improved resource tree navigation and error handling
- Added debug logging throughout wizard steps for better diagnostics
- Improved error handling in PickResourceStep and PickResourceGroupStep
- Updated command registration and package.json with new command
- Added localized command title in package.nls.json
- Modified reveal.ts to support both TreeViewModel and direct service item inputs
- Enhanced RevealStep to activate required Azure extensions and refresh tree before reveal
- Added fallback mechanisms when automatic reveal fails (copy ID, open in portal options)
…ents view

- Extended environment commands to support both workspace and standalone views
- Added refresh functionality to Environments view after environment operations
- Connected env-refresh, env-edit, env-delete, and revealResourceGroup commands to standalone environments
- Updated reveal.ts to handle EnvironmentTreeItem for resource group navigation
- Modified env.ts to accept EnvironmentTreeItem in all environment operations
- Added view refresh commands after env operations (delete, new, select, refresh)
- Removed automatic env-select on click for non-default environments
- Fixed ESLint warnings with naming-convention for Azure provider types
- Added comment explaining focusGroup limitation in RevealStep
- Improved regex patterns in RevealStep for better linting compliance

This unifies the experience across both the workspace environments and the standalone
environments view, ensuring users can perform the same operations from either location.
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 WIP PR introduces significant improvements to the Azure Developer CLI VS Code extension, adding a new dedicated activity bar view with multiple panels for managing environments, extensions, and resources. The changes focus on providing a standalone interface for environment management and adding convenient navigation features to Azure Portal.

Key Changes:

  • Adds a new activity bar container with four views: My Project, Environments, Extensions, and Help and Feedback
  • Implements environment variable visibility toggle functionality with hidden-by-default behavior
  • Adds "Show in Azure Portal" command for quick navigation from services
  • Extends reveal commands to work with both workspace and standalone environment views

Reviewed changes

Copilot reviewed 35 out of 38 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
package-lock.json Empty lock file added at repository root (should be removed)
ext/vscode/ext/vscode/package-lock.json Empty lock file in duplicate nested path (should be removed)
ext/vscode/package-lock.json Lock file dependency updates (peer dependencies unmarked)
.vscode/settings.json Added aspire settings (unrelated to PR scope)
ext/vscode/package.json Registered new views container, views, commands, and menus for enhanced UI
ext/vscode/package.nls.json Added localization for new "Show in Azure Portal" command
ext/vscode/src/extension.ts Integrated new view registration in activation
ext/vscode/src/views/registerViews.ts New file registering all tree data providers and view commands
ext/vscode/src/views/myProject/MyProjectTreeDataProvider.ts New provider for My Project view without environments
ext/vscode/src/views/environments/EnvironmentsTreeDataProvider.ts New standalone environments view with variable visibility toggle
ext/vscode/src/views/extensions/ExtensionsTreeDataProvider.ts New extensions management view
ext/vscode/src/views/helpAndFeedback/HelpAndFeedbackTreeDataProvider.ts New help and feedback view with links
ext/vscode/src/views/workspace/AzureDevCliApplication.ts Added environment variables provider and optional environment inclusion
ext/vscode/src/views/workspace/AzureDevCliEnvironment.ts Enhanced with collapsible environment variables child node
ext/vscode/src/views/workspace/AzureDevCliEnvironments.ts Added env values provider integration
ext/vscode/src/views/workspace/AzureDevCliEnvironmentVariables.ts New classes for environment variable tree items with visibility toggle
ext/vscode/src/views/workspace/AzureDevCliWorkspaceResourceBranchDataProvider.ts Added visibility state management
ext/vscode/src/services/AzureDevEnvValuesProvider.ts New service to fetch environment variable values via CLI
ext/vscode/src/services/AzureDevExtensionProvider.ts New service to list installed azd extensions
ext/vscode/src/commands/registerCommands.ts Registered new extension management and portal navigation commands
ext/vscode/src/commands/extensions.ts New command implementations for extension install/uninstall/upgrade
ext/vscode/src/commands/env.ts Extended environment commands to support standalone view items
ext/vscode/src/commands/azureWorkspace/reveal.ts Extended reveal commands with EnvironmentTreeItem support and portal navigation
ext/vscode/src/commands/azureWorkspace/wizard/OpenInPortalStep.ts New wizard step for opening resources in Azure Portal
ext/vscode/src/commands/azureWorkspace/wizard/RevealStep.ts Enhanced with extension activation, retry logic, and better error handling
ext/vscode/src/commands/azureWorkspace/wizard/PickEnvironmentStep.ts Added debug logging
ext/vscode/src/commands/azureWorkspace/wizard/PickResourceStep.ts Added error handling and debug logging
ext/vscode/src/commands/azureWorkspace/wizard/PickResourceGroupStep.ts Added error handling and improved error messages
ext/vscode/src/commands/up.ts Added support for AzureDevCliModel type guard
ext/vscode/src/commands/down.ts Added support for AzureDevCliModel type guard
ext/vscode/src/commands/deploy.ts Added support for AzureDevCliModel type guard
ext/vscode/src/commands/provision.ts Added support for AzureDevCliModel type guard
ext/vscode/src/commands/restore.ts Added support for AzureDevCliModel type guard
ext/vscode/src/commands/packageCli.ts Added support for AzureDevCliModel type guard
ext/vscode/src/commands/pipeline.ts Added support for AzureDevCliModel type guard
ext/vscode/src/commands/monitor.ts Added support for AzureDevCliModel type guard
ext/vscode/src/utils/isTreeViewModel.ts Added isAzureDevCliModel type guard function
ext/vscode/src/telemetry/telemetryId.ts Added telemetry IDs for extension management commands
Files not reviewed (2)
  • ext/vscode/ext/vscode/package-lock.json: Language not supported
  • ext/vscode/package-lock.json: Language not supported

spboyer and others added 9 commits December 22, 2025 12:13
Added unit tests for:
- OpenInPortalStep: Tests portal URL construction for various Azure resource types
  * Web Apps, Storage Accounts, Cosmos DB, Container Apps, Resource Groups
  * Error handling for missing resource IDs
  * Priority configuration

- RevealStep: Tests Azure resource reveal functionality
  * Extension activation for different Azure providers
  * Resource group pre-expansion logic
  * Multi-attempt reveal with fallback
  * Error handling and user notifications
  * Tree refresh mechanisms

- EnvironmentsTreeDataProvider: Tests standalone environments view
  * Environment listing and hierarchy
  * Default environment marking
  * Environment variable visibility toggling
  * Tree refresh events
  * Integration with environment providers

- ExtensionsTreeDataProvider: Tests extensions management view
  * Extension listing and display
  * Version information
  * Tree item creation
  * Refresh functionality

All tests use proper mocking with sinon, follow established patterns,
and provide comprehensive coverage of success and error paths.
- Add sinon and @types/sinon for test mocking
- Remove unused telemetryId parameter from registerActivityCommand
- Add documentation for telemetry tracking in commands
- Fix isAzdCommand to handle undefined input
- Add TEST_COVERAGE.md documentation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@spboyer spboyer changed the title [WIP] AZD VS Code Extension Updates & Improvements AZD VS Code Extension Updates & Improvements Dec 28, 2025
Implements comprehensive language support for azure.yaml configuration files:

- Auto-completion for host types, lifecycle hooks, and properties with snippets

- Hover documentation with examples and Microsoft Learn links

- Quick fixes for missing folders, properties, and invalid configurations

- Add new service refactoring with interactive wizard

- Enhanced validation diagnostics

Includes 28 new test cases (all passing) covering completion, hover, code actions, and diagnostics.

Updated README.md, FEATURE_IDEAS.md, and cspell dictionary.
Implements comprehensive language support for azure.yaml configuration files:

- Auto-completion for host types, lifecycle hooks, and properties with snippets

- Hover documentation with examples and Microsoft Learn links

- Quick fixes for missing folders, properties, and invalid configurations

- Add new service refactoring with interactive wizard

- Enhanced validation diagnostics

Includes 28 new test cases (all passing) covering completion, hover, code actions, and diagnostics.

Updated README.md, FEATURE_IDEAS.md, and cspell dictionary.
… and initialization

Add a new Template Tools view panel that helps users discover and initialize Azure Developer CLI templates:

Features:
- Dynamic Quick Start section (visible only when no azure.yaml exists)
  - Initialize from existing code
  - Create minimal project
  - Browse template gallery
- Browse templates by 6 predefined categories (AI/ML, Web Apps, APIs, Containers, Databases, Starters)
- AI Templates section with direct access to aka.ms/aiapps templates
- Search functionality with QuickPick UI for filtering templates
- Template items with inline actions:
  - Click template name to view README
  - Hover actions: Initialize (rocket icon), View on GitHub (github icon)
  - Context menu with all actions

Implementation:
- AzureDevTemplateProvider service for fetching/caching templates from awesome-azd JSON feed (1-hour cache)
- TemplateToolsTreeDataProvider with FileSystemWatcher for azure.yaml changes
- Template comm
Add a new Template Tools view panel that helps users discover and initialize Azure Developer CLI temp)
-
Features:
- Dynamic Quick Start section (visible only when no azure.yaml exists)
  - Initialize ft test coverage (11 n  - Initialize from existing code
  - Create minined between Environmen  - Create minimal projecs and seamlessly integrates with exi- Browse temit workflows.
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

Copilot reviewed 61 out of 64 changed files in this pull request and generated 2 comments.

Files not reviewed (1)
  • ext/vscode/package-lock.json: Language not supported

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@vhvb1989
Copy link
Member

vhvb1989 commented Jan 2, 2026

@bwateratmsft ping

Copy link
Contributor

@bwateratmsft bwateratmsft left a comment

Choose a reason for hiding this comment

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

I've been on vacation, but I'll review this week. Doing "request changes" for now so it doesn't accidentally get merged ahead of that.

Copy link
Contributor

@bwateratmsft bwateratmsft left a comment

Choose a reason for hiding this comment

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

@copilot There is throughout the PR a general pattern of editing files just to add overly-verbose logging, and all of it via console.log which is not correct.

Where the logs are valuable to the user, it should instead be changed to ext.outputChannel.

Otherwise, where the substance of the file hasn't changed--and just overly-verbose logging is added--please revert the files to their original state. We can add things back in a separate PR if we desire.

{
"id": "azure-dev-view",
"title": "Azure Developer CLI",
"icon": "resources/icon.png"
Copy link
Contributor

Choose a reason for hiding this comment

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

@spboyer I think this icon looks pretty weird:

Image

All the detail is removed and just the outer shape remains

Copy link
Member Author

Choose a reason for hiding this comment

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

It is a placeholder need an production version for this from @SophCarp

Copy link
Collaborator

Choose a reason for hiding this comment

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

image azd_cli_vscode_icon

@spboyer Here's the png, let me know if you need it as an SVG or any other changes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually since this is png, here's a larger one for higher resolution:
azd_cli_vscode_icon_large

Copy link
Contributor

Choose a reason for hiding this comment

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

@SophCarp an SVG would be better since that will follow theming

Fixes Azure#5691

Implements friendly azure.yaml/azure.yml validation within the extension
to catch errors before they cause unfriendly error dialog pop-ups.

Changes:
- Enhanced diagnostic provider with comprehensive validation
- Improved error handling in AzureDevShowProvider
- Added 17 new test cases (all passing)
- Updated README.md and TESTING_GUIDE.md with validation features
- All lint, tests, and cspell checks passing

Key features:
- Empty file detection with helpful guidance
- YAML parsing errors with user-friendly messages
- Missing required properties validation
- Invalid service properties detection
- Directs users to Problems panel instead of showing pop-ups
- Remove all console.log/console.error statements, replace with ext.outputChannel.appendLog where appropriate
- Add category to new commands in package.json
- Remove redundant CI test step from copilot-instructions.md
- Delete unnecessary TEST_COVERAGE.md file
- Delete duplicate ext/vscode/package-lock.json
- Update README.md Getting Started with extension install command option
- Update minimum AZD version requirement to 1.8.0
@spboyer
Copy link
Member Author

spboyer commented Jan 7, 2026

@bwateratmsft addressed most if not all feedback. Thanks for the review!

@azure-sdk
Copy link
Collaborator

VSCode Extension Installation Instructions

  1. Download the extension at https://azuresdkartifacts.z5.web.core.windows.net/azd/vscode/pr/6425/azure-dev-0.11.0-alpha.1.vsix
  2. Extract the extension from the compressed file
  3. In vscode
    a. Open "Extensions" (Ctrl+Shift+X)
    b. Click the ...\ menu at top of Extensions sidebar
    c. Click "Install from VSIX"
    d. Select location of downloaded file

Copy link
Contributor

@bwateratmsft bwateratmsft left a comment

Choose a reason for hiding this comment

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

None of the playwright tests that were added provide any real value. They should just be removed, along with the playwright dev dependency.

Comment on lines +115 to +117
playwright-report/
test-results/
playwright/.cache/
Copy link
Contributor

Choose a reason for hiding this comment

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

These should be added to the .vscodeignore as well. Additionally, all of these should be added to the .vscodeignore:

  • The .github folder
  • playwright.config.js
  • FEATURE_IDEAS.md
  • PLAYWRIGHT_QUICK_START.md
  • TESTING_GUIDE.md

Copy link
Contributor

Choose a reason for hiding this comment

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

@spboyer This file should not be checked in

Copy link
Contributor

Choose a reason for hiding this comment

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

@spboyer This file can most likely be renamed to .mjs, and the playwright.config.js file removed. It's going to be confusing maintaining both a source and a built file in the repository.

Copy link
Contributor

Choose a reason for hiding this comment

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

@copilot Copyright header

Copy link
Contributor

Choose a reason for hiding this comment

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

The only thing this file is testing is if the links in the Help and Feedback view are live. However, it is using copies of the URLs, so if the Help and Feedback view were updated, this test would become useless, unless it also was updated.

Honestly I don't see this file as worthwhile at all.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, copyright header is missing...(though doesn't matter if we delete this file)

Copy link
Contributor

Choose a reason for hiding this comment

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

Same as the previous file, this is basically just a self-test that will drift out-of-date and become useless.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, copyright header is missing...(though doesn't matter if we delete this file)

Copy link
Contributor

Choose a reason for hiding this comment

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

Same as the previous two files, this is just a self-test that will drift out-of-date and become useless.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, copyright header is missing...(though doesn't matter if we delete this file)

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.

5 participants