Skip to content

Properly close extension#235

Merged
guimafelipe merged 1 commit intomicrosoft:mainfrom
davidegiacometti:dispose-extension
May 27, 2025
Merged

Properly close extension#235
guimafelipe merged 1 commit intomicrosoft:mainfrom
davidegiacometti:dispose-extension

Conversation

@davidegiacometti
Copy link
Contributor

Properly close the extension when CmdPal is closed (porting of microsoft/PowerToys#39209)
Note that microsoft/PowerToys#39589 is needed in order to properly close extensions when CmdPal is closed from PowerToys system tray.

Validation steps:

  • Launch CmdPal
  • Verify that GitHubExtension process is running
  • Invoke CmdPal
  • Press Alt+F4
  • Verify that GitHubExtension process is closed

Copilot AI review requested due to automatic review settings May 19, 2025 20:38
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 PR ensures that the GitHubExtension properly shuts down when CmdPal is closed.

  • Added explicit server shutdown and disposal after waiting for the extension to be disposed.
  • Ensured that the server is stopped and disposed immediately to prevent lingering processes.
Comments suppressed due to low confidence (1)

GitHubExtension/Program.cs:175

  • [nitpick] Verify that using UnsafeDispose is appropriate in this context; if a safer disposal method exists, consider using it to avoid bypassing potential safety checks during shutdown.
server.UnsafeDispose();

@guimafelipe guimafelipe merged commit f28d02b into microsoft:main May 27, 2025
3 checks passed
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.

3 participants