Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(desktop): point the sign-ups paused screen to the hedgehog games (#120590)

Cleo734301044322
diff --git a/products/desktop/packages/shared/src/analytics-events.ts b/products/desktop/packages/shared/src/analytics-events.ts
index c10ef0ae2f26..0752fedabd09 100644
--- a/products/desktop/packages/shared/src/analytics-events.ts
+++ b/products/desktop/packages/shared/src/analytics-events.ts
@@ -355,6 +355,10 @@ export interface DesktopAccessScreenShownProperties {
reason: "startup_plan" | "prepaid_credits" | null;
}
+export interface DesktopAccessLinkOpenedProperties {
+ link: "games";
+}
+
export type TaskListSurface = "sidebar" | "space" | "saved_search";
export interface TaskListGroupingChangedProperties {
@@ -1845,6 +1849,7 @@ export const ANALYTICS_EVENTS = {
CONTEXT_ACTION: "Context action",
PROJECT_MENU_ACTION: "Project menu action",
DESKTOP_ACCESS_SCREEN_SHOWN: "Desktop access screen shown",
+ DESKTOP_ACCESS_LINK_OPENED: "Desktop access link opened",
// Autoresearch events
AUTORESEARCH_ARMED: "Autoresearch armed",
@@ -2072,6 +2077,7 @@ export type EventPropertyMap = {
[ANALYTICS_EVENTS.CONTEXT_ACTION]: ContextActionProperties;
[ANALYTICS_EVENTS.PROJECT_MENU_ACTION]: ProjectMenuActionProperties;
[ANALYTICS_EVENTS.DESKTOP_ACCESS_SCREEN_SHOWN]: DesktopAccessScreenShownProperties;
+ [ANALYTICS_EVENTS.DESKTOP_ACCESS_LINK_OPENED]: DesktopAccessLinkOpenedProperties;
// Autoresearch events
[ANALYTICS_EVENTS.AUTORESEARCH_ARMED]: AutoresearchArmedProperties;
diff --git a/products/desktop/packages/ui/src/features/auth/components/DesktopAccessScreen.test.tsx b/products/desktop/packages/ui/src/features/auth/components/DesktopAccessScreen.test.tsx
index 81dc5c7d9d6a..a6b809c5eba2 100644
--- a/products/desktop/packages/ui/src/features/auth/components/DesktopAccessScreen.test.tsx
+++ b/products/desktop/packages/ui/src/features/auth/components/DesktopAccessScreen.test.tsx
@@ -6,6 +6,8 @@ import { DesktopAccessScreen } from "./DesktopAccessScreen";
const { track } = vi.hoisted(() => ({ track: vi.fn() }));
vi.mock("@posthog/ui/shell/analytics", () => ({ track }));
+const { openExternalUrl } = vi.hoisted(() => ({ openExternalUrl: vi.fn() }));
+vi.mock("@posthog/ui/shell/openExternal", () => ({ openExternalUrl }));
const orgProjectsMap = {
"org-1": {
@@ -66,7 +68,7 @@ describe("DesktopAccessScreen", () => {
it.each([
["startup_plan", "Organizations in the Startup or YC program"],
["prepaid_credits", "[email protected]"],
- [null, "We'll contact you with next steps"],
+ [null, "Not ideal, we know"],
] as const)("renders the %s reason", (reason, expectedCopy) => {
track.mockClear();
renderScreen({ projectId: 1, status: "blocked", reason });
@@ -95,6 +97,30 @@ describe("DesktopAccessScreen", () => {
expect(onRetry).toHaveBeenCalledOnce();
});
+ it("opens the games when sign-ups are paused", async () => {
+ const user = userEvent.setup();
+ track.mockClear();
+ renderScreen({ projectId: 1, status: "blocked", reason: null });
+
+ await user.click(screen.getByText("Play a hedgehog game instead"));
+
+ expect(track).toHaveBeenCalledWith(
+ ANALYTICS_EVENTS.DESKTOP_ACCESS_LINK_OPENED,
+ { link: "games" },
+ );
+ expect(openExternalUrl).toHaveBeenCalledWith(
+ "https://posthog.com/sparks-joy",
+ );
+ });
+
+ it("does not offer the games for other blocks", () => {
+ renderScreen({ projectId: 1, status: "blocked", reason: "startup_plan" });
+
+ expect(
+ screen.queryByText("Play a hedgehog game instead"),
+ ).not.toBeInTheDocument();
+ });
+
it("lets the user select another project", async () => {
const user = userEvent.setup();
const { container, onSelectProject } = renderScreen({
diff --git a/products/desktop/packages/ui/src/features/auth/components/DesktopAccessScreen.tsx b/products/desktop/packages/ui/src/features/auth/components/DesktopAccessScreen.tsx
index 3188df4e8d15..462979988121 100644
--- a/products/desktop/packages/ui/src/features/auth/components/DesktopAccessScreen.tsx
+++ b/products/desktop/packages/ui/src/features/auth/components/DesktopAccessScreen.tsx
@@ -2,6 +2,7 @@ import {
ArrowClockwise,
CaretDown,
Coins,
+ GameController,
HourglassMedium,
RocketLaunch,
SignOut,
@@ -30,6 +31,7 @@ import { ANALYTICS_EVENTS } from "@posthog/shared/analytics-events";
import { FullScreenLayout } from "@posthog/ui/primitives/FullScreenLayout";
import { Spinner } from "@posthog/ui/primitives/Spinner";
import { track } from "@posthog/ui/shell/analytics";
+import { openExternalUrl } from "@posthog/ui/shell/openExternal";
import {
FIELD_CONTENT_CLASS,
FIELD_TRIGGER_CLASS,
@@ -67,9 +69,16 @@ const SIGNUPS_PAUSED_CONTENT = {
icon: <HourglassMedium />,
title: "Desktop sign-ups are paused",
description:
- "Sorry, we aren't accepting new sign-ups for PostHog Desktop right now. We'll contact you with next steps when we're ready.",
+ "Sorry, we aren't letting new accounts into PostHog Desktop at the moment. Not ideal, we know.",
};
+const POSTHOG_GAMES_URL = "https://posthog.com/sparks-joy";
+
+function openGames(): void {
+ track(ANALYTICS_EVENTS.DESKTOP_ACCESS_LINK_OPENED, { link: "games" });
+ openExternalUrl(POSTHOG_GAMES_URL);
+}
+
interface DesktopAccessScreenProps {
access: DesktopAccess;
orgProjectsMap: OrgProjectsMap;
@@ -186,6 +195,18 @@ export function DesktopAccessScreen({
</EmptyDescription>
</EmptyHeader>
<EmptyContent className="w-full max-w-md gap-4">
+ {isSignupsPaused && (
+ <Button
+ variant="primary"
+ className="w-full"
+ onClick={openGames}
+ data-attr="desktop-access-games"
+ >
+ <GameController />
+ Play a hedgehog game instead
+ </Button>
+ )}
+
<div className="flex w-full flex-col gap-4">
<Field className="min-w-0">
<FieldLabel htmlFor="desktop-access-organization">
@@ -331,7 +352,7 @@ export function DesktopAccessScreen({
)}
<Button
- variant="primary"
+ variant={isSignupsPaused ? "outline" : "primary"}
loading={isRetrying}
disabled={isRetrying || isSwitching}
onClick={onRetry}