: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
feat(dashboards): add plain-language description to default app dashboards (#59046)
Matt Puad39edcfb0f89
diff --git a/posthog/api/test/dashboards/test_dashboard.py b/posthog/api/test/dashboards/test_dashboard.pyindex 58f892ac0958..9691a01f687f 100644--- a/posthog/api/test/dashboards/test_dashboard.py+++ b/posthog/api/test/dashboards/test_dashboard.py@@ -1290,7 +1290,7 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):"dashboard_id": None,"duplicated": False,"from_template": True,- "has_description": False,+ "has_description": True,"is_shared": False,"item_count": 6,"pinned": False,diff --git a/posthog/api/test/test_signup.py b/posthog/api/test/test_signup.pyindex f42f6ddadabd..8f7b80ce9e85 100644--- a/posthog/api/test/test_signup.py+++ b/posthog/api/test/test_signup.py@@ -639,6 +639,11 @@ class TestSignupAPI(APIBaseTest):self.assertEqual(dashboard.team, user.team)self.assertEqual(dashboard.tiles.count(), 6)self.assertEqual(dashboard.name, "My App Dashboard")+ self.assertEqual(+ dashboard.description,+ "A starter view of how people use your app: how many visit, whether they come back, "+ "where traffic comes from, and how they move through your pages.",+ )self.assertEqual(Dashboard.objects.filter(team=user.team).count(), 1)@mock.patch("social_core.backends.base.BaseAuth.request")diff --git a/posthog/models/team/team.py b/posthog/models/team/team.pyindex fb9777fdfcd0..342ddde24382 100644--- a/posthog/models/team/team.py+++ b/posthog/models/team/team.py@@ -40,6 +40,7 @@ from posthog.settings.utils import get_listfrom products.customer_analytics.backend.constants import DEFAULT_ACTIVITY_EVENTfrom products.dashboards.backend.models.dashboard import Dashboard+from products.dashboards.backend.models.dashboard_templates import DashboardTemplatefrom ...hogql.modifiers import set_default_modifier_valuesfrom ...schema import CurrencyCode, HogQLQueryModifiers, PathCleaningFilter, PersonsOnEventsMode@@ -126,7 +127,13 @@ class TeamManager(models.Manager):team.extra_settings.setdefault("recorder_script", "posthog-recorder")# Create default dashboards- dashboard = Dashboard.objects.db_manager(self.db).create(name="My App Dashboard", pinned=True, team=team)+ default_app_template = DashboardTemplate.original_template()+ dashboard = Dashboard.objects.db_manager(self.db).create(+ name="My App Dashboard",+ pinned=True,+ team=team,+ description=default_app_template.dashboard_description or "",+ )create_dashboard_from_template("DEFAULT_APP", dashboard)team.primary_dashboard = dashboarddiff --git a/products/dashboards/backend/models/dashboard_templates.py b/products/dashboards/backend/models/dashboard_templates.pyindex 44ea417b6444..35db4b9201c9 100644--- a/products/dashboards/backend/models/dashboard_templates.py+++ b/products/dashboards/backend/models/dashboard_templates.py@@ -68,7 +68,10 @@ class DashboardTemplate(UUIDTModel, RootTeamMixin):"""return DashboardTemplate(template_name="Product analytics",- dashboard_description="",+ dashboard_description=(+ "A starter view of how people use your app: how many visit, whether they come back, "+ "where traffic comes from, and how they move through your pages."+ ),dashboard_filters={},tiles=[{