Skip to content

Code Insights FE Hotfix: Fix inconsistent grid calculation state

Administrator requested to merge vk/hotfix-grid-calculation into main

Created by: vovakulikov

After this PR https://github.com/sourcegraph/sourcegraph/pull/28604 we started facing runtime problems with grid calculation state on the dashboard page with setting-based API.

TL;DR the problem was with the inconsistent state of grid layouts. During dashboard switching, we change our list of insights (different dashboards could have different amounts of insights). Prior to this fix we always had initial state of insight layouts even if those layouts were generated for the previous dashboard's insights

This PR adds recalculation when the SmartInsightsGrid component receives a new list of insights.

Merge request reports

Loading