Conversation
…ards Extend prebuilt dashboard configs with an OnboardingConfig that shows onboarding panels when selected projects lack relevant telemetry data. Supports three variants: module-based (generic Insights onboarding), custom (lazy-loaded AI Agent/MCP onboarding), and overview (multi-flag check for dashboards like Backend Overview). All 28 prebuilt dashboard configs now declare their onboarding type, and the PrebuiltDashboardRenderer conditionally renders the appropriate onboarding panel instead of dashboard widgets. Refs DAIN-1207 Co-Authored-By: Claude <noreply@anthropic.com>
Inline the ModulesOnboarding gate logic directly into PrebuiltDashboardOnboardingGate instead of wrapping children. Extract props interface, rename projectFlags to requiredProjectFlags, update overview descriptions to mention tracing, and improve the overview onboarding panel layout with max-width constraint. Refs DAIN-1207 Co-Authored-By: Claude <noreply@anthropic.com>
Rename OverviewOnboardingPanel to GenericOnboarding, remove useEffect for reloading projects, and improve readability of the onboarding gate with clearer variable names and comments. Refs DAIN-1207 Co-Authored-By: Claude <noreply@anthropic.com>
…-1207-add-optional-onboarding-widgets-for-prebuilt-dashboard ; Conflicts: ; static/app/views/dashboards/detail.tsx ; static/app/views/dashboards/utils/prebuiltConfigs/mobileVitals/mobileVitals.ts
The merge conflict resolution incorrectly kept a useTimeseriesVisualization prop that was removed from master, causing TypeScript and Jest failures. Co-Authored-By: Claude <noreply@anthropic.com>
|
@sentry review |
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Session health dashboards permanently stuck showing onboarding
- I updated the module onboarding gate to honor
requiredProjectFlagsfor module dashboards, so session health dashboards render widgets when selected projects havehasSessionsdata.
- I updated the module onboarding gate to honor
Or push these changes by commenting:
@cursor push c748ebd052
Preview (c748ebd052)
diff --git a/static/app/views/dashboards/components/prebuiltDashboardOnboardingGate.tsx b/static/app/views/dashboards/components/prebuiltDashboardOnboardingGate.tsx
--- a/static/app/views/dashboards/components/prebuiltDashboardOnboardingGate.tsx
+++ b/static/app/views/dashboards/components/prebuiltDashboardOnboardingGate.tsx
@@ -44,9 +44,22 @@
return children;
}
+ const selectedProjects = getSelectedProjectList(
+ pageFilters.selection.projects,
+ projects
+ );
+ const hasRequiredProjectFlagData =
+ onboarding.requiredProjectFlags?.some(flag =>
+ selectedProjects.some(p => p[flag] === true)
+ ) ?? false;
+
// If the dashboard uses module-specific onboarding, check whether
// module-specific data is available
if (onboarding.type === 'module') {
+ if (hasRequiredProjectFlagData) {
+ return children;
+ }
+
if (!hasAnySpanData) {
return (
<ModuleLayout.Full>
@@ -66,16 +79,7 @@
return children;
}
- const selectedProjects = getSelectedProjectList(
- pageFilters.selection.projects,
- projects
- );
-
- const hasData = onboarding.requiredProjectFlags.some(flag =>
- selectedProjects.some(p => p[flag] === true)
- );
-
- if (hasData) {
+ if (hasRequiredProjectFlagData) {
return children;
}
static/app/views/dashboards/components/prebuiltDashboardOnboardingGate.tsx
Show resolved
Hide resolved
Session health dashboards were using type: 'module' with ModuleName.SESSIONS, but useHasFirstSpan excludes SESSIONS and always returns false — permanently showing the onboarding panel. Switch to type: 'overview' which correctly checks requiredProjectFlags instead. Co-Authored-By: Claude <noreply@anthropic.com>
DominikB2014
left a comment
There was a problem hiding this comment.
lgtm overall, although i think we can refactor this to be a bit simpler imo (but lmk what you think!). Regardless, a refactor isn't blocking
| | { | ||
| moduleName: ModulesWithOnboarding; | ||
| // Single-module onboarding: shows ModulesOnboardingPanel | ||
| type: 'module'; | ||
| requiredProjectFlags?: ProjectTelemetryFlag[]; | ||
| } | ||
| | { | ||
| componentId: 'agent-monitoring' | 'mcp'; | ||
| requiredProjectFlags: ProjectTelemetryFlag[]; | ||
| // Custom onboarding component (AI Agents, MCP) | ||
| type: 'custom'; | ||
| } | ||
| | { | ||
| description: string; | ||
| requiredProjectFlags: ProjectTelemetryFlag[]; | ||
| // Overview dashboard onboarding: shows a generic onboarding panel | ||
| // when NONE of the listed project flags are set | ||
| type: 'overview'; | ||
| }; |
There was a problem hiding this comment.
I do wonder if having three types is necessary here? custom and overview are very similar, overview seems like it could just be a custom with componentId: 'overview'?
In fact i'm wondering if we need types at all here, although it would require some rejigging, it feels simpler imo if each prebuilt config just mapped to the id of their onboarding component. If we didn't care about duplication, we could even just make this a function that returns a onboarding component.
There was a problem hiding this comment.
They do have slightly different behaviour because depending on the type of onboarding, it has to run different checks. Plus, the different onboarding components accept different kinds of props 😬

Extends the prebuilt dashboard configuration to optionally declare an onboarding condition so the renderer can show onboarding when no selected projects have relevant telemetry data.
Prebuilt dashboards always render widget grids, even when no selected projects have relevant telemetry. The Insights module pages handle this by checking project flags and showing onboarding panels, but
PrebuiltDashboardRendererhad no onboarding awareness. This adds anonboardingfield toPrebuiltDashboardconfigs with three variants:module— delegates to the existingModulesOnboardingflow (LegacyOnboarding + ModulesOnboardingPanel)custom— renders dedicated onboarding components for AI Agents and MCP dashboardsoverview— shows a generic onboarding panel for multi-module overview dashboards (backend, frontend, Next.js, Laravel) when none of the required project flags are sete.g.,
All 28 prebuilt dashboards now have onboarding configurations.
Refs DAIN-1207