insights: Simple version of "click in to dig in" for insights over all repos
Created by: Joelkw
Right now we have the ability to click to a diff search for insights over some repositories when explicitly scoped, but not for "all repositories."
The main reason is that we disable this in the UI, with the logic being that sometimes all repositories is > 10,000 repositories, which is the diff search limit.
But many customers do not have >10k repos, and even for those who do, they can choose to filter these insights down after creation.
So, we should
- Enable the exact same diff click functionality for all-repo insights that we have on scoped-repo-list insights
- If the customer has currently filtered the all-repo insight when they click using a
repo:tag or a-repo:tag, we should include that in the query (we already have some of this logic on the frontend-only insights)- Note that currently means that if they have input a repo filter – even if they have not saved that filter in any way – if the graph shows them the results of the filter (which it does, even before you save) then the filter needs to make it into the "click in for details" diff query
- If the customer has >10,000 repositories that would need to be queried, either because they (a) did not use a (-)repo filter and have 10k+ repos on the instance or (b) did use a (-)repo filter and have >10k repos in the filter, we can still run the search. We should just let the search error handle this (not perfect, but way better than not having this feature for all the other users):
