Skip to content

Conversation

@DanTup
Copy link
Member

@DanTup DanTup commented Dec 11, 2025

This makes it clearer when a test run is spanning multiple sessions and makes it possible to cancel the entire run (because we can't detect cancelling a single debug session, so doing so will continue with the next).

Fixes #5833

@DanTup DanTup added this to the v3.126.0 milestone Dec 11, 2025
@DanTup DanTup added is enhancement in testing Relates to test execution of Dart/Flutter tests for end users in debugging Relates to the debug adapter or process of running debug sessions labels Dec 11, 2025
@DanTup DanTup changed the title Add progress notification for multi-debug-session test runs Add progress notification + cancel button for multi-debug-session test runs Dec 11, 2025
@DanTup DanTup requested a review from Copilot December 11, 2025 16:52
@DanTup
Copy link
Member Author

DanTup commented Dec 11, 2025

@codex review

/gemini review

@chatgpt-codex-connector
Copy link

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

You don't have the ability to clone this repository.
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a progress notification and cancellation support for multi-session test runs, which is a valuable improvement for user experience. The implementation correctly uses vs.window.withProgress and propagates the cancellation token. However, I've identified a critical bug in the logic for handling single-session test runs that would lead to a crash. My review includes a specific code suggestion to fix this issue. The rest of the changes for enabling cancellation appear correct.

Copy link

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 test execution experience for multi-debug-session test runs by adding a progress notification with a cancel button, making it clearer when tests span multiple sessions and allowing users to cancel the entire run instead of just individual debug sessions.

Key Changes:

  • Added progress notification UI with cancellation support for multi-suite test runs
  • Updated test command handlers to accept and propagate cancellation tokens
  • Restructured test execution flow to distinguish between single and multi-suite scenarios

Reviewed changes

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

File Description
src/extension/test/vs_test_controller.ts Refactored test execution to show progress notifications for multi-suite runs with cancellation support; split single vs. multiple suite execution paths
src/extension/commands/test.ts Updated command registrations to accept cancellation token parameter and pass it through to test execution logic

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

const totalItems = testsBySuite.size;

if (totalItems > 1) {
const title = debug ? "Debugging" : "Running";
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

The progress notification title is too generic ("Debugging" or "Running"). Consider making it more descriptive to clarify what is being run, such as "Running Tests" or "Debugging Tests", to provide better context to users about what operation is in progress.

Suggested change
const title = debug ? "Debugging" : "Running";
const title = debug ? "Debugging Tests" : "Running Tests";

Copilot uses AI. Check for mistakes.
This makes it clearer when a test run is spanning multiple sessions and makes it possible to cancel the entire run (because we can't detect cancelling a single debug session, so doing so will continue with the next).

Fixes #5833
@DanTup DanTup force-pushed the multi-session-test-progress branch from 23b1612 to d0d351e Compare December 11, 2025 17:14
These happen quite a lot, particularly during startup. We only need them in the log, we don't need them to show in _all_ logs (as warnings/errors do).
@DanTup DanTup merged commit 03bc7dc into master Dec 11, 2025
2 checks passed
@DanTup DanTup deleted the multi-session-test-progress branch December 11, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in debugging Relates to the debug adapter or process of running debug sessions in testing Relates to test execution of Dart/Flutter tests for end users is enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add progress notification + cancel button for multi-debug-session test runs

2 participants