Jump to content

Alfred doesn't keep up with script filters when typing quickly [Fixed 2.0.3 b184]


ClintonStrong
 Share

Recommended Posts

I'm using v2.0.2 (178) on OS X 10.8.3.

 

When I type quickly, Alfred doesn't update its results to reflect that query. Alfred still runs the script filter with the correct query, it just doesn't display the updated results.

 

I noticed this mostly seems to happen with slow scripts, like those that load network resources.

 

To replicate it, I just made a simple workflow that waits half a second before outputting the XML, and filters them based on your query. If I type "asdf" slowly, it shouldn't match any results. However, if I type it fast (or if I just mash all the keys at the same time), it shows the results as if I had only typed the first letter ("a"). (You can download the workflow here.) I confirmed that the script filter is being run with the correct query and is displaying the correct output (it writes to last_query.txt and last_output.xml in the workflow folder), but it looks like Alfred isn't keeping up and doesn't update the results.

 

Edit: Just to clarify, you can check last_query.txt and last_output.xml in the workflow folder after running it to see what the correct output should have been.

Edited by Clinton Strong
Link to comment
Share on other sites

I'm using v2.0.2 (178) on OS X 10.8.3.

 

When I type quickly, Alfred doesn't update its results to reflect that query. Alfred still runs the script filter with the correct query, it just doesn't display the updated results.

 

I noticed this mostly seems to happen with slow scripts, like those that load network resources.

 

To replicate it, I just made a simple workflow that waits half a second before outputting the XML, and filters them based on your query. If I type "asdf" slowly, it shouldn't match any results. However, if I type it fast (or if I just mash all the keys at the same time), it shows the results as if I had only typed the first letter ("a"). (You can download the workflow here.) I confirmed that the script filter is being run with the correct query and is displaying the correct output (it writes to last_query.txt and last_output.xml in the workflow folder), but it looks like Alfred isn't keeping up and doesn't update the results.

 

Edit: Just to clarify, you can check last_query.txt and last_output.xml in the workflow folder after running it to see what the correct output should have been.

 

This workflow doesn't seem to provide any results at all at character 3 or after, even if I type slowly. Are you sure this isn't something to do with your code? I made a similar workflow using my php class that included a .5 second sleep at the beginning and then added results and it seemed to work just as expected

Link to comment
Share on other sites

This workflow doesn't seem to provide any results at all at character 3 or after, even if I type slowly. Are you sure this isn't something to do with your code? I made a similar workflow using my php class that included a .5 second sleep at the beginning and then added results and it seemed to work just as expected

 

Here's a screenshot of the results I get (when I hit multiple keys at the same time): 

 

Screen%20Shot%202013-03-23%20at%206.44.1

 

To make sure it wasn't just my workflow, I made it write the query to last_query.txt and the XML output to last_output.xml. Here's the XML output from the command I ran to get that screenshot:

 

<?xml version='1.0'?>
<items/>

 

Despite returning XML with no results, Alfred was still showing a result.

 

Edit: There shouldn't be anything special about my workflow. I tried it with David's Faves workflow, and I get the same behavior: I type a query, but Alfred doesn't update its results to reflect that query.

Edited by Clinton Strong
Link to comment
Share on other sites

I did some more testing, and it looks like I misreported the error.

When a script filter returns either an empty set of XML results (like what I posted above) or any other output that isn't valid, Alfred continues to show those old results, rather than clearing them.

However, if I wait a bit and type another character, Alfred clears the results.

I'm not sure if this is intentional or not. If it is, should script filters display an item with a title of "No results found." instead? That gets around the issue, but you don't get the fallback searches like you normally would when no results were found.

Edited by Clinton Strong
Link to comment
Share on other sites

  • 2 weeks later...

I did some more testing, and it looks like I misreported the error.

I'm not sure if this is intentional or not. If it is, should script filters display an item with a title of "No results found." instead? That gets around the issue, but you don't get the fallback searches like you normally would when no results were found.

 

Just a quick update to say that from 2.0.3, the fallbacks will show in this scenario as I agree that Alfred should do what he always does when no results are found :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...