Issue with showActionPanel in Task or Workspace Preferences?

Hey everyone,

I’m working on an extension and trying to use showActionPanel (and possibly showInputPanel) with a command button when editing a Task or Workspace preference. However, I’m running into an issue where the panel doesn’t show up immediately when clicking the button in the Task editor but triggers multiple times afterward.

Here’s the command code I’m working with:

nova.commands.register("my-extension.show-panel", (workspace) => {
  nova.workspace.showActionPanel(
    "Custom Task Action",
    {
      buttons: ["OK", "Cancel"],
      message: "Are you really sure you want to do this?!?!"
    },
    (buttonIndex) => {
      if (buttonIndex === 0) {
        console.log("OK pressed");
      } else if (buttonIndex === 1) {
        console.log("Cancel pressed");
      }
    }
  );
});

In the extension.json I added this to the Task template’s config section:

			{
				"title": "Show Action Panel",
				"description": "Click here to be asked a question.",
				"type": "command",
				"command": "my-extension.show-panel"
			},

I also added a menu option for testing the command:

			{
				"title": "Test my-extension.show-panel",
				"command": "my-extension.show-panel"
			},

The issue:

  • When editing the task and clicking the button (e.g., 5 times), the action panel doesn’t appear immediately.
  • After closing the Task editor, nothing happens initially.
  • However, selecting the menu option “Test my-extension.show-panel” causes the action panel to appear multiple times (equal to the number of clicks in the Task editor).

It seems like the command is being queued up but isn’t executed properly in the context of the Task editor. Is there a known limitation with showActionPanel in this context, or am I missing something?

Any guidance would be much appreciated!