:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(dashboard): show queued state before empty state during refresh (#69749)
Matt Pua4dcebbad6f24
diff --git a/frontend/src/scenes/dashboard/dashboardLogic.tsx b/frontend/src/scenes/dashboard/dashboardLogic.tsxindex 3ae623cdfb55..8cec7a077c8f 100644--- a/frontend/src/scenes/dashboard/dashboardLogic.tsx+++ b/frontend/src/scenes/dashboard/dashboardLogic.tsx@@ -2545,18 +2545,20 @@ export const dashboardLogic = kea<dashboardLogicType>([let tilesAbortedCount = 0if (sortedTilesToRefresh.length > 0) {- await breakpoint()- actions.resetIntermittentFilters()-- // Pin the progress denominator to the batch size before enrolling the insights+ // Mark tiles as queued before the breakpoint's await, so there's no render gap+ // between the refreshDashboardItems reducer wiping refreshStatus to {} and it+ // being repopulated - otherwise tiles briefly show as "not queued" and fall+ // through to the query's default empty state instead of the loading state.actions.setRefreshTilesTotal(tilesStaleCount)- // Set refresh status for all insightsactions.setRefreshStatuses(sortedTilesToRefresh.map((tile) => tile.insight.short_id),false,true)+ await breakpoint()+ actions.resetIntermittentFilters()+actions.abortAnyRunningQuery()cache.abortController = new AbortController()const methodOptions: ApiMethodOptions = { signal: cache.abortController.signal }