Diff/commit search UX over thousands of repositories is extremely poor
Created by: slimsag
Use case from a customer (generalized for anonymity)
There has been a critical change somewhere in one of our repositories from URL A to URL B and I need to know where that change was made. I don't know which repository changed it, just the previous value URL A and I need to find a diff with that.
Issue
Diff and commit search is unindexed because we built it with the assumption that most use cases would involve searching in a small set of repositories. A side effect of this is that the UX is extremely poor when actually trying to do diff/commit search over thousands of repositories, even in the up-and-coming UX redesign.
For example, the following query: https://k8s.sgdev.org/search?q=type:diff+jre8
Most of the repositories here have timed out, because we just simply cannot handle searching that many all at once. There isn't a way to go through the results by e.g. scrolling either, because again most repositories timed out.
Assuming you do see the timeout warning (it doesn't stick out much), specifying a larger timeout parameter won't always help. For example specifying the max timeout:2m
ends up showing the following error since we're now hitting a single empty repository and not finding results in the others quick enough (we are searching others, though):
https://k8s.sgdev.org/search?q=type:diff+jre8+timeout:2m
Solution: Option 1
The most obvious solution is to warn people that we don't expect them to search thousands of repositories with diff search at once:
- Provide the user with an error indicating to reduce the number of repositories being searched over by using a
repo:
regex. - Indicate that doing a text search first to find the repositories you are interested in may help.
Solution: Option 2
Make the UX around search more clear that diff/commit search is targeted towards a subset of repositories and not a global search. This is a design question.
Reported by a user at https://app.hubspot.com/contacts/2762526/company/407948923