extensions icon indicating copy to clipboard operation
extensions copied to clipboard

[Folder Search] Query string is duplicated when Folder Search is opened as a fallback command.

Open nukesean opened this issue 3 years ago • 14 comments

Extension

https://www.raycast.com/GastroGeek/folder-search

Description

When opening Folder Search as a fallback command for a query, it duplicates the query text. See example below:

Steps To Reproduce

  1. Enter a search query in Raycast
  2. Select Folder Search as the fallback command
  3. Folder Search opens with the query duplicated

Current Behaviour

The query string is duplicated when opening Folder Search as a fallback command.

Expected Behaviour

Folder Search should not open a search with the initial query duplicated.

nukesean avatar May 04 '23 21:05 nukesean

Thank you for opening this issue!

🔔 @GastroGeek @omarshahine you might want to have a look.

💡 Tip: Once the issue is resolved, comment @raycastbot close this issue to close it.

raycastbot avatar May 04 '23 21:05 raycastbot

@nukesean cannot repro this (but saw this happen exactly once today, and am not sure how or why it happened).

Is this consistent repro?

omarshahine avatar May 11 '23 15:05 omarshahine

@omarshahine Really? That's surprising, because yes, it is consistent for me. It happens 100% of the time on all three of my computers: an Intel iMac, an M1 Mac Mini, and an M1 MacBook Air, all running macOS Ventura.

nukesean avatar May 12 '23 22:05 nukesean

So I was able to get it to repro only when there are "no results".

question, do you get any results at all from Folder Search when searching (non fallback)?

Did you try and change your search scope from This Mac to your use profile?

It seems to be an issue on first use.

omarshahine avatar May 14 '23 15:05 omarshahine

Yes, the command works perfectly fine except for this issue; i.e., it returns the desired results if I (1) launch it directly and then enter my search, or (2) launch it as a fallback command and then manually delete the duplicated text.

The duplication from fallback happens regardless of whether there are "no results." For example, I just searched for "dropbox" as a fallback, and it once again produced "dropboxdropbox."

Yes, I've switched the scope back and forth from This Mac to my user profile several times since I first installed it almost a year ago.

nukesean avatar May 15 '23 07:05 nukesean

I have a bug fix for this that I am testing. It's now happening to me a lot, the fix is a hack but it seems to work.

Is anyone here willing to test it out?

omarshahine avatar Jun 10 '23 18:06 omarshahine

Merged and closed, please give it a shot @nukesean - you can run Check for extension Updates to ensure you have the newest update

pernielsentikaer avatar Jun 13 '23 08:06 pernielsentikaer

Merged and closed, please give it a shot @nukesean - you can run Check for extension Updates to ensure you have the newest update

@pernielsentikaer @omarshahine I am fully updated and just tried the command again, and unfortunately, there is no change in behavior on my end. It still duplicates my query 100% of the time whenever I use it as a fallback command.

nukesean avatar Jun 13 '23 09:06 nukesean

I can see that, same happens here - we'll take a look 🙂

pernielsentikaer avatar Jun 13 '23 10:06 pernielsentikaer

@pernielsentikaer

Thanks, my regex has a bug in it that I managed to not notice, but then I also fixed that and also still reproduce the issue. So I'm at a loss as to what to do. I think the Raycast team may need to take a look as I suspect it's a bug in Raycast. If it's fixed I can back out this hack.

omarshahine avatar Jun 16 '23 16:06 omarshahine

Ooh exciting, I have a fix that works this time. Will test for a few days and create a new PR

omarshahine avatar Jun 16 '23 19:06 omarshahine

@nukesean can you update your extension and verify the fix?

omarshahine avatar Jun 21 '23 07:06 omarshahine

@omarshahine I can confirm the duplicated portion is deleted within a few ms of the command opening. Thanks!

nukesean avatar Jun 24 '23 06:06 nukesean

Fantastic

omarshahine avatar Jun 24 '23 06:06 omarshahine