: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): let dashboard-update MCP tool toggle a tile's show_description (#110156)
posthog[bot]bbd89e3b4413
diff --git a/products/dashboards/backend/api/test/test_dashboard_openapi.py b/products/dashboards/backend/api/test/test_dashboard_openapi.pyindex a8628f11d874..4e3d2128cbf7 100644--- a/products/dashboards/backend/api/test/test_dashboard_openapi.py+++ b/products/dashboards/backend/api/test/test_dashboard_openapi.py@@ -79,6 +79,24 @@ class TestDashboardPatchOpenApiContract:f"layouts value instead of merging into it. Optional: {optional}.")+ def test_tile_show_description_documented_as_writable_patch_field(self) -> None:+ tiles_field = PatchedDashboardOpenApiSerializer().fields["tiles"]+ assert isinstance(tiles_field, serializers.ListSerializer)+ tile_serializer = tiles_field.child+ assert isinstance(tile_serializer, serializers.Serializer)+ tile_fields = tile_serializer.fields+ assert "show_description" in tile_fields, (+ "DashboardPatchTileOpenApiSerializer must document 'show_description' — DashboardSerializer.\n"+ "TILE_DISPLAY_FIELDS already accepts and persists it on PATCH, but it was missing from the "+ f"agent/MCP-facing OpenAPI schema. Got: {sorted(tile_fields)}."+ )+ show_description_field = tile_fields["show_description"]+ assert isinstance(show_description_field, serializers.BooleanField)+ assert not show_description_field.required, (+ "'show_description' must stay optional so a tile PATCH that only moves or resizes a tile "+ "doesn't have to restate it."+ )+def test_filters_documented_as_writable_patch_field(self) -> None:# filters is a SerializerMethodField on DashboardSerializer (read-only in the inferred schema),# so it is excluded from dashboard_patch_runtime_openapi_field_names(). The PATCH runtime accepts anddiff --git a/products/dashboards/backend/widget_specs/openapi.py b/products/dashboards/backend/widget_specs/openapi.pyindex 3163170aa639..9598696dbf0c 100644--- a/products/dashboards/backend/widget_specs/openapi.py+++ b/products/dashboards/backend/widget_specs/openapi.py@@ -291,6 +291,14 @@ class DashboardPatchTileOpenApiSerializer(serializers.Serializer):"that do not overlap, and include every tile you move in the same request."),)+ show_description = serializers.BooleanField(+ required=False,+ help_text=(+ "Whether to show the tile's description underneath its title on the dashboard. Works for every "+ "tile type. The description itself is unaffected and still comes from the tile's insight, text, "+ "or widget content — this only toggles whether it renders on the dashboard."+ ),+ )widget = DashboardPatchWidgetOpenApiSerializer(required=False, help_text="Nested widget row updates.")diff --git a/products/dashboards/frontend/generated/api.schemas.ts b/products/dashboards/frontend/generated/api.schemas.tsindex 38923d637fb0..14a5ba23620b 100644--- a/products/dashboards/frontend/generated/api.schemas.ts+++ b/products/dashboards/frontend/generated/api.schemas.ts@@ -1217,6 +1217,8 @@ export interface DashboardPatchTileOpenApiApi {id?: number/** Grid position and size per breakpoint. Works for every tile type, including insight tiles. A write replaces the tile's whole layout, so send a complete sm box rather than the one value you want to change. Boxes are stored as sent and overlaps are not resolved, so send sm boxes that do not overlap, and include every tile you move in the same request. */layouts?: _DashboardPatchTileLayoutsOpenApiApi+ /** Whether to show the tile's description underneath its title on the dashboard. Works for every tile type. The description itself is unaffected and still comes from the tile's insight, text, or widget content — this only toggles whether it renders on the dashboard. */+ show_description?: boolean/** Nested widget row updates. */widget?: DashboardPatchWidgetOpenApiApi}diff --git a/products/dashboards/frontend/generated/api.zod.ts b/products/dashboards/frontend/generated/api.zod.tsindex b2fc794dfa35..67ffd9aae107 100644--- a/products/dashboards/frontend/generated/api.zod.ts+++ b/products/dashboards/frontend/generated/api.zod.ts@@ -571,6 +571,12 @@ export const DashboardsPartialUpdateBody = /* @__PURE__ */ zod.describe("Grid position and size per breakpoint. Works for every tile type, including insight tiles. A write replaces the tile's whole layout, so send a complete sm box rather than the one value you want to change. Boxes are stored as sent and overlaps are not resolved, so send sm boxes that do not overlap, and include every tile you move in the same request."),+ show_description: zod+ .boolean()+ .optional()+ .describe(+ "Whether to show the tile's description underneath its title on the dashboard. Works for every tile type. The description itself is unaffected and still comes from the tile's insight, text, or widget content — this only toggles whether it renders on the dashboard."+ ),widget: zod.object({id: zoddiff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex b62c1980f3f2..dda2627c34d5 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -27508,6 +27508,8 @@ export namespace Schemas {id?: number;/** Grid position and size per breakpoint. Works for every tile type, including insight tiles. A write replaces the tile's whole layout, so send a complete sm box rather than the one value you want to change. Boxes are stored as sent and overlaps are not resolved, so send sm boxes that do not overlap, and include every tile you move in the same request. */layouts?: _DashboardPatchTileLayoutsOpenApi;+ /** Whether to show the tile's description underneath its title on the dashboard. Works for every tile type. The description itself is unaffected and still comes from the tile's insight, text, or widget content — this only toggles whether it renders on the dashboard. */+ show_description?: boolean;/** Nested widget row updates. */widget?: DashboardPatchWidgetOpenApi;}diff --git a/services/mcp/src/generated/dashboards/api.ts b/services/mcp/src/generated/dashboards/api.tsindex da3d704283f8..60e04272e259 100644--- a/services/mcp/src/generated/dashboards/api.ts+++ b/services/mcp/src/generated/dashboards/api.ts@@ -486,6 +486,12 @@ export const DashboardsPartialUpdateBody = () => zod.describe("Grid position and size per breakpoint. Works for every tile type, including insight tiles. A write replaces the tile's whole layout, so send a complete sm box rather than the one value you want to change. Boxes are stored as sent and overlaps are not resolved, so send sm boxes that do not overlap, and include every tile you move in the same request."),+ show_description: zod+ .boolean()+ .optional()+ .describe(+ "Whether to show the tile's description underneath its title on the dashboard. Works for every tile type. The description itself is unaffected and still comes from the tile's insight, text, or widget content — this only toggles whether it renders on the dashboard."+ ),widget: zod.object({id: zoddiff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.jsonindex 47bba1dde779..47aba33d6e49 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/dashboard-update.json@@ -249,6 +249,10 @@"required": ["sm"],"type": "object"},+ "show_description": {+ "description": "Whether to show the tile's description underneath its title on the dashboard. Works for every tile type. The description itself is unaffected and still comes from the tile's insight, text, or widget content — this only toggles whether it renders on the dashboard.",+ "type": "boolean"+ },"widget": {"description": "Nested widget row updates.","properties": {