Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/mobile/src/features/inbox/components/FilterSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const SOURCE_PRODUCT_OPTIONS: { value: SourceProduct; label: string }[] = [
{ value: "zendesk", label: "Zendesk" },
{ value: "conversations", label: "Conversations" },
{ value: "signals_scout", label: "Scout" },
{ value: "health_checks", label: "Health checks" },
];

function SectionHeader({ title }: { title: string }) {
Expand Down
5 changes: 5 additions & 0 deletions apps/mobile/src/features/inbox/components/SignalCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
CheckCircle,
Code,
Compass,
FirstAid,
GithubLogo,
LinkSimple,
Question,
Expand Down Expand Up @@ -53,6 +54,8 @@ function sourceLine(signal: Signal): string {
)
return "Scout · Cross-source issue";
if (source_product === "signals_scout") return "Scout";
if (source_product === "health_checks" && source_type === "health_issue")
return "Health checks · Issue";
const product = source_product.replace(/_/g, " ");
const type = source_type.replace(/_/g, " ");
return `${product} · ${type}`;
Expand Down Expand Up @@ -82,6 +85,8 @@ function SourceIcon({
return <LinkSimple size={size} color={color} />;
case "signals_scout":
return <Compass size={size} color={color} />;
case "health_checks":
return <FirstAid size={size} color={color} />;
default:
return <WarningCircle size={size} color={color} />;
}
Expand Down
11 changes: 6 additions & 5 deletions apps/mobile/src/features/inbox/stores/inboxFilterStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ type SortField = Extract<
type SortDirection = "asc" | "desc";

export type SourceProduct =
| "session_replay"
| "conversations"
| "error_tracking"
| "llm_analytics"
| "github"
| "health_checks"
| "linear"
| "zendesk"
| "conversations"
| "signals_scout";
| "llm_analytics"
| "session_replay"
| "signals_scout"
| "zendesk";

export const DEFAULT_STATUS_FILTER: SignalReportStatus[] = [
"ready",
Expand Down
57 changes: 4 additions & 53 deletions packages/api-client/src/posthog-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import type {
CloudRunSource,
ExecutionMode,
PrAuthorshipMode,
SourceProduct,
SourceType,
StoredLogEntry,
TaskRunArtifactMetadata,
} from "@posthog/shared";
Expand Down Expand Up @@ -244,59 +246,8 @@ export interface LlmSkillFileInput {

export interface SignalSourceConfig {
id: string;
source_product:
| "session_replay"
| "llm_analytics"
| "github"
| "linear"
| "jira"
| "zendesk"
| "conversations"
| "error_tracking"
| "pganalyze"
| "signals_scout"
| "freshdesk"
| "freshservice"
| "front"
| "gorgias"
| "kustomer"
| "dixa"
| "plain"
| "gitlab"
| "gitea"
| "shortcut"
| "sentry"
| "rollbar"
| "bugsnag"
| "honeybadger"
| "raygun"
| "snyk"
| "sonarqube"
| "semgrep"
| "rapid7_insightvm"
| "featurebase"
| "frill"
| "aha"
| "uservoice"
| "productboard"
| "canny"
| "asknicely"
| "retently"
| "appfigures"
| "appfollow"
| "judgeme_reviews";
source_type:
| "session_analysis_cluster"
| "evaluation"
| "issue"
| "ticket"
| "issue_created"
| "issue_reopened"
| "issue_spiking"
| "cross_source_issue"
| "scanner_finding"
| "feedback"
| "review";
source_product: SourceProduct;
source_type: SourceType;
enabled: boolean;
config: Record<string, unknown>;
created_at: string;
Expand Down
18 changes: 18 additions & 0 deletions packages/core/src/inbox/signalSourceService.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ describe("computeSourceValues", () => {
const values = computeSourceValues([config("github", "issue", true)]);
expect(values.github).toBe(true);
});

it("enables health_checks when its config is enabled", () => {
const values = computeSourceValues([
config("health_checks", "health_issue", true),
]);
expect(values.health_checks).toBe(true);
});
});

describe("deriveSourceStates", () => {
Expand Down Expand Up @@ -106,6 +113,17 @@ describe("SignalSourceService.toggleSource", () => {
expect(client.createSignalSourceConfig).toHaveBeenCalledTimes(1);
});

it("creates a health_checks config with the health_issue source type", async () => {
const client = fakeClient();
const service = new SignalSourceService();
await service.toggleSource(client, 1, "health_checks", true, [], []);
expect(client.createSignalSourceConfig).toHaveBeenCalledWith(1, {
source_product: "health_checks",
source_type: "health_issue",
enabled: true,
});
});

it("ensures the issues table syncs with full_refresh for github before enabling", async () => {
const client = fakeClient();
const service = new SignalSourceService();
Expand Down
10 changes: 6 additions & 4 deletions packages/core/src/inbox/signalSourceService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ type SourceType = SignalSourceConfig["source_type"];
// Non-warehouse toggles are hard-wired; warehouse sources are derived from the shared
// EXTERNAL_INBOX_SOURCES registry (kept in sync with the UI hook).
const SOURCE_TYPE_MAP: Partial<Record<SignalSourceProduct, SourceType>> = {
session_replay: "session_analysis_cluster",
conversations: "ticket",
health_checks: "health_issue",
session_replay: "session_analysis_cluster",
...Object.fromEntries(
EXTERNAL_INBOX_SOURCES.map((s) => [s.product, s.recordKind]),
),
Expand All @@ -62,10 +63,11 @@ const DATA_WAREHOUSE_SOURCES: Record<
);

const ALL_SOURCE_PRODUCTS: SignalSourceProduct[] = [
"session_replay",
"error_tracking",
"conversations",
...EXTERNAL_INBOX_SOURCES.map((s) => s.product as SignalSourceProduct),
"error_tracking",
"health_checks",
"session_replay",
...EXTERNAL_INBOX_SOURCES.map((s) => s.product),
];

function isWarehouseSource(product: SignalSourceProduct): boolean {
Expand Down
43 changes: 2 additions & 41 deletions packages/shared/src/analytics-events.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Analytics event types and properties

import type { Adapter } from "./adapter";
import type { SourceProduct } from "./inbox-types";

export interface PromptHistoryOpenedProperties {
entry_count: number;
Expand Down Expand Up @@ -793,47 +794,7 @@ export interface ScoutActionProperties {
}

export interface SignalSourceConnectedProperties {
source_product:
| "session_replay"
| "error_tracking"
| "signals_scout"
| "github"
| "linear"
| "jira"
| "zendesk"
| "conversations"
| "pganalyze"
| "llm_analytics"
| "freshdesk"
| "freshservice"
| "front"
| "gorgias"
| "kustomer"
| "dixa"
| "plain"
| "gitlab"
| "gitea"
| "shortcut"
| "sentry"
| "rollbar"
| "bugsnag"
| "honeybadger"
| "raygun"
| "snyk"
| "sonarqube"
| "semgrep"
| "rapid7_insightvm"
| "featurebase"
| "frill"
| "aha"
| "uservoice"
| "productboard"
| "canny"
| "asknicely"
| "retently"
| "appfigures"
| "appfollow"
| "judgeme_reviews";
source_product: SourceProduct;
/** True when this is a brand-new createSignalSourceConfig, false for re-enable of an existing config. */
is_first_connection: boolean;
/** True when the connection went through the DataSourceSetup wizard (warehouse OAuth path). */
Expand Down
Loading
Loading