Skip to content

feat(inbox): surface health check issues as inbox signals#2711

Open
rafaeelaudibert wants to merge 2 commits into
mainfrom
posthog-code/health-inbox-signals
Open

feat(inbox): surface health check issues as inbox signals#2711
rafaeelaudibert wants to merge 2 commits into
mainfrom
posthog-code/health-inbox-signals

Conversation

@rafaeelaudibert

Copy link
Copy Markdown
Member

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.

Changes

Adds the health_checks / health_issue signal source everywhere source products surface, not gated behind a feature flag — per-team enablement is handled by SignalSourceConfig on the Cloud backend, exactly like the other sources.

  • Types/contracts: add health_checks to the SourceProduct union (@posthog/shared), to SignalSourceConfig (source_product + the new health_issue source_type) in @posthog/api-client, and to the SignalSourceConnected analytics event.
  • Toggle surface: wire the source through signalSourceService (core), useSignalSourceToggles, and a new "Health checks" toggle card under PostHog data in SignalSourceToggles, plus the responder roster.
  • Icon/labels: map the source to the Heartbeat icon in SOURCE_PRODUCT_META, INBOX_SOURCE_OPTIONS, and the desktop + mobile signal cards / filter sheets. This matches the IconHeartPlus health icon used in the posthog repo (HeartbeatIcon is the equivalent in this repo's @phosphor-icons/react set).
  • Tests: cover the new source in signalSourceService.test.ts (computeSourceValues + toggleSource creates a health_issue config).

Testing

  • pnpm --filter @posthog/api-client --filter @posthog/core --filter @posthog/ui typecheck
  • Mobile app tsc --noEmit — no new errors in features/inbox
  • pnpm --filter @posthog/core test — 1567 passing, including the new cases ✅
  • biome check on all touched files — clean ✅

🤖 Generated with Claude Code

Adds the `health_checks` / `health_issue` signal source to the Inbox so
instrumentation issues PostHog's health checks detect (missing events,
reverse-proxy gaps, outdated SDKs, ingestion warnings, broken warehouse
models) reach the Self-driving inbox.

Mirrors PostHog/posthog#61955. Not gated behind a feature flag — per-team
enablement is handled by `SignalSourceConfig` on the Cloud backend.

- Add `health_checks` to the `SourceProduct` union, `SignalSourceConfig`
  (`source_product` + `health_issue` `source_type`), and the
  `SignalSourceConnected` analytics event.
- Wire it through the source toggle surface: `signalSourceService`,
  `useSignalSourceToggles`, and a "Health checks" toggle card under
  "PostHog data" in `SignalSourceToggles`.
- Map the source to the Heartbeat icon in `SOURCE_PRODUCT_META`,
  `INBOX_SOURCE_OPTIONS`, the responder roster, and the desktop/mobile
  signal cards (matching the `IconHeartPlus` health icon used in the
  posthog repo).
- Cover the new source in `signalSourceService.test.ts`.

Generated-By: PostHog Code
Task-Id: 2b579b6c-3075-475e-8a1f-021df07cb260
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown

React Doctor found 1 issue in 1 file · 1 warning.

1 warning

src/features/inbox/components/SignalSourceToggles.tsx

Reviewed by React Doctor for commit 7e1b9c5.

@greptile-apps

greptile-apps Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. packages/core/src/inbox/signalSourceService.test.ts, line 59-69 (link)

    P2 New test duplicates existing coverage; prefer parameterised form

    The computeSourceValues test added for health_checks (lines 64–69) exercises the exact same code path as "enables a non-error source when any config is enabled" (lines 59–62). Both verify that configs.some(c => c.source_product === product && c.enabled) returns true — the only difference is the input. Per the project's preference for parameterised tests, both cases (and the analogous toggleSource test below) belong in a single it.each block so future sources get a one-line addition rather than a new duplicate test.

    Context Used: Do not attempt to comment on incorrect alphabetica... (source)

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: packages/core/src/inbox/signalSourceService.test.ts
    Line: 59-69
    
    Comment:
    **New test duplicates existing coverage; prefer parameterised form**
    
    The `computeSourceValues` test added for `health_checks` (lines 64–69) exercises the exact same code path as "enables a non-error source when any config is enabled" (lines 59–62). Both verify that `configs.some(c => c.source_product === product && c.enabled)` returns `true` — the only difference is the input. Per the project's preference for parameterised tests, both cases (and the analogous `toggleSource` test below) belong in a single `it.each` block so future sources get a one-line addition rather than a new duplicate test.
    
    **Context Used:** Do not attempt to comment on incorrect alphabetica... ([source](https://app.greptile.com/review/custom-context?memory=instruction-0))
    
    How can I resolve this? If you propose a fix, please make it concise.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
packages/core/src/inbox/signalSourceService.test.ts:59-69
**New test duplicates existing coverage; prefer parameterised form**

The `computeSourceValues` test added for `health_checks` (lines 64–69) exercises the exact same code path as "enables a non-error source when any config is enabled" (lines 59–62). Both verify that `configs.some(c => c.source_product === product && c.enabled)` returns `true` — the only difference is the input. Per the project's preference for parameterised tests, both cases (and the analogous `toggleSource` test below) belong in a single `it.each` block so future sources get a one-line addition rather than a new duplicate test.

Reviews (1): Last reviewed commit: "feat(inbox): surface health check issues..." | Re-trigger Greptile

@rafaeelaudibert rafaeelaudibert requested a review from a team June 16, 2026 20:54
Address review feedback:
- Toggle/responder copy now recommends keeping health checks enabled and
  notes it detects PostHog integration problems and suggests fixes
  automatically.
- Point the docs link at https://posthog.com/docs/sdk-health.
- Drop the inbox CLAUDE.md note added for this source.

Generated-By: PostHog Code
Task-Id: 2b579b6c-3075-475e-8a1f-021df07cb260
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.

1 participant