Skip to content

feat(dashboards): add error tracking dashboard widget (8/11)#60524

Merged
MattPua merged 31 commits into
masterfrom
05-28-feat_dashboards_add_error_tracking_dashboard_widget
Jun 3, 2026
Merged

feat(dashboards): add error tracking dashboard widget (8/11)#60524
MattPua merged 31 commits into
masterfrom
05-28-feat_dashboards_add_error_tracking_dashboard_widget

Conversation

@MattPua
Copy link
Copy Markdown
Member

@MattPua MattPua commented May 28, 2026

Problem

Dashboards need embeddable product widgets beyond insights. Error tracking issues are the first list-style widget: a ranked table of top issues that fits the WidgetCard shell and establishes patterns later widgets (session replay, etc.) reuse.

This PR is 8/11 in the dashboard widgets Graphite stack (WidgetCard shell #60523 is merged).

Changes

  • error_tracking_list widget — catalog/registry entry, backend runner, config schema, preview, and full frontend tile (component, edit modal, stories, tests)
  • ErrorTrackingIssueList extraction — shared list component + skeleton for dashboard embedding without pulling in the full error tracking scene
  • Shared edit-modal infrastructureeditWidgetModalBuilders, tile/filter section components, buildWidgetTileMetadataPatch, and kea patterns both widget types inherit
  • Shared dashboard tile orchestration (used by all widget types on this branch):
    • Single PATCH save via updateWidgetTile / updateDashboardWidgetTile (config + name + description)
    • useAsyncActions so edit modals await save before closing
    • Refresh widget data after duplicate
    • Unknown widget types: header + ⋯ menu stay usable; body-only ErrorBoundary (no fetch-error refresh UI)
    • Catalog setup prompts use stacked vertical WidgetCardProductIntroduction
    • New widgets append to the bottom row of the layout (not lowest-segment gap fill)
    • Server analytics: dashboard widget added alongside existing dashboard tile added
  • Catalog header defaultsgetDashboardWidgetCatalogEntry / tryGetDashboardWidgetCatalogEntry resolve layout and header metadata
  • Review follow-ups — validation wiring, table layout/sparkline fixes, kea typegen-safe modal logic, Storybook/VR baseline updates

How did you test this code?

  • Agent: Jest for error tracking widget, edit modal, registry, add-widget modal, config validation, DashboardWidgetItem, and dashboardLogic widget tile updates
  • Agent: backend test_dashboard_widgets, test_run_widgets, and test_widget_layouts
  • Feature remains behind the dashboard widgets feature flag

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

Automatic notifications

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

Docs update

Add the skip-inkeep-docs label — no user-facing docs yet (feature flagged). Agent skill/docs land in #60516.

🤖 Agent context

@MattPua MattPua changed the title feat(dashboards): add error tracking dashboard widget feat(dashboards): add error tracking dashboard widget (9/11) May 28, 2026
@MattPua MattPua changed the title feat(dashboards): add error tracking dashboard widget (9/11) feat(dashboards): add error tracking dashboard widget (8/11) May 28, 2026
@MattPua MattPua changed the title feat(dashboards): add error tracking dashboard widget (8/11) feat(dashboards): add error tracking dashboard widget (9/12) May 28, 2026
@MattPua MattPua changed the title feat(dashboards): add error tracking dashboard widget (9/12) feat(dashboards): add error tracking dashboard widget (8/11) May 28, 2026
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_widgetcard_shell branch from 07b7d6a to fa6e73b Compare May 28, 2026 20:20
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_error_tracking_dashboard_widget branch from 2a164c8 to bb392df Compare May 28, 2026 20:20
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_widgetcard_shell branch from fa6e73b to 2a33a0c Compare May 28, 2026 20:28
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_error_tracking_dashboard_widget branch 2 times, most recently from 19de44b to 72c7562 Compare May 28, 2026 20:35
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_widgetcard_shell branch from 2a33a0c to 58653c9 Compare May 28, 2026 20:35
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_error_tracking_dashboard_widget branch from 72c7562 to 5d90bb4 Compare May 28, 2026 20:43
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_widgetcard_shell branch from 58653c9 to 400ebc6 Compare May 28, 2026 20:43
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_error_tracking_dashboard_widget branch from 5d90bb4 to c96af34 Compare May 28, 2026 20:51
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_widgetcard_shell branch from 400ebc6 to 067652e Compare May 28, 2026 20:51
@MattPua MattPua marked this pull request as ready for review May 28, 2026 20:53
@MattPua MattPua force-pushed the 05-28-feat_dashboards_add_error_tracking_dashboard_widget branch from c96af34 to c8c9156 Compare May 28, 2026 20:55
MattPua and others added 28 commits June 3, 2026 12:14
Remove deprecated error_tracking alias, align zod limit default with backend,
simplify config validation via zod, remount edit modal form on open, and
inline one-off layout constants.

Co-authored-by: Cursor <cursoragent@cursor.com>
Delete WidgetSettingsModalSections, move modal state into kea logic, and
map API config errors via zod instead of parsing backend message strings.

Co-authored-by: Cursor <cursoragent@cursor.com>
use catalog header title in remove-toast assertions, fix DashboardWidgetCatalogKey
typing, drop session replay story decorator from ET branch, and patch strict TS in
widget modal and issue list tests
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
The Loading story intentionally renders skeletons; VR must not wait for them to disappear.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract shared widgetLimitFieldSchema, simplify validation with a flat
zod form schema and typed ErrorTrackingWidgetConfig, tighten modal
structure, and use standard tailwind sizing in ErrorTrackingIssueList.

Co-authored-by: Cursor <cursoragent@cursor.com>
… review

Remove widget type aliases, infer group labels from groupId, move form schema to configSchemas, extract shared edit-modal tile helpers, and trim default config to non-default fields only.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extract shared edit-modal builders and filters section, default catalog header meta/layout, remove disableLinks prop, and inline skeleton row count.

Co-authored-by: Cursor <cursoragent@cursor.com>
throw on unknown widget types, drop edit modal barrel/types files,
move ErrorTrackingWidgetResult colocated, fix orderBy reducer and
z.flattenError typing, remove stale alias registry test

Co-authored-by: Cursor <cursoragent@cursor.com>
…arklines

request listing volume resolution in run_widgets, widen fixed grid columns,
and keep horizontal scroll in the issue list

Co-authored-by: Cursor <cursoragent@cursor.com>
…st failures

Inline edit modal reducers for kea-typegen compatibility, fix saving reducer
payload signatures, and guard unknown widget types in tile layout catalog lookup.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ount

Add vertical hogLayout to ProductIntroduction, stacked widget introduction
layout, and mount filterTestAccountsDefaultsLogic in story fixtures.

Co-authored-by: Cursor <cursoragent@cursor.com>
14 updated
Run: a69eda04-55af-4645-8010-ec6c89077815

Co-authored-by: MattPua <3376526+MattPua@users.noreply.github.com>
Duplicate tile creates a new widget row but never fetched run_widgets for it,
so the copy showed the empty state until a full dashboard refresh.
Batch name and description into one metadata tiles PATCH, await config and
metadata saves via loaders, deep-merge widget fields in dashboard state, and
reveal hidden descriptions in the same metadata request.
Collapse edit-modal saves into updateWidgetTile so dashboardsPartialUpdate
sends config, name, and description together instead of two PATCHes.
Return null from the updateWidgetTile loader so kea infers Promise<null>
instead of Promise<DashboardTile | null>, which broke Frontend typechecking.
Move catalog/registry lookup into a child rendered inside ErrorBoundary
so prop evaluation in the parent no longer crashes the whole dashboard.
Use useAsyncActions for updateWidgetTile so modal onSave waits for the
PATCH to finish before closing and can surface config validation errors.
Fire an explicit server-side event when widget tiles are created, with
widget_type, tile_id, widget_id, and request source (web, mcp, api).
Resolve catalog metadata for the header without throwing, and scope the
error boundary to the card body so remove/edit menu actions stay usable.
Skip fetch-error UI and refresh actions when the widget type is not
registered locally so the body renders the full error boundary instead.
Match error tracking widget setup UX: always-vertical
WidgetCardProductIntroduction and centered CTA for availability gates.
…lling

Use bottom-row placement for widget batch adds so tiles land under the
tallest existing tile rather than in lowest open segments mid-layout.
session_replay_list is registered on the SR stack PR, not ET. The batch
analytics event is already covered for error_tracking_list here.
… full

Use dashboard bottom y for the fallback placement instead of reusing the
current row, and hoist ERROR_TRACKING_LISTING_VOLUME_RESOLUTION import.

Co-authored-by: Cursor <cursoragent@cursor.com>
Each widget registry entry owns parseConfigApiError so utils.ts no longer
switches on widget type when mapping dashboard PATCH failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tests-posthog
Copy link
Copy Markdown
Contributor

tests-posthog Bot commented Jun 3, 2026

⏭️ Skipped snapshot commit because branch advanced to 381bd28 while workflow was testing f5df806.

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

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.

2 participants