Telescope command search shows removed commands

Bug report

When removing a command listener using the returned disposable the command listener gets removed but the command (without any listener) is still being shown in telescope search results.

Environment

  • Platform: Windows
  • Platform version: 11
  • App Version: 6.0.0-canary.2

How to reproduce

const disposable = inkdrop.commands.add(document.body, 'custom:test-command', () => console.log('Custom command executed'));
disposable.dispose();

telescope-command-without-listener

Hi Lukas,

Thanks for the report.
The Telescope command source caches commands for 1 minute.
Can you try waiting until the cache gets updated?

Oh, i wasn’t aware of that.
I retried and it still finds the disposed command using telescope

I waited 2 minutes before searching

const disposable = inkdrop.commands.add(document.body, 'custom:test-command', () => console.log('Custom command executed'));
disposable.dispose();
await setTimeout(() => console.log("Time is up"), 120000);

I added a timer to make sure that I waited long enough. I cut out the waiting from the video.
disposed_command_retry

1 Like

gotcha, it will be fixed in canary.3!

1 Like

Fixed in Inkdrop Desktop v6.0.0-canary.3!

1 Like