Mailspring becomes unresponsive when installing a plugin

Description

When I install a plugin through the Developer menu, Mailspring becomes unresponsive to typing and clicks until the “Plugin installed! tada” dialog appears. At that point, I can dismiss the dialog, and Mailspring is responsive again.

To Reproduce…

Steps to reproduce the behavior:

  1. Go to the hamburger menu
  2. Click on “Developer”
  3. Click on “Install a Plugin…”
  4. Choose a directory with a plugin in it
  5. Mailspring freezes until plugin is installed

Expected Behavior

I should be able to use Mailspring while a plugin is installing.

Screenshots

Here’s a sequence of screenshots demonstrating the issue.

Installing a plugin

Mailspring stops responding

Plugin installation finishes

Mailspring is responsive (I can select text)

Setup

  • OS and Version: Windows 10 Education Version 2004, build 19041.388, Windows Feature Experience Pack 120.2202.130.0
  • Mailspring Version: 1.7.8-13635bcf

Additional Context

This is not related to a particular email provider.

I am unsure of the cause of the issue, but it would seem that plugin directories are copied synchronously during plugin installation. I imagine this might cause problems when there’s a large node_modules/ folder inside a plugin. Relevant code:


(Originally posted by jmanuel1 on GitHub.)