Add cancel button on "Listing Salesforce CLI Connections" or make it not modal

Issue #2431 resolved
Matthew Rossner created an issue

Sometimes I might accidentially click the connection select drop down list, which triggers the "Listing Salesforce CLI Connections". This then opens a modal (see screenshot) which blocks IntelliJ completely, even other open projects are blocked. Sometimes it takes 30 seconds or more for an accidentally click and now I’m stuck waiting for 30 seconds. It really needs a cancel button, or to be run in a way that doesn’t completely block the IDE.

Comments (5)

  1. Scott Wells repo owner

    I certainly understand the concern, but it’s unfortunately not as trivial as it might seem to “cancel” that CLI execution in situations where that particular command is being executed for a synchronous response so that the overarching process can continue. However, listing CLI connections should generally not be taking that long. There are two primary reasons that might be the case:

    1. Your CLI is out-of-date. Please make sure it’s completely up-to-date.
    2. You have a large number of stale connections. Please run sfdx force:org:list --clean from the command-line or use the “Remove Stale CLI Connections” toolbar action in the IC2 connection manager, then also see if you have any superfluous non-scratch org connections that you can remove.

    If it’s still taking that long, you can change the settings for “When cached connection list/details appear(s) stale” so that these commands are not executed automatically by IC2 unless absolutely necessary, e.g., there is no cached connection list/details. You can find more information on those options here:

    https://bitbucket.org/RoseSilverSoftware/illuminatedcloud/wiki/User_Guide/Configuring_Application_Settings#markdown-header-salesforce-dx

    I hope that helps.

  2. Matthew Rossner reporter

    Thanks for the quick response, I’ll try the suggestions you’ve mentioned here. I understand it’s probably not a trivial issue, but figured I would at least report it.

  3. Scott Wells repo owner

    Yeah, and I’m not resolving it either. I’ve had ideas on how I could allow it to be canceled, primarily by executing CLI commands on a separate thread and waiting for them when a synchronous response is needed. There are several issues with that, though: 1) that CLI command is going to continue to execute, and if it’s something that has a side-effect, visibility into that would be lost in the IDE; 2) whatever downstream process that the user was trying that needed the CLI command to execute is going to be canceled as well, and to complete that command, at some point that CLI command must execute. So I think the configuration options that I’ve added are likely the best compromise for users that have long-running force:org:list and force:org:display commands even after cleaning up stale entries.

  4. Scott Wells repo owner

    Resolving this as the changes in 2.2.9.2 should minimized the need for this operation to exactly what's needed to provide IC2 the information required to communicate with the Salesforce sever.

  5. Log in to comment