Skip to content

docs(dashboards): add agent skills and contributing docs for dashboard widgets (1/4)#60516

Merged
MattPua merged 2 commits into
masterfrom
05-28-chore_dashboards_add_dashboard_widgets_docs
Jun 3, 2026
Merged

docs(dashboards): add agent skills and contributing docs for dashboard widgets (1/4)#60516
MattPua merged 2 commits into
masterfrom
05-28-chore_dashboards_add_dashboard_widgets_docs

Conversation

@MattPua
Copy link
Copy Markdown
Member

@MattPua MattPua commented May 28, 2026

Problem

Agents and contributors need a single playbook for adding dashboard widget types — file paths, catalog/registry wiring, availability gating, client-side composition patterns, and a checklist for new types.

This PR is 1/4 in the open dashboard widgets stack (docs → placeholders → SLOs → OpenAPI), rebased onto master after #60497 merged.

Changes

  • .agents/skills/dashboard-widgets/ skill with architecture, composition, availability, permissions, pitfalls, and new-widget checklist references
  • products/dashboards/CONTRIBUTING.md for widget type authors
  • Docs aligned with shipped stack behavior:
    • Single PATCH tile save: updateWidgetTile / updateDashboardWidgetTile + buildWidgetTileMetadataPatch (not split config/metadata loaders)
    • Unknown widget types: tryGetDashboardWidgetCatalogEntry header fallback + body-only ErrorBoundary
    • RBAC via widgetProductAccess.ts / WIDGET_PRODUCT_ACCESS_CHECKS (not a switch in DashboardWidgetItem)
    • Analytics: dashboard tile added and dashboard widget added on first insert
    • New widgets append to bottom row; duplicate tile triggers refreshDashboardWidgets
    • Stacked vertical WidgetCardProductIntroduction for catalog setup prompts
    • Edit modals: shared kea actions from editWidgetModalBuilders.ts (spread actions, inline reducers); shared validation via widgetConfigValidation.ts
    • Catalog: groupId + DASHBOARD_WIDGET_GROUP_LABELS; omit redundant headerLayout / headerMeta defaults; previews in DASHBOARD_WIDGET_PREVIEWS

How did you test this code?

  • Agent: reviewed skill/checklist paths against error_tracking_list and session_replay_list implementations; no runtime doc verification

👉 Stay up-to-date with PostHog coding conventions for a smoother review.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

This PR is the docs update. Add the skip-inkeep-docs label.

🤖 Agent context

Copy link
Copy Markdown
Member Author

MattPua commented May 28, 2026

@MattPua MattPua mentioned this pull request May 28, 2026
@MattPua MattPua force-pushed the 05-28-chore_dashboards_add_dashboard_widgets_docs branch from ac7f208 to ca8308d Compare May 28, 2026 19:39
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_mcp_tools_for_dashboard_widgets branch from cf1fe09 to bb15662 Compare May 28, 2026 19:39
@MattPua MattPua changed the title chore(dashboards): add agent skills and contributing docs for dashboard widgets docs(dashboards): add agent skills and contributing docs for dashboard widgets (10/10) May 28, 2026
@MattPua MattPua marked this pull request as ready for review May 28, 2026 19:40
@MattPua MattPua requested a review from gewenyu99 May 28, 2026 19:40
Copy link
Copy Markdown
Member Author

MattPua commented May 28, 2026

@gewenyu99 if i could get some of your quick scanning if this is the optimum way to write a skill here for the widgets, that would be much appreciated

@assign-reviewers-posthog assign-reviewers-posthog Bot requested review from a team May 28, 2026 19:41
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 28, 2026

Reviews (1): Last reviewed commit: "chore(dashboards): add agent skills and ..." | Re-trigger Greptile

@MattPua MattPua removed request for a team May 28, 2026 19:42
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_mcp_tools_for_dashboard_widgets branch from 56d18fa to d374b34 Compare May 28, 2026 19:43
@MattPua MattPua force-pushed the 05-28-chore_dashboards_add_dashboard_widgets_docs branch 2 times, most recently from 05b6772 to 9c2ab4d Compare May 28, 2026 20:08
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_mcp_tools_for_dashboard_widgets branch from a31a1d0 to ef958f5 Compare May 28, 2026 20:08
@MattPua MattPua force-pushed the 05-28-chore_dashboards_add_dashboard_widgets_docs branch 3 times, most recently from eb3dc99 to dcf2941 Compare June 1, 2026 17:32
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_mcp_tools_for_dashboard_widgets branch 2 times, most recently from d88ec05 to 46da118 Compare June 1, 2026 17:39
@MattPua MattPua force-pushed the 05-28-chore_dashboards_add_dashboard_widgets_docs branch 2 times, most recently from 0dbf944 to c7cc186 Compare June 1, 2026 20:47
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_mcp_tools_for_dashboard_widgets branch 2 times, most recently from a97cc56 to e4d7d2a Compare June 1, 2026 20:52
@MattPua MattPua force-pushed the 05-28-chore_dashboards_add_dashboard_widgets_docs branch 2 times, most recently from 4831687 to 456423e Compare June 1, 2026 21:01
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_mcp_tools_for_dashboard_widgets branch from 1d9143e to 64db5b4 Compare June 1, 2026 21:01
@MattPua MattPua force-pushed the 05-28-chore_dashboards_add_dashboard_widgets_docs branch from 456423e to 8fde0cf Compare June 1, 2026 21:22
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_mcp_tools_for_dashboard_widgets branch from f2c2fa2 to b960c05 Compare June 1, 2026 21:22
Comment thread .agents/skills/dashboard-widgets/references/checklist-new-widget-type.md Outdated
Copy link
Copy Markdown
Contributor

@vdekrijger vdekrijger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious to see the value of these kind of skills in due time 😃!

Good call to explore this! In my mind I feel like "readable/maintainable" code helps the LLM reach similar goals and avoids the need for a dedicated skill, but TBH the landscape is so new that anything is possible, thus super curious to see the results over time vs the potential to get outdated:smiley:

Comment thread .agents/skills/dashboard-widgets/SKILL.md Outdated
Copy link
Copy Markdown
Contributor

@vdekrijger vdekrijger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if valuable, but here is some output from my review skill:

  ┌─────┬──────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────┬──────────┬──────────────────────────────────────┐
  │  #  │                                   File                                   │                 Line                 │   Sev    │               Finding                │
  ├─────┼──────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼──────────┼──────────────────────────────────────┤
  │ ✅1 │ .agents/skills/dashboard-widgets/references/checklist-new-widget-type.md │ checklist step 5b ↔ composition ~661 │ 🟠 HIGH  │ direct contradiction on exporting    │
  │     │  ↔ .agents/skills/dashboard-widgets/references/composition.md            │                                      │          │ Kea decorators from *.stories.tsx    │
  ├─────┼──────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼──────────┼──────────────────────────────────────┤
  │     │                                                                          │                                      │          │ points agents to                     │
  │ ✅2 │ .agents/skills/dashboard-widgets/references/mcp.md                       │ move-tile rows (diff ~1044/1068)     │ 🔵 LOW   │ dashboards-move-tile-partial-update, │
  │     │                                                                          │                                      │          │  which is enabled: false             │
  ├─────┼──────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼──────────┼──────────────────────────────────────┤
  │ ✅3 │ .agents/skills/dashboard-widgets/ (whole skill)                          │ general                              │ 🟠 HIGH  │ per-type touch-list duplicated       │
  │     │                                                                          │                                      │ (xp)     │ across 5 files                       │
  ├─────┼──────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼──────────┼──────────────────────────────────────┤
  │     │                                                                          │                                      │          │ required_scopes docs-only / RBAC     │
  │ ✅  │ .agents/skills/dashboard-widgets/references/permissions-and-sharing.md   │ general                              │ 🟡 MED   │ rule restated ~8× (twice in single   │
  │     │                                                                          │                                      │          │ files)                               │
  ├─────┼──────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼──────────┼──────────────────────────────────────┤
  │ ✅  │ .agents/skills/dashboard-widgets/references/layout-and-ux.md             │ general                              │ 🟡 MED   │ tile min/max-size rule restated ~7×  │
  ├─────┼──────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼──────────┼──────────────────────────────────────┤
  │ ✅  │ .agents/skills/dashboard-widgets/references/architecture.md              │ ~167–180                             │ 🔵 LOW   │ registry code snippet duplicated     │
  │     │                                                                          │                                      │          │ verbatim with checklist §7           │
  ├─────┼──────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼──────────┼──────────────────────────────────────┤
  │     │                                                                          │                                      │          │ frontmatter description / "when to   │
  │ ✅  │ .agents/skills/dashboard-widgets/SKILL.md                                │ ~9–14 / ~25–39                       │ 🔵 LOW   │ use" overlap; hardcoded counts       │
  │     │                                                                          │                                      │          │ (11/11, migration anchor, constants) │
  │     │                                                                          │                                      │          │  will rot                            │
  ├─────┼──────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┼──────────┼──────────────────────────────────────┤

In general it claims that there is a lot of duplication that can be improved. But again as things change fast, I don't know how "bad" this in terms of context clutter is, or if this helps agents give priority to things.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

MCP UI Apps size report

App JS CSS
debug 478.6 KB 144.8 KB
action 353.1 KB 144.8 KB
action-list 360.9 KB 144.8 KB
cohort 352.1 KB 144.8 KB
cohort-list 359.9 KB 144.8 KB
error-details 373.5 KB 144.8 KB
error-issue 352.8 KB 144.8 KB
error-issue-list 360.8 KB 144.8 KB
experiment 357.3 KB 144.8 KB
experiment-list 361.7 KB 144.8 KB
experiment-results 359.4 KB 144.8 KB
feature-flag 438.0 KB 144.8 KB
feature-flag-list 442.5 KB 144.8 KB
feature-flag-testing 430.8 KB 144.8 KB
insight-actors 355.9 KB 144.8 KB
llm-costs 355.6 KB 144.8 KB
session-recording 353.9 KB 144.8 KB
session-summary 359.9 KB 144.8 KB
survey 353.7 KB 144.8 KB
survey-global-stats 358.5 KB 144.8 KB
survey-list 361.6 KB 144.8 KB
survey-stats 358.5 KB 144.8 KB
trace-span 352.5 KB 144.8 KB
trace-span-list 360.8 KB 144.8 KB
workflow 352.5 KB 144.8 KB
workflow-list 360.2 KB 144.8 KB
query-results 375.9 KB 144.8 KB
visual-review-snapshots 357.1 KB 144.8 KB

@MattPua
Copy link
Copy Markdown
Member Author

MattPua commented Jun 3, 2026

Re-enabled dashboards-move-tile-partial-update on #60497 (dafe10583a): was enabled: false in tools.yaml so the MCP regen dropped it from tool-definitions-all.json. Handler now uses dashboards_move_tile_partial_update + PATCH (was wrongly mapped to Create/POST). Docs branch restacked + skill MCP ref updated.

@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented Jun 3, 2026

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented Jun 3, 2026

⏭️ Skipped snapshot commit because branch advanced to d0d0028 while workflow was testing 7487807.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented Jun 3, 2026

⏭️ Skipped snapshot commit because branch advanced to 508fec9 while workflow was testing d0d0028.

The new commit will trigger its own snapshot update workflow.

If you expected this workflow to succeed: This can happen due to concurrent commits. To get a fresh workflow run, either:

  • Merge master into your branch, or
  • Push an empty commit: git commit --allow-empty -m 'trigger CI' && git push

@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented Jun 3, 2026

Query snapshots: Backend query snapshots updated

Changes: 1 snapshots (1 modified, 0 added, 0 deleted)

What this means:

  • Query snapshots have been automatically updated to match current output
  • These changes reflect modifications to database queries or schema

Next steps:

  • Review the query changes to ensure they're intentional
  • If unexpected, investigate what caused the query to change

Review snapshot changes →

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2026

🎭 Playwright report · View test results →

⚠️ 2 flaky tests:

  • service filter passes serviceNames to API (chromium)
  • Change date range and toggle comparison (chromium)

These issues are not necessarily caused by your changes.
Annoyed by this comment? Help fix flakies and failures and it'll disappear!

@deployment-status-posthog
Copy link
Copy Markdown

deployment-status-posthog Bot commented Jun 3, 2026

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-06-03 23:10 UTC Run
prod-us ✅ Deployed 2026-06-03 23:36 UTC Run
prod-eu ✅ Deployed 2026-06-03 23:41 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants