Skip to content

Conversation

juliasilge
Copy link
Contributor

@juliasilge juliasilge commented Sep 1, 2025

Addresses #8404

With this PR, we now show a progress notification when users explicitly call Interpreter: Discover All Interpreters. It looks like this while discovery is going on (which can take a while, but if a user really explicitly said to do this, probably the right option):

Screenshot 2025-09-01 at 3 20 49 PM

If nothing new is found, the progress notification resolves and then you see this:

Screenshot 2025-09-01 at 3 21 04 PM

If something new is found, the progress notification resolves and then you see this:

Screenshot 2025-09-01 at 3 22 41 PM

Release Notes

New Features

  • Improved user feedback when using the command Interpreter: Discover All Interpreters.

Bug Fixes

  • N/A

QA Notes

The command Interpreter: Discover All Interpreters will not run unless the first round of discovery is done, which runs quietly in the background. This may take longer than you expect. Once you can run it:

  • Look at all your interpreter options in Positron
  • Add a new one via the regular terminal (for example, a new rig version)
  • Look at all your interpreter choices and see that your new one is not there yet
  • Execute the command, and note the new progress notification
  • Look at all your interpreter choices and see that now the new one is there
  • Execute the command again, and see the same progress notification
  • Note the message telling you nothing new was found

@juliasilge juliasilge marked this pull request as ready for review September 1, 2025 22:26
@juliasilge juliasilge requested a review from Copilot September 1, 2025 22:26
Copy link
Contributor

@Copilot 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 improves the user experience for runtime discovery by adding progress notifications and better feedback messages when users explicitly trigger interpreter discovery. The key enhancement is showing users what's happening during the potentially long discovery process and providing clear feedback about the results.

Key changes:

  • Added progress notification during runtime discovery with cancellable UI
  • Enhanced user feedback with messages for both successful discoveries and cases where no new interpreters are found
  • Restructured the discovery flow to properly await completion before showing results

Comment on lines 684 to 686
await new Promise<void>((resolve) => {
this._languageRuntimeService.onDidChangeRuntimeStartupPhase(phase => {
if (phase === RuntimeStartupPhase.Complete) {
Copy link
Preview

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

The event listener created by onDidChangeRuntimeStartupPhase is never disposed of, causing a memory leak. The listener should be stored and disposed when the promise resolves or the method completes.

Copilot uses AI. Check for mistakes.

Comment on lines +675 to +679
await this._progressService.withProgress({
location: ProgressLocation.Notification,
title: nls.localize('positron.runtimeStartupService.discoveringRuntimes', 'Discovering interpreters...'),
cancellable: false
}, async (progress) => {
Copy link
Preview

Copilot AI Sep 1, 2025

Choose a reason for hiding this comment

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

[nitpick] The progress service is configured as non-cancellable, but users might want to cancel a long-running discovery process. Consider making this cancellable and handling the cancellation appropriately.

Copilot uses AI. Check for mistakes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Given that discoverAllRuntimes() calls back into the extensions, making it cancellable will take a lot of piping through. Let's not do this now.

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.

1 participant