Stop hanging setupMCP on unclosed information message dialog #4756
+10
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This precedes #4626
The Problem
Steps to reproduce
setupMCPfunction.Setting up the GitKraken MCPnotification appears. Then it's changed by a success message.Expected result
setupMCPis called one more time (you can check it in debugger or logs)Setting up the GitKraken MCPnotification appears again.Actual result⚠️
setupMCPagainSetting up the GitKraken MCPnotification.Explanation
setupMCP()method is gated by@gateannotation 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@gatehave 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
setupMCPfunction always finished even if user does not interact with the information message.Checklist
Fixes $XXX -orCloses #XXX -prefix to auto-close the issue that your PR addresses