Skip to content

Code Insights: refactor code insights dashboard interfaces

Administrator requested to merge vk/refactor-code-insights-dashboard-tyes into main

Created by: vovakulikov

Context

This is follow up for the refactoring insights TS models https://github.com/sourcegraph/sourcegraph/pull/32775

Prior to this PR, we had a few places in our code-base that were related primarily to the old way of fetching data with the usage of the setting-based backend API. Because of this, we had non-optimal interfaces and API methods. Since the setting-based backend was deprecated we can finally remove those interfaces and setting cascade-based peculiarities.

List of notable changes in the dashboard interface

  • Now we have only two types of dashboards - Custom and Virtual (the "All insights" dashboard), Prior to this PR we had a BuiltIn dashboard (that doesn't exist anymore in the GQL API)
  • The owner field has been removed and now we have owners field since in the GQL API we can share the dashboard across many "owners" (UI still does not allow sharing dashboard with many subjects but we will get there later)

Test plan

  • Make sure that all happy paths work properly, (creation, editing, delete operations over dashboards)
  • Make sure that this PR doesn't have any regressions in terms of data over-fetching (check out the network tab and see that code insights pages don't have loop/poison queries)

Merge request reports

Loading