feat(inbox): surface health check issues as inbox signals#2711
Conversation
|
React Doctor found 1 issue in 1 file · 1 warning. 1 warning
Reviewed by React Doctor for commit |
|
7e1b9c5 to
f855ab4
Compare
Adds the health_checks / health_issue signal source everywhere source products surface, mirroring PostHog/posthog#61955 on the Cloud backend: the sources toggle grid (PostHog data column), responder roster, filter options, signal cards, and the mobile inbox — using the FirstAid plus-cross icon to match the Cloud health icon. Also dedupes the source-product vocabulary: EXTERNAL_INBOX_SOURCES is now the single place warehouse products are named (SourceProduct, ToggleableSourceProduct, and the api-client/analytics unions derive from it), a shared SourceType replaces the hand-written source_type union, and registry entries are alphabetized within their category groups. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
f855ab4 to
dd4ad5d
Compare
I feel like he really wanted to approve this
|
/trunk merge |
|
😎 Merged directly without going through the merge queue, as the queue was empty and the PR was up to date with the target branch - details. |

Problem
PostHog already detects instrumentation problems via health checks — missing events, reverse-proxy gaps, outdated SDKs, ingestion warnings, broken data-warehouse models — and surfaces them in the Health UI. PostHog/posthog#61955 wired those into the Signals inbox on the Cloud backend. This brings the same source surface to the Code app.
This is a from-scratch reimplementation (the original version of this PR predated the
EXTERNAL_INBOX_SOURCESregistry and the ~30 warehouse sources, so it no longer applied).Changes
health_checks/health_issuesignal sourceAdded everywhere source products surface, not gated behind a feature flag — per-team enablement is handled by
SignalSourceConfigon the Cloud backend, exactly like the other sources.health_checksinSourceProduct/ToggleableSourceProduct(@posthog/shared), inSignalSourceConfigwith the newhealth_issuesource type (@posthog/api-client), and in theSignalSourceConnectedanalytics event.signalSourceService(core) anduseSignalSourceToggles(UI), mapping tosource_type: "health_issue".SignalSourceToggles, an entry in the responder roster (responderAgentMeta), the source filter dropdown,SOURCE_PRODUCT_META, and a "Health checks · Issue" source line on detail signal cards.FirstAidIcon— phosphor's medical plus/cross — matching theIconHeartPluscross used in the Cloud PR (the earlier revision usedHeartbeatIcon), colored--crimson-9to echo Cloud'stext-dangerstyling.Source-vocabulary dedup (new in this revision)
The ~40-entry source-product union previously existed in five hand-synced copies. Now
EXTERNAL_INBOX_SOURCESininbox-types.tsis the single place warehouse products are named:ExternalInboxSourceProductis derived from the registry literals (as const satisfies);SourceProductis that plus the six PostHog-native products (alphabetical);ToggleableSourceProductis justExclude<SourceProduct, "llm_analytics" | "signals_scout">.SourceType(PostHog-native types +SignalRecordKind) replaces the hand-writtensource_typeunion.@posthog/api-clientSignalSourceConfigunions and the analyticsSignalSourceConnectedPropertiesunion are replaced with the shared types, and now-unneededascasts fell away.ExternalInboxSource.requiredTablesis nowreadonly string[](required by theas constregistry);schemasPayloadinDataSourceSetupwas adjusted accordingly.Tests
signalSourceService.test.ts:computeSourceValuesenableshealth_checksfrom its config, andtoggleSourcecreates ahealth_issueconfig.Testing
pnpm --filter @posthog/shared --filter @posthog/api-client --filter @posthog/core --filter @posthog/ui typecheck✅ (full repopnpm typecheckalso passes via the pre-commit hook)pnpm --filter @posthog/core test— 2477 passing, including the new cases ✅tsc --noEmit— no errors infeatures/inbox✅biome checkon all touched files +biome lint packages/core(zeronoRestrictedImports) ✅🤖 Generated with Claude Code