Code Insights drilldown features v2
Created by: jyavorska
Problem to solve
Insights provide "basic" drilldown via repo filters and diff search but now that we scale to >10k repos there are many drilldown features driven by customer feedback that we should add to continue to build our advantage over spreadsheets and other search solutions
Customers need to go from "here's an insight telling me something changed" to "where did it change, why did it change, and who changed it"
But the user flow to go back and forth between the graph charts and search results is lacking. Right now, you can jump to a diff search to show you the individual diff search results that contributed to an increase/decrease in a measure, but you can't answer questions like:
- Why is there such a significant dip at the end – which repositories contribute to this significant change?
- How do I tell when a specific series started to appear in the results?
- Which repositories are not changing?
- How do I tell which repositories contributed to the first matches of a particular series?
- What was the current state of the codebase in the past – where did these results come from? (A revision search, not a diff search between two datapoints).
Measure of success
For the core dev workflow: The number of unique users stepping into our "drilldown" search flow (design/metric TBD).
Prior: Primary: # of customers creating insights scoped with contexts; capture group insights, and clicking dig-in features; we will track "drilldown interations" via pings on the new features. The number of clicks/hovers and drilldown expands on individual graphs.
Secondary: qualitative feedback in competitive won sales that these features were key difference makers. We have early signal that tying code insights to search results more closely is a major feature differentiator compared to in-house tools or custom scripts, and we'll continue to watch for further statements this is the case.
Solution summary
We will make it easier to answer the above questions in as few clicks/interactions as possible.
RFC 561 has some early thoughts.
We will not, however, build this as a separate insights page, but instead build it more into the core workflow.
Artifacts:
What specific customers are we iterating on the problem and solution with?
- https://github.com/sourcegraph/accounts/issues/6312
- https://github.com/sourcegraph/accounts/issues/278
- https://github.com/sourcegraph/accounts/issues/280
- https://github.com/sourcegraph/accounts/issues/551
- https://github.com/sourcegraph/accounts/issues/8329
Impact on use cases
This enables all 5 use cases (because it applies to all code insight jobs to be done, letting you answer more specific questions like those above), but especially code health, code security, incident response, and code reuse.
For code reuse, this better enables insights to show you where and how people are reusing aspects of code. For code health, this lets you find and follow up with specific groups/repos/owners who are making progress or falling behind on a migration. For code security and incident response, this gives you at-a-glance better breakdown view of where vulnerabilities or incidents may be present in your code. For onboarding devs, this helps you find places your onboarding tooling may be missing or not maintained (docs, readmes).
Delivery plan
- Late Q2 / early Q3 – engineering / design collaboration
- Q3 - prototype and deliver with above customers