Skip to content

Conversation

@sergeibbb
Copy link
Member

@sergeibbb sergeibbb commented Nov 21, 2025

Description

This precedes #4626

The Problem

Steps to reproduce

  1. call "GitLens: Re-install GitKraken MCP" command in the palette.
  2. Check that it enters setupMCP function.
  3. Setting up the GitKraken MCP notification appears. Then it's changed by a success message.
  4. Do not touch the notification message that appears after the installation.
  5. One more time call "GitLens: Re-install GitKraken MCP" command in the palette.

Expected result

  • setupMCP is called one more time (you can check it in debugger or logs)
  • Setting up the GitKraken MCP notification appears again.

Actual result ⚠️

  • it never enter setupMCP again ⚠️
  • you do not see the Setting up the GitKraken MCP notification.

Explanation

setupMCP() method is gated by @gate annotation that does not let to re-call unfinished promises.
The execution has been waiting for user interaction with the success message, therefore the setupMCP() execution has never been resolved, so the @gate have never been released. That prevented MCP installation from another attempt.

Solution

I wrap the information message prompt in an async wrapper that is not awaited, to avoid blocking the main execution flow. This ensures the gated setupMCP function always finished even if user does not interact with the information message.

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation (including CHANGELOG.md and README.md)
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

Wraps the information message prompt in an async IIFE to avoid blocking
the main execution flow while awaiting user interaction. This ensures
the _gated_ `setupMCP` function always finished even if user does not
interact with the information message.
(#4756)
@sergeibbb sergeibbb force-pushed the bug/4626-cannot-install-mcp-twice branch from dc23b74 to 0d60383 Compare November 21, 2025 18:34
@sergeibbb
Copy link
Member Author

Hi @eamodio , @axosoft-ramint

Do you think this fix makes sense?

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