[Folder Search] Query string is duplicated when Folder Search is opened as a fallback command.
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
- Enter a search query in Raycast
- Select Folder Search as the fallback command
- 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.
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.
@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 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.
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.
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.
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?
Merged and closed, please give it a shot @nukesean - you can run Check for extension Updates to ensure you have the newest update
Merged and closed, please give it a shot @nukesean - you can run
Check for extension Updatesto 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.
I can see that, same happens here - we'll take a look 🙂
@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.
Ooh exciting, I have a fix that works this time. Will test for a few days and create a new PR
@nukesean can you update your extension and verify the fix?
@omarshahine I can confirm the duplicated portion is deleted within a few ms of the command opening. Thanks!
Fantastic
