Removing the Last Macro From a Search Removes All Macros

I just ran into a bug with Keyboard Maestro 10 (might have been there in 9) which caused me to lose all of my macros.

Was able to get them back, but still, this might be worth looking into.

Reproduced it in a VM running Monterey with a clean install of KM 10, using the following steps:

  1. Do a search
  2. Remove every macro that you find in the search. In my testing it didn't seem to matter if you do them all at once, or just delete the latest one on its own
  3. Clear the search
  4. All your macros are gone, not just the ones you just deleted

Video showing the process:

Platform info:

  1. Tested on MacBook Air M1, running 12.0.1. And in a Parallels VM runnning on a Mac mini M1, also using macOS Mojave
  2. Using KM 10.0
  3. Dutch locale in the VM, but US English on the MacBook Air

If any other info is relevant I'm happy to provide it.

Hey Martijn,

That's not a bug; it's a feature. The filtered items are the ones not found by the search.

@peternlewis – I don't see this in the Wiki.

-Chris

The Filtered entry is a place holder for all the macros not matched by the filter.

Any action you can perform on a set of macros, you can perform on it. Enable/disable, Delete, whatever.

Ah, I didn't understand the replies, until I went back to the video to check!

In my original finding of this bug I had matched about 26 results. Did not notice that extra one, and did cmd+A, delete. And even when making the video, and being very mindful, somehow my mind never noticed that specific one. (I just saw that it matched two macros, and since it was a demo environment I didn't really check which ones.)

Now that I know… I get it as a feature, and I'll admit I even like the idea of it, but personally I'm not a fan of the implementation.

For me as a user I would never expect that doing a search, followed by cmd+A, would also match everything not in the search, because of a "placeholder".
I'm not sure if there's a feature request in here somewhere — and since I seem to be the first person to report it, it might just be me being stupid — but I'd like something to be different about this UI.

[edit: phrasing on my part could've been confusing, fixed]

Hey Peter,

I can see this new feature confusing many users...

image

I'd rather it said something like:

118 Macros did NOT match the search...

Or something similar.

I'm not entirely wild about this new feature.

As Martijn says I don't generally expect a search to also display what was NOT found – particularly when the Keyboard Maestro Editor supports negation.

But... I have't used it enough yet to have a strong opinion.

My fear is that many people like Martin will accidentally delete a bunch of stuff they didn't mean to and then have problems restoring them.

-Chris

1 Like

I had to read and re-read this thread before it clicked what was actually happening. I am definitely sure I would get into the same problem sooner or later and so I also second the change to the wording at the very least.

1 Like

Well, the previous solution confused many users, which is why there is a new solution.

My changes are often made to reduce support load (man, do I wish I could fix the bugs in Apple’s security permission system!). People were often confused that all their macros were missing because they had something in the search filter field. This resolves that issue. Time will tell whether it produces other issues.

Okay, I certainly get that.

How about making the descriptor text a little more clear, and then we can document it carefully on the wiki.

-Chris

OK. I'm open to suggestions. This is the space you have to work with:

image

Would it make sense to have extra info in a delete confirmation box? Of course getting people to actually read it all might be difficult….

As you note, nobody reads the alert. I could have an alert where you had to manually type in the text of the alert and people would still email me and tell me they never saw any of it.

This is why there is Undo. And Revisions.

2 Likes

This is probably too complicated, but could we exclude the "filtered macros" from cmd (⌘)+A?

Another idea: right now it's kind of faded, which is why I probably missed it. What if we turn that around, and actually make it more visible?
Ah… That probably doesn't make sense, because it's not where you want the focus in most cases.
Sorry, just thinking out loud here.

BTW, finding the right solution to reduce support load is something I'm also dealing with every day in my work, and no matter what you do, people will tell you that your solution is "wrong".

1 Like

And 1638 Filtered Macros

vs

1638 MACROS NOT FOUND!

or

1638 Macros Not Found…

People are going to immediately understand “not found” but won't fully understand “Filtered Macros” (at least without an explanation).

In my opinion...

-Chris

I have made Select All initially not include the Unmached Macros entry. Actually, like everything, it is way more complicated than you'd expect, here is the actual pseudologic:

  • if the last item is not the Unmached Macros entry, then select everything
  • if the last item is selected, then select everything
  • if the selection is not currently everything except the last item, then select everything
  • otherwise select everything except the last item

Select All a second time will select the entry (or if it is already selected).

I've changed it to “And 1638 Unmatched Macros”, which required the smallest column width to be increased negligibly.

3 Likes

That seems like a reasonable compromise.

Ah, so. Well done!

That's quite clear.

-Chris

Curiously, I use the same mechanism in Find Any File, but for a different case: If you find multiple files and display them in the hierarchical view where you'll also see the enclosing folders of the found items, the first cmd-A only selects the found items. But if you hit cmd-A again, it'll select all items, including the parent folders that are shown in cursive.

Now, one can also use the Filter control to search the found items and show only the matched items. But cmd-A won't then select the unmatched items, even if you type cmd-A again, because that might be confusing.

Ideally, I want to add a checkbox mode, where the selected items can be checked, and then you could use the Filter to match other items, and check those as well, and so on.

But ... this is the KM forum. I am just rambling.

2 Likes

I really like this solution. Well done, Peter — thank you!

2 Likes