Persistent search results for Find In All Scripts

I often use Find In All Scripts to display me a list of things I need to check/do/modify/etc. When I’ve finished a particular script, I collapse it so that it doesn’t take up space in search results and so that I know it has been completed. (For this use case it’s annoying that scripts with many search results get collapsed automatically, but that’s manageable.)

However, minimizing the studio window will cause the state of the search results to be reset completely when I return to it. This is very annoying because I lose all markers of progress in my trawl through many different scripts.

(Minimal repro: Create a new script, search “Hello world”, collapse the search result, minimize Studio, then open it again and observe the search result has been expanded.)

Unfortunately, this problem becomes even worse because search results are not ordered deterministically, so when search results are refreshed the order of results may be completely different. So I can’t even quickly get my progress back by finding the last script I remember visiting and collapsing everything above it, since there may be unvisited scripts above it now.

I would be happy if this automatic refreshing behaviour was disabled, but I understand there may be valid reasons to keep it, so I don’t believe this is where the problem should be solved.

Instead, to solve this issue I have two suggestions:

  1. Make search results have a deterministic order, so that results can be read quickly and relied upon.

    • I would also find deterministic ordering useful for other use cases, such as comparing the search results for the same search term in two different place files which may or may not share many scripts.
  2. Persistence of UI state through automatic search refreshes, with some extra bobs and whistles

    • Keeping collapse/expand state (maybe with some diffing to inform us of any results which have changed since we last collapsed a particular script)
    • Manual script tracking, so that we can say “I’m done with this script” and then keep that information around and displayed in the search results UI until we are done with it. (I also think the information should persist through multiple searches and only be reset manually, but that’s not as big of a deal to me).

Thanks :slight_smile:

2 Likes