p0deje / Maccy

Lightweight clipboard manager for macOS
https://maccy.app
MIT License
11.84k stars 510 forks source link

Triple Search Results in 0.30.0 After Upgrade from 0.29.4 #747

Closed LangLangBart closed 5 months ago

LangLangBart commented 5 months ago

Before Submitting Your Bug Report

Maccy Version (see 'About' window)

0.30.0

macOS Version

macOS 10.15.7

Maccy Settings

{
    "KeyboardShortcuts_delete" = "{\\"carbonModifiers\\":2048,\\"carbonKeyCode\\":51}";
    "KeyboardShortcuts_pin" = "{\\"carbonModifiers\\":2048,\\"carbonKeyCode\\":35}";
    "KeyboardShortcuts_popup" = "{\\"carbonModifiers\\":768,\\"carbonKeyCode\\":8}";
    "NSWindow Frame com.sindresorhus.Preferences.FrameAutosaveName" = "694 837 532 253 0 0 1920 1200 ";
    "NSWindow Frame com.sindresorhus.Settings.FrameAutosaveName" = "689 666 542 424 0 0 1920 1200 ";
    SUEnableAutomaticChecks = 0;
    SUHasLaunchedBefore = 1;
    SUSendProfileInfo = 0;
    avoidTakingFocus = 0;
    clearOnQuit = 0;
    enabledPasteboardTypes =     (
        "public.utf8-plain-text",
        "public.html",
        "public.rtf"
    );
    history = {length = 42, bytes = 0x62706c69 73743030 a0080000 00000000 ... 00000000 00000009 };
    historySize = 250;
    ignoreEvents = false;
    ignoredPasteboardTypes =     (
        "de.petermaurer.TransientPasteboardType",
        "com.typeit4me.clipping",
        "Pasteboard generator type",
        "com.agilebits.onepassword"
    );
    migrations =     {
        "2020-04-25-allow-custom-ignored-types" = 1;
        "2020-06-19-use-keyboardshortcuts" = 1;
        "2020-09-01-ignore-keeweb" = 1;
        "2021-02-20-allow-to-customize-supported-types" = 1;
        "2021-06-28-add-title-to-history-item" = 1;
        "2021-10-16-remove-dynamic-pasteboard-types" = 1;
        "2022-08-01-rename-suppress-clear-alert" = 1;
        "2022-11-14-add-html-rtf-to-supported-types" = 1;
        "2023-01-22-add-regexp-search-mode" = 1;
    };
    pasteByDefault = 1;
    removeFormattingByDefault = 1;
    searchMode = exact;
    showSpecialSymbols = 0;
}

Description

Issue

After upgrading from 0.29.4 to 0.30.0, I see the same string listed three times when I search for it.

Even after completely uninstalling Maccy with:

brew uninstall --cask --zap maccy

and then reinstalling it with

brew install --cask maccy

the issue persisted.


Workaround

Use Maccy version 0.29.4

Steps to Reproduce

  1. Open Maccy and start searching for a string
  2. Notice the list shows each result three times

See video below for more clarity

https://github.com/p0deje/Maccy/assets/92653266/66ac28a9-0a18-454e-9ce1-210d76f03517

p0deje commented 5 months ago

Looks like it's a regression in https://github.com/p0deje/Maccy/commit/52a54798033e09e02cc28a377bd37e585ce8b302. Of course, it worked for a newer macOS and not for an older one :) I'll guard this to only be done on Sonoma.

LangLangBart commented 5 months ago

Of course, it worked for a newer macOS and not for an older one :) I'll guard this to only be done on Sonoma.

Thank you for continuing to support Catalina for a bit longer.

Have you thought about discontinuing support for older macOS versions to reduce the maintenance burden, assuming that most users have moved to a more recent macOS version?

p0deje commented 5 months ago

I like to keep things backward compatible and if there is nothing forcing me to drop the old OS - I won't do so. There used to be a case when I had to drop pre-Mojave because of a macOS bug related to the app sandbox, but apart from that I always managed to find a way to keep things working. Maccy has contributors like you and I would not want to break it just because I want to try something fancy.

That said, there are many issues related to NSMenu that I cannot work around. After years of developing Maccy as a menu application and dozens of hacks I had to implement to support the use cases, I am considering rewriting from NSMenu to NSPopover/NSWindow. There are just too many problems with using NSMenu and trying to create a good UX. If I start doing it, I would likely use SwiftUI and it might force me to drop support for some older OSes unless they have the necessary APIs. I am not sure when I would embark on this journey though.