Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 10, 2025

Problem

When creating a virtual environment with packages to install, users would see two separate, stacked progress notifications that were confusing and looked odd:

  1. "Creating virtual environment named .venv using python version 3.13.0."
  2. "Installing packages"

Before: Two stacked progress notifications

The second progress notification (displayed on top) represents just a different stage in the same creation operation, so displaying two separate notifications was unnecessary.

Solution

This PR merges the two progress notifications into a single, updating progress notification that leverages VS Code's progress API to update its message as the operation progresses through different stages.

Before:

  • Two separate progress notifications
  • Confusing UX with stacked notifications

After:

  • Single progress notification that updates from "Creating virtual environment..." to "Installing packages..."
  • Clean, streamlined user experience

Changes

API Enhancement

  • Added suppressProgress?: boolean option to PackageManagementOptions type
  • Allows package managers to skip showing their own progress notification when called as part of a larger operation with its own progress tracking

Core Implementation

  • venvUtils.ts: Modified createWithProgress() to use the progress parameter to update the message to "Installing packages..." when package installation begins, and passes suppressProgress: true to api.managePackages()
  • pipManager.ts: Updated manage() to check the suppressProgress flag and conditionally skip wrapping execution with withProgress() when the flag is true
  • condaPackageManager.ts: Similar changes to respect the suppressProgress flag with proper handling of CancellationToken requirements

Testing

  • Added comprehensive unit tests in venvProgressMerge.unit.test.ts to verify:
    • progress.report() is called with the "Installing packages..." message
    • suppressProgress: true is passed to managePackages()
    • Package management is skipped when no packages are specified
  • All 197 unit tests passing with no regressions

Impact

  • Improved user experience with cleaner, more intuitive progress notifications
  • Fully backward compatible - new option is optional and defaults to false
  • No breaking changes to existing package manager usage patterns
  • Minimal, surgical changes to the codebase

Fixes #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Merge the two into a single progress message</issue_title>
<issue_description>I think we should merge these two into single progress message.
Using VS Code API its possible to update the progress messages, hence displaying two isn't necessary.

Also looks weird to have two.
When the second progress (displayed on top) is just a different stage in the creation..
In which case we can use the progress API to update the progress message

Image</issue_description>

Comments on the Issue (you are @copilot in this section)

@eleanorjboyd great point yes! When creating an environment and installing packages as part of that flow, we should only have one progress which gets updated as the different steps are happening.

Fixes #925


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits October 10, 2025 21:07
- Added suppressProgress option to PackageManagementOptions type
- Updated PipPackageManager to respect suppressProgress flag
- Updated CondaPackageManager to respect suppressProgress flag
- Modified createWithProgress to update progress message when installing packages
- Set suppressProgress:true when calling managePackages during env creation

Co-authored-by: eleanorjboyd <[email protected]>
- Created unit tests to verify suppressProgress option works correctly
- Tests confirm progress.report is called to update message
- Tests verify suppressProgress:true is passed to managePackages
- All 197 tests passing

Co-authored-by: eleanorjboyd <[email protected]>
@Copilot Copilot AI changed the title [WIP] Merge two progress messages into one Merge duplicate progress notifications during environment creation Oct 10, 2025
@Copilot Copilot AI requested a review from eleanorjboyd October 10, 2025 21:15
Copilot finished work on behalf of eleanorjboyd October 10, 2025 21:15
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.

Merge the two into a single progress message

2 participants