Skip to content

Code Insights: Adopt built-in fetchers for search based and code stats insights

Administrator requested to merge vk/create-built-in-insight-fetch-system into main

Created by: vovakulikov

Closes part of https://github.com/sourcegraph/sourcegraph/issues/24236

Context

This PR implements the first item from this issue migration plan https://github.com/sourcegraph/sourcegraph/issues/24236

Migrate data-fetchers from the extensions insight codebases to the main sg app (in this step for the dashboard page only). By this, we get rid of extension API on the dashboard page that can solve this issue with extension insight activation problem

With that PR we don't have extension API in the code insights codebase anymore. All supportable insights (search-based, code-stats) work either by Backend gql or Search API (also gql API but we fetch a few search-based gql handlers to collect and process data on the FE)

Tech details

  • Re-use built-in fetchers that previously were used only for the live-preview charts but now are used for the dashboard and other code insights views.
  • Re-use code-insights card components at the directory and the homepage.
  • Fixed Pie chart loading fetcher (support filename path, it's important for the directory page)

Work in progress (non-review blockers)

Integrations tests have been broken by that changes due we don't use extension API. In order not to increase the size of this PR broken tests will be muted and fixed in this PR https://github.com/sourcegraph/sourcegraph/pull/24646

Merge request reports

Loading