: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(desktop): drop the welcome and import-config onboarding steps (#87819)
Adam Bowker27c15dac1310
diff --git a/products/desktop/.claude/skills/onboarding-videos/SKILL.md b/products/desktop/.claude/skills/onboarding-videos/SKILL.mddeleted file mode 100644index bc4715d8ca3e..000000000000--- a/products/desktop/.claude/skills/onboarding-videos/SKILL.md+++ /dev/null@@ -1,123 +0,0 @@-----name: onboarding-videos-description: Add, replace, and optimize the looping demo videos in the onboarding "welcome" bento grid (packages/ui/src/features/onboarding). Covers the ffmpeg compression workflow (the scripts/optimize-onboarding-videos.mjs wrapper), the faststart + right-size best practices that keep playback smooth, the first-frame poster convention, and how to wire a new clip into WelcomeScreen. Use when onboarding demo clips feel laggy, when a clip is being added/swapped/re-recorded, or when posters and videos drift out of sync.-allowed-tools: Bash(node scripts/optimize-onboarding-videos.mjs:*), Bash(pnpm optimize:onboarding-videos:*), Bash(ffmpeg:*), Bash(ffprobe:*), Bash(npx biome check:*), Bash(pnpm --filter @posthog/ui typecheck:*)------# Onboarding bento demo videos--The first onboarding step (`WelcomeScreen`) shows a bento grid of feature cards.-A card with a `media` entry plays a short, muted, looping screen recording; cards-without one show a static placeholder. The featured (large, top-left) card is the-only one that plays at a time — hover just moves the highlight.--| Thing | Where |-| --- | --- |-| Clips + posters | `packages/ui/src/features/onboarding/assets/<feature>-<light\|dark>.{mp4,jpg}` |-| Wiring (`MEDIA` map, `startTime`) | `packages/ui/src/features/onboarding/components/WelcomeScreen.tsx` |-| `<video>` element + play/seek logic | `packages/ui/src/features/onboarding/components/FeatureBentoCard.tsx` |-| Optimizer script | `scripts/optimize-onboarding-videos.mjs` (`pnpm optimize:onboarding-videos`) |--## Why clips need optimizing (the "it feels laggy" fix)--Raw screen recordings hitch in this UI for two reasons, both fixed by re-encoding:--1. **`moov` atom at the end of the file.** Without faststart the player must read- to EOF before it can start, so first-play and every seek stutter. We seek on- mount and on every loop (`FeatureBentoCard` parks the clip on `videoStartTime`),- so this bites constantly. Fix: `-movflags +faststart`.-2. **Resolution far larger than it renders.** The featured slot is never wider than- ~500 CSS px (the grid is `max-w-[760px]`). Even at 2× retina that's ~1000px, but- recordings come in at ~1876px. Decoding huge frames and downscaling them — on- every play and during the framer-motion slot reflow — is wasted work. Fix: cap- width at **1000px** (which also matches the poster width exactly).--Bitrate/size are usually already modest; **decode cost and startup are the lag**,-not bytes. Don't chase file size at the expense of width/faststart.--## Canonical encode target--H.264 · `yuv420p` · **≤1000px wide** (keep aspect, even height) · CRF 23 ·-`+faststart` · no audio. These live as constants at the top of-`scripts/optimize-onboarding-videos.mjs` — change them there, not ad-hoc.--## Optimize existing clips--```bash-pnpm optimize:onboarding-videos # encode any clip not already optimized-pnpm optimize:onboarding-videos --dry-run # show what would change-pnpm optimize:onboarding-videos --force # re-encode all (after changing the target constants)-```--Requires ffmpeg (`brew install ffmpeg`). The script tags each output with a-`comment` marker, so re-runs skip already-optimized files — it's safe to run any-time, including right after dropping in a new clip. It rewrites files in place;-review the `git diff --stat` and the printed before/after sizes.--## Add or replace a clip--1. **Record** light + dark variants at **≥1000px wide**. The optimizer downscales to- 1000px but never upscales, so anything narrower ships soft — resolution is the one- thing it can't fix for you. Keep it short (~10–13s); it loops.-2. **Name + drop** the files as `assets/<feature>-light.mp4` and- `assets/<feature>-dark.mp4`. Two things bite every time:- - Recordings almost always arrive with the **light variant unsuffixed**- (`foo.mp4`, only `foo-dark.mp4` is tagged). Rename it to `foo-light.mp4`.- - The source filename (e.g. whatever's in `~/Downloads`) is irrelevant — the- `<feature>` prefix must be the **media id** you'll use in `WelcomeScreen` and- follow the existing convention, not whatever the file was called.-- No `assets.d.ts` change needed — `*.mp4`/`*.jpg` are wildcard modules.-3. **Optimize**: `pnpm optimize:onboarding-videos`.-4. **Make the poster** — the still shown before play. **Use the clip's first frame**- and leave `startTime` at 0, so the poster, the first played frame, and the loop- point are all the same with nothing to keep in sync:-- ```bash- ffmpeg -y -i assets/<feature>-<theme>.mp4 \- -frames:v 1 -vf "scale=1000:-2:flags=lanczos" -q:v 3 \- assets/<feature>-<theme>.jpg- ```--5. **Wire it up** in `WelcomeScreen.tsx`. For a *new* media id, four edits, all keyed- by the same slug: import the `.mp4` + `.jpg`, add the id to the `MediaId` union,- add its entry to the `MEDIA` map (`startTime: 0`), and set `media: "<id>"` on the- target `FeatureDef`.--### Replacing an existing clip--Keep the **same asset filename** and the wiring is untouched — none of step 5-applies. Drop the new file over `assets/<feature>-<theme>.mp4`, run the optimizer (a-fresh drop carries no skip-marker, so it re-encodes without `--force`), and-**regenerate that poster** (step 4). If you replace only one theme, re-check that-light and dark still share an aspect ratio — a clip with stray padding frames-differently from its sibling, and the gap shows when the user toggles theme.--## Poster = first frame (and startTime = 0)--`FeatureBentoCard` shows the poster while a card rests, then seeks the `<video>` to-`MEDIA[id].startTime` on mount and loops back there (not necessarily to 0). The-simple, default contract: **the poster is the clip's first frame and `startTime` is-0**, so the still, the first played frame, and the loop point are all identical —-nothing to keep in sync. Keep the poster the same pixel width as the clip (1000px)-so the poster→video swap is seamless.--`startTime` can start/loop mid-clip if you ever need it (the `code-review` clip uses-3s) — but then the poster MUST be that exact frame (`ffmpeg -ss <startTime> -i …`),-or the still jumps the instant playback starts. Prefer the first-frame default-unless you have a specific reason.--## Verify--```bash-# clips: moov should print BEFORE mdat, width ≤ 1000:-ffprobe -v trace <clip>.mp4 2>&1 | grep -o -m2 -E "type:'(moov|mdat)'"-ffprobe -v error -select_streams v:0 -show_entries stream=width,height -of csv=p=0 <clip>.mp4--# wiring: a grown MediaId union may need a formatter reflow, so let biome fix it:-npx biome check --write packages/ui/src/features/onboarding/components/WelcomeScreen.tsx-pnpm --filter @posthog/ui typecheck-```--To confirm playback feels smooth in the real app, use the `test-electron-app`-skill to drive the running onboarding flow.diff --git a/products/desktop/apps/code/src/main/di/container.ts b/products/desktop/apps/code/src/main/di/container.tsindex 3cb6b94bcb93..6483efa8138d 100644--- a/products/desktop/apps/code/src/main/di/container.ts+++ b/products/desktop/apps/code/src/main/di/container.ts@@ -189,7 +189,6 @@ import { MCP_RELAY_SERVICE } from "@posthog/workspace-server/services/mcp-relay/import { mcpRelayModule } from "@posthog/workspace-server/services/mcp-relay/mcp-relay.module";import { OAUTH_CALLBACK_SERVER } from "@posthog/workspace-server/services/oauth-callback/identifiers";import { oauthCallbackModule } from "@posthog/workspace-server/services/oauth-callback/oauth-callback.module";-import { onboardingImportModule } from "@posthog/workspace-server/services/onboarding-import/onboarding-import.module";import { osModule } from "@posthog/workspace-server/services/os/os.module";import {PI_RPC_CLIENT_FACTORY,@@ -662,7 +661,6 @@ container.bind(MAIN_POSTHOG_PLUGIN_SERVICE).toService(POSTHOG_PLUGIN_SERVICE);container.load(skillsModule);container.load(skillsMarketplaceModule);container.load(releaseFeedModule);-container.load(onboardingImportModule);container.load(localMcpModule);container.load(mcpRelayModule);// Core's cloud-task service executes MCP relay requests through this seam;diff --git a/products/desktop/apps/code/src/main/trpc/router.ts b/products/desktop/apps/code/src/main/trpc/router.tsindex 16706cd0bc00..9c63e8b37b78 100644--- a/products/desktop/apps/code/src/main/trpc/router.ts+++ b/products/desktop/apps/code/src/main/trpc/router.ts@@ -35,7 +35,6 @@ import { mcpCallbackRouter } from "@posthog/host-router/routers/mcp-callback.rouimport { mcpRelayRouter } from "@posthog/host-router/routers/mcp-relay.router";import { notificationRouter } from "@posthog/host-router/routers/notification.router";import { oauthRouter } from "@posthog/host-router/routers/oauth.router";-import { onboardingImportRouter } from "@posthog/host-router/routers/onboarding-import.router";import { osRouter } from "@posthog/host-router/routers/os.router";import { piSessionRouter } from "@posthog/host-router/routers/pi-session.router";import { processTrackingRouter } from "@posthog/host-router/routers/process-tracking.router";@@ -101,7 +100,6 @@ export const trpcRouter = router({quickAsk: quickAskRouter,notification: notificationRouter,oauth: oauthRouter,- onboardingImport: onboardingImportRouter,logs: logsRouter,os: osRouter,piSession: piSessionRouter,@@ -127,8 +125,8 @@ export type TrpcRouter = typeof trpcRouter;/*** The renderer and @posthog/ui are typed against HostRouter, so every route it* declares must actually be served by this assembly — a route present in the- * type but missing here fails only at runtime with NOT_FOUND (#2442 dropped- * onboardingImport this way, silently breaking the onboarding import step).+ * type but missing here fails only at runtime with NOT_FOUND, which is how a+ * route has been dropped before and silently broken the feature behind it.* When this assignment errors, its expected type names the missing routes.*/type MissingHostRoutes = Exclude<keyof HostRouter, keyof TrpcRouter>;diff --git a/products/desktop/apps/web/tests/e2e/tests/happy-path.spec.ts b/products/desktop/apps/web/tests/e2e/tests/happy-path.spec.tsindex c7afb130af59..b0a1aa7bad41 100644--- a/products/desktop/apps/web/tests/e2e/tests/happy-path.spec.ts+++ b/products/desktop/apps/web/tests/e2e/tests/happy-path.spec.ts@@ -7,7 +7,7 @@ import { expect, test } from "@playwright/test";// real browser — the "portability smoke test" the README describes.test.describe("web host happy path", () => {- test("boots to the onboarding welcome screen", async ({ page }) => {+ test("boots to the onboarding sign-in card", async ({ page }) => {const errors: string[] = [];page.on("pageerror", (error) => errors.push(error.message));@@ -24,32 +24,15 @@ test.describe("web host happy path", () => {.waitFor({ state: "hidden", timeout: 30_000 }).catch(() => {});- // A clean browser has no persisted onboarding state, so the first screen is- // the welcome step.- await expect(page.getByText("Welcome to")).toBeVisible({ timeout: 30_000 });await expect(- page.getByRole("button", { name: "Start shipping" }),- ).toBeVisible();+ page.getByText("Sign in / sign up with PostHog").first(),+ ).toBeVisible({ timeout: 30_000 });+ await expect(page.getByRole("button", { name: "Back" })).toHaveCount(0);// Nothing threw during boot (e.g. an unbound DI capability).expect(errors).toEqual([]);});- test("advances from welcome to the PostHog sign-in card", async ({- page,- }) => {- await page.goto("/");- const startButton = page.getByRole("button", { name: "Start shipping" });- await startButton.waitFor({ state: "visible", timeout: 30_000 });- await startButton.click();-- // The project-select step shows the sign-in card while anonymous — the end- // of the hermetic path (real OAuth needs a live IdP).- await expect(- page.getByText("Sign in / sign up with PostHog").first(),- ).toBeVisible({ timeout: 30_000 });- });-test("the OAuth /callback relay page renders without crashing", async ({page,}) => {diff --git a/products/desktop/package.json b/products/desktop/package.jsonindex 1c4753d2ee7c..23d577d73648 100644--- a/products/desktop/package.json+++ b/products/desktop/package.json@@ -31,7 +31,6 @@"rebuild:sqlite-electron": "node scripts/rebuild-better-sqlite3-electron.mjs","typecheck": "turbo typecheck","boundaries": "node scripts/check-host-boundaries.mjs",- "optimize:onboarding-videos": "node scripts/optimize-onboarding-videos.mjs","lint": "biome check --write --unsafe","format": "biome format --write","clean": "pnpm -r clean",diff --git a/products/desktop/packages/core/src/onboarding/analytics.test.ts b/products/desktop/packages/core/src/onboarding/analytics.test.tsindex d215eed76f0e..5e9be600b02b 100644--- a/products/desktop/packages/core/src/onboarding/analytics.test.ts+++ b/products/desktop/packages/core/src/onboarding/analytics.test.ts@@ -53,10 +53,10 @@ describe("buildAbandonedProps", () => {it("captures the last step and duration", () => {expect(buildAbandonedProps({- lastStepId: "welcome",+ lastStepId: "project-select",flowStartedAtMs: 0,nowMs: 2000,}),- ).toEqual({ last_step_id: "welcome", duration_seconds: 2 });+ ).toEqual({ last_step_id: "project-select", duration_seconds: 2 });});});diff --git a/products/desktop/packages/core/src/onboarding/steps.test.ts b/products/desktop/packages/core/src/onboarding/steps.test.tsindex 23f419a4ffd5..a2469ec30eb5 100644--- a/products/desktop/packages/core/src/onboarding/steps.test.ts+++ b/products/desktop/packages/core/src/onboarding/steps.test.ts@@ -12,17 +12,14 @@ import {} from "./steps";const allSteps = {- hasImportableConfig: true,hasGithubIntegration: undefined,projectCount: 2,consentRequired: true,};describe("computeActiveSteps", () => {- it("drops import-config when there is no importable config", () => {- expect(- computeActiveSteps({ ...allSteps, hasImportableConfig: false }),- ).not.toContain("import-config");+ it("keeps every step while no gate has resolved against it", () => {+ expect(computeActiveSteps(allSteps)).toEqual(ONBOARDING_STEPS);});it("drops project-select only when there is exactly one project", () => {@@ -65,22 +62,21 @@ describe("computeActiveSteps", () => {describe("nearestActiveStep", () => {const withoutConditionals = computeActiveSteps({- hasImportableConfig: false,- hasGithubIntegration: undefined,+ hasGithubIntegration: true,projectCount: 2,consentRequired: true,});it("returns the step itself while it is still active", () => {- expect(nearestActiveStep(ONBOARDING_STEPS, "import-config")).toBe(- "import-config",+ expect(nearestActiveStep(ONBOARDING_STEPS, "install-cli")).toBe(+ "install-cli",);});it.each<{ removed: OnboardingStep; expected: OnboardingStep }>([- // import-config vanished under the user: continue forward to select-repo,- // not back to welcome (the regression that reset onboarding mid-flow).- { removed: "import-config", expected: "select-repo" },+ // install-cli vanished under the user: continue forward to select-repo,+ // not back to the start (the regression that reset onboarding mid-flow).+ { removed: "install-cli", expected: "select-repo" },])("moves forward to $expected when $removed drops out",({ removed, expected }) => {@@ -89,20 +85,17 @@ describe("nearestActiveStep", () => {);it("falls back to the closest earlier step when nothing follows", () => {- const onlyEarlySteps: OnboardingStep[] = ["welcome", "project-select"];- expect(nearestActiveStep(onlyEarlySteps, "import-config")).toBe(- "project-select",- );+ const onlyEarlySteps: OnboardingStep[] = ["project-select", "consent"];+ expect(nearestActiveStep(onlyEarlySteps, "select-repo")).toBe("consent");});it("returns the step itself when no steps are active", () => {- expect(nearestActiveStep([], "import-config")).toBe("import-config");+ expect(nearestActiveStep([], "select-repo")).toBe("select-repo");});});describe("step navigation", () => {const steps = computeActiveSteps({- hasImportableConfig: true,hasGithubIntegration: undefined,projectCount: 2,consentRequired: true,diff --git a/products/desktop/packages/core/src/onboarding/steps.ts b/products/desktop/packages/core/src/onboarding/steps.tsindex acd992ef48a4..3bd140fd2bc7 100644--- a/products/desktop/packages/core/src/onboarding/steps.ts+++ b/products/desktop/packages/core/src/onboarding/steps.ts@@ -1,19 +1,15 @@export type OnboardingStep =- | "welcome"| "project-select"| "consent"| "connect-github"| "install-cli"- | "import-config"| "select-repo";export const ONBOARDING_STEPS: OnboardingStep[] = [- "welcome","project-select","consent","connect-github","install-cli",- "import-config","select-repo",];@@ -26,7 +22,6 @@ export interface DetectedRepo {}export function computeActiveSteps(options: {- hasImportableConfig: boolean;/** Undefined while the integrations query is loading; the step only drops on a confirmed connection. */hasGithubIntegration: boolean | undefined;/** Undefined until the project list has loaded, so a slow list cannot skip a real choice. */@@ -36,7 +31,6 @@ export function computeActiveSteps(options: {return ONBOARDING_STEPS.filter((step) => {if (step === "project-select" && options.projectCount === 1) return false;if (step === "consent" && options.consentRequired === false) return false;- if (step === "import-config" && !options.hasImportableConfig) return false;if (step === "install-cli" && options.hasGithubIntegration === true) {return false;}@@ -58,7 +52,7 @@ export function stepIndexOf(* user was moving forward — and falls back to the closest earlier one, so a* vanishing step never resets progress to the start of the flow. Returns* `step` unchanged when it is still active, or when `activeSteps` is empty- * (degenerate input: the flow always keeps at least the welcome step).+ * (degenerate input: the flow always keeps at least the select-repo step).*/export function nearestActiveStep(activeSteps: OnboardingStep[],diff --git a/products/desktop/packages/host-router/src/router.ts b/products/desktop/packages/host-router/src/router.tsindex fe5934f56952..b3a828558103 100644--- a/products/desktop/packages/host-router/src/router.ts+++ b/products/desktop/packages/host-router/src/router.ts@@ -34,7 +34,6 @@ import { mcpCallbackRouter } from "./routers/mcp-callback.router";import { mcpRelayRouter } from "./routers/mcp-relay.router";import { notificationRouter } from "./routers/notification.router";import { oauthRouter } from "./routers/oauth.router";-import { onboardingImportRouter } from "./routers/onboarding-import.router";import { osRouter } from "./routers/os.router";import { piSessionRouter } from "./routers/pi-session.router";import { processTrackingRouter } from "./routers/process-tracking.router";@@ -89,7 +88,6 @@ export const hostRouter = router({mcpRelay: mcpRelayRouter,notification: notificationRouter,oauth: oauthRouter,- onboardingImport: onboardingImportRouter,os: osRouter,piSession: piSessionRouter,processTracking: processTrackingRouter,diff --git a/products/desktop/packages/host-router/src/routers/onboarding-import.router.ts b/products/desktop/packages/host-router/src/routers/onboarding-import.router.tsdeleted file mode 100644index 76c37c9e0cfb..000000000000--- a/products/desktop/packages/host-router/src/routers/onboarding-import.router.ts+++ /dev/null@@ -1,16 +0,0 @@-import { publicProcedure, router } from "@posthog/host-trpc/trpc";-import {- ONBOARDING_IMPORT_SERVICE,- type OnboardingImportService,-} from "@posthog/workspace-server/services/onboarding-import/identifiers";-import { summaryOutput } from "@posthog/workspace-server/services/onboarding-import/schemas";--export const onboardingImportRouter = router({- getSummary: publicProcedure- .output(summaryOutput)- .query(({ ctx }) =>- ctx.container- .get<OnboardingImportService>(ONBOARDING_IMPORT_SERVICE)- .getSummary(),- ),-});diff --git a/products/desktop/packages/shared/src/analytics-events.ts b/products/desktop/packages/shared/src/analytics-events.tsindex 2d4c7c875511..d12b31e57dd5 100644--- a/products/desktop/packages/shared/src/analytics-events.ts+++ b/products/desktop/packages/shared/src/analytics-events.ts@@ -490,13 +490,11 @@ export interface TaskFeedbackProperties {// Onboarding eventsexport type OnboardingStepId =- | "welcome"| "project-select"| "invite-code"| "consent"| "connect-github"| "install-cli"- | "import-config"| "select-repo";type OnboardingSkipReason = "no_repo_selected" | "dev_skip";diff --git a/products/desktop/packages/ui/src/features/consent/ConsentStep.tsx b/products/desktop/packages/ui/src/features/consent/ConsentStep.tsxindex 83c0aea094bf..6243b8a74e1b 100644--- a/products/desktop/packages/ui/src/features/consent/ConsentStep.tsx+++ b/products/desktop/packages/ui/src/features/consent/ConsentStep.tsx@@ -11,7 +11,7 @@ import { useOrgConsent } from "./useOrgConsent";interface ConsentStepProps {onNext: () => void;- onBack: () => void;+ onBack?: () => void;requirements?: {needsAiConsent: boolean;needsBetaTerms: boolean;@@ -65,16 +65,18 @@ export function ConsentStep({</div></div><StepActions>- <Button- variant="outline"- size="lg"- className="h-10 px-4 text-sm"- disabled={isSubmitting}- onClick={onBack}- >- <ArrowLeft size={16} />- Back- </Button>+ {onBack && (+ <Button+ variant="outline"+ size="lg"+ className="h-10 px-4 text-sm"+ disabled={isSubmitting}+ onClick={onBack}+ >+ <ArrowLeft size={16} />+ Back+ </Button>+ )}<Buttonvariant="primary"size="lg"diff --git a/products/desktop/packages/ui/src/features/onboarding/assets/code-review-dark.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/code-review-dark.jpgdeleted file mode 100644index 5a9f2122144e..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/code-review-dark.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/code-review-dark.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/code-review-dark.mp4deleted file mode 100644index 067be9b7d376..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/code-review-dark.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/code-review-light.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/code-review-light.jpgdeleted file mode 100644index 345a0569aaf2..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/code-review-light.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/code-review-light.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/code-review-light.mp4deleted file mode 100644index 53e135cecf12..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/code-review-light.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/command-center-dark.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/command-center-dark.jpgdeleted file mode 100644index 74f6f1fd69c0..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/command-center-dark.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/command-center-dark.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/command-center-dark.mp4deleted file mode 100644index 152cc8ca600c..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/command-center-dark.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/command-center-light.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/command-center-light.jpgdeleted file mode 100644index b059500ef67f..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/command-center-light.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/command-center-light.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/command-center-light.mp4deleted file mode 100644index a321555f1423..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/command-center-light.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-dark.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-dark.jpgdeleted file mode 100644index 5cb8ae01d4d8..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-dark.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-dark.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-dark.mp4deleted file mode 100644index 519e97737e03..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-dark.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-light.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-light.jpgdeleted file mode 100644index 54702e769bbc..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-light.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-light.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-light.mp4deleted file mode 100644index 6e5db542ddd8..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/phc-context-light.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-dark.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-dark.jpgdeleted file mode 100644index 84e420b09cdf..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-dark.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-dark.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-dark.mp4deleted file mode 100644index 11a7e2bbd0d1..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-dark.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-light.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-light.jpgdeleted file mode 100644index c2e2aaed3097..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-light.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-light.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-light.mp4deleted file mode 100644index b980a6335085..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/phc-harness-light.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-dark.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-dark.jpgdeleted file mode 100644index ab6351431a5a..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-dark.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-dark.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-dark.mp4deleted file mode 100644index ab3d258c80c9..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-dark.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-light.jpg b/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-light.jpgdeleted file mode 100644index 3357ebb93d1d..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-light.jpg and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-light.mp4 b/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-light.mp4deleted file mode 100644index 496d9069a21a..000000000000Binary files a/products/desktop/packages/ui/src/features/onboarding/assets/signals-inbox-light.mp4 and /dev/null differdiff --git a/products/desktop/packages/ui/src/features/onboarding/components/ConnectGitHubStep.tsx b/products/desktop/packages/ui/src/features/onboarding/components/ConnectGitHubStep.tsxindex 90e0268a6128..bf7c77bc4d93 100644--- a/products/desktop/packages/ui/src/features/onboarding/components/ConnectGitHubStep.tsx+++ b/products/desktop/packages/ui/src/features/onboarding/components/ConnectGitHubStep.tsx@@ -19,7 +19,7 @@ type StepContext = Pick<OnboardingStepCompletedProperties, "github_connected">;interface ConnectGitHubStepProps {onNext: (context?: StepContext) => void;- onBack: () => void;+ onBack?: () => void;}export function ConnectGitHubStep({ onNext, onBack }: ConnectGitHubStepProps) {@@ -107,10 +107,12 @@ export function ConnectGitHubStep({ onNext, onBack }: ConnectGitHubStepProps) {</Flex><StepActions>- <Button size="3" variant="outline" color="gray" onClick={onBack}>- <ArrowLeft size={16} weight="bold" />- Back- </Button>+ {onBack && (+ <Button size="3" variant="outline" color="gray" onClick={onBack}>+ <ArrowLeft size={16} weight="bold" />+ Back+ </Button>+ )}<Button size="3" onClick={handleContinue}>Continue<ArrowRight size={16} weight="bold" />diff --git a/products/desktop/packages/ui/src/features/onboarding/components/FeatureBentoCard.css b/products/desktop/packages/ui/src/features/onboarding/components/FeatureBentoCard.cssdeleted file mode 100644index 4319ee8820e8..000000000000--- a/products/desktop/packages/ui/src/features/onboarding/components/FeatureBentoCard.css+++ /dev/null@@ -1,141 +0,0 @@-.feature-bento-card {- position: relative;- display: flex;- flex-direction: column;- padding: 10px;- border-radius: var(--radius-4);- border: 1px solid var(--gray-a4);- background: var(--color-panel-solid);- transition:- border-color 0.25s ease,- transform 0.25s ease,- box-shadow 0.25s ease;- overflow: hidden;- cursor: default;- user-select: none;-}--.feature-bento-card:hover,-.feature-bento-card--active {- border-color: var(--accent-a7);- transform: translateY(-2px);- box-shadow:- 0 1px 0 0 var(--gray-a3) inset,- 0 8px 24px -12px var(--accent-a4);-}--.feature-bento-card__placeholder {- position: relative;- flex: 1 1 0;- min-height: 0;- display: flex;- align-items: center;- justify-content: center;- border-radius: var(--radius-3);- border: 1px dashed var(--gray-a5);- background:- radial-gradient(120% 80% at 50% 0%, var(--accent-a2) 0%, transparent 60%),- linear-gradient(180deg, var(--gray-2) 0%, var(--gray-3) 100%);- overflow: hidden;-}--.feature-bento-card__placeholder--media {- border-style: solid;- border-color: var(--gray-a4);- background: var(--gray-2);-}--.feature-bento-card__video {- position: absolute;- inset: 0;- width: 100%;- height: 100%;- object-fit: cover;- display: block;-}--.feature-bento-card--selectable {- cursor: pointer;-}--.feature-bento-card__expand-hint {- position: absolute;- right: 8px;- bottom: 8px;- z-index: 10;- display: flex;- align-items: center;- justify-content: center;- width: 24px;- height: 24px;- border-radius: var(--radius-2);- background: rgba(0, 0, 0, 0.45);- color: white;- opacity: 0;- transform: scale(0.9);- transition:- opacity 0.15s ease,- transform 0.15s ease;- pointer-events: none;-}--.feature-bento-card--selectable:hover .feature-bento-card__expand-hint {- opacity: 1;- transform: scale(1);-}--.feature-bento-card__placeholder-grid {- position: absolute;- inset: 0;- background-image:- linear-gradient(to right, var(--gray-a3) 1px, transparent 1px),- linear-gradient(to bottom, var(--gray-a3) 1px, transparent 1px);- background-size: 16px 16px;- background-position: -1px -1px;- mask-image: radial-gradient(120% 80% at 50% 50%, black 30%, transparent 80%);- opacity: 0.5;- transition: opacity 0.1s ease;-}--.feature-bento-card__placeholder-glow {- position: absolute;- inset: -20%;- background: radial-gradient(closest-side, var(--accent-a3), transparent 70%);- opacity: 0;- transition: opacity 0.1s ease;- pointer-events: none;-}--.feature-bento-card:hover .feature-bento-card__placeholder-glow,-.feature-bento-card--active .feature-bento-card__placeholder-glow {- opacity: 1;-}--.feature-bento-card:hover .feature-bento-card__placeholder-grid,-.feature-bento-card--active .feature-bento-card__placeholder-grid {- opacity: 0.8;-}--.feature-bento-card__icon {- display: flex;- align-items: center;- justify-content: center;- width: 36px;- height: 36px;- border-radius: var(--radius-3);- background: var(--color-panel-solid);- border: 1px solid var(--gray-a5);- color: var(--gray-12);- box-shadow: 0 1px 0 0 var(--gray-a3) inset;- transition:- transform 0.1s ease,- border-color 0.1s ease,- color 0.1s ease;-}--.feature-bento-card:hover .feature-bento-card__icon,-.feature-bento-card--active .feature-bento-card__icon {- transform: scale(1.05);- border-color: var(--accent-a7);- color: var(--accent-11);-}diff --git a/products/desktop/packages/ui/src/features/onboarding/components/FeatureBentoCard.tsx b/products/desktop/packages/ui/src/features/onboarding/components/FeatureBentoCard.tsxdeleted file mode 100644index ec4bef0b2e82..000000000000--- a/products/desktop/packages/ui/src/features/onboarding/components/FeatureBentoCard.tsx+++ /dev/null@@ -1,179 +0,0 @@-import { ArrowsOut } from "@phosphor-icons/react";-import { Flex, Text } from "@radix-ui/themes";-import { motion } from "framer-motion";-import { type KeyboardEvent, type ReactNode, useEffect, useRef } from "react";-import "./FeatureBentoCard.css";--interface FeatureBentoCardProps {- icon: ReactNode;- title: string;- description: string;- /** Highlights the card (the featured card when nothing is hovered). */- active?: boolean;- index?: number;- /** Optional looping demo video shown in the placeholder area. */- videoSrc?: string;- /** Still frame shown until the video plays. Should match `videoStartTime`. */- posterSrc?: string;- /** Timestamp (seconds) the still is taken from; playback starts and loops here. */- videoStartTime?: number;- /** When true, this card's video plays. Only one card plays at a time. */- shouldPlay?: boolean;- /** Click handler that promotes this card into the large slot. */- onSelect?: () => void;- onMouseEnter?: () => void;- onMouseLeave?: () => void;-}--function prefersReducedMotion(): boolean {- return (- typeof window !== "undefined" &&- typeof window.matchMedia === "function" &&- window.matchMedia("(prefers-reduced-motion: reduce)").matches- );-}--export function FeatureBentoCard({- icon,- title,- description,- active = false,- index = 0,- videoSrc,- posterSrc,- videoStartTime = 0,- shouldPlay = false,- onSelect,- onMouseEnter,- onMouseLeave,-}: FeatureBentoCardProps) {- const videoRef = useRef<HTMLVideoElement>(null);- const selectable = Boolean(onSelect);-- // Park the video on the still frame so it matches the poster, even after the- // browser has decoded it (poster only shows before the first play).- useEffect(() => {- const video = videoRef.current;- if (!video || !videoSrc) return;-- const seekToStart = () => {- try {- video.currentTime = videoStartTime;- } catch {- // Seeking before metadata is ready is a no-op; the listener retries.- }- };-- if (video.readyState >= 1) {- seekToStart();- return;- }- video.addEventListener("loadedmetadata", seekToStart, { once: true });- return () => video.removeEventListener("loadedmetadata", seekToStart);- }, [videoSrc, videoStartTime]);-- // Play only when told to; otherwise rest on the still frame.- useEffect(() => {- const video = videoRef.current;- if (!video || !videoSrc) return;-- if (shouldPlay && !prefersReducedMotion()) {- void video.play().catch(() => {- // Ignore: play() can reject if the element isn't ready yet.- });- } else {- video.pause();- try {- video.currentTime = videoStartTime;- } catch {- // Ignore: resetting before metadata is ready is a no-op.- }- }- }, [shouldPlay, videoSrc, videoStartTime]);-- // Loop back to the still frame rather than the very start of the clip.- const handleVideoEnded = () => {- const video = videoRef.current;- if (!video) return;- video.currentTime = videoStartTime;- if (shouldPlay && !prefersReducedMotion()) {- void video.play().catch(() => {});- }- };-- const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {- if (!selectable) return;- if (event.key === "Enter" || event.key === " ") {- event.preventDefault();- onSelect?.();- }- };-- return (- <motion.div- initial={{ opacity: 0, y: 12 }}- animate={{ opacity: 1, y: 0 }}- transition={{ duration: 0.3, delay: index * 0.08 }}- onMouseEnter={onMouseEnter}- onMouseLeave={onMouseLeave}- onClick={selectable ? onSelect : undefined}- onKeyDown={selectable ? handleKeyDown : undefined}- role={selectable ? "button" : undefined}- tabIndex={selectable ? 0 : undefined}- aria-label={selectable ? `Show ${title}` : undefined}- className={`feature-bento-card h-full w-full ${active ? "feature-bento-card--active" : ""} ${selectable ? "feature-bento-card--selectable" : ""}`}- >- <div- className={`feature-bento-card__placeholder ${videoSrc ? "feature-bento-card__placeholder--media" : ""}`}- >- {videoSrc ? (- <video- ref={videoRef}- className="feature-bento-card__video"- src={videoSrc}- poster={posterSrc}- muted- playsInline- preload="metadata"- onEnded={handleVideoEnded}- />- ) : (- <>- <div- className="feature-bento-card__placeholder-grid"- aria-hidden="true"- />- <div- className="feature-bento-card__placeholder-glow"- aria-hidden="true"- />- <Flex- align="center"- justify="center"- className="relative z-10 text-(--gray-9)"- >- <div className="feature-bento-card__icon">{icon}</div>- </Flex>- </>- )}- {selectable && (- <div className="feature-bento-card__expand-hint" aria-hidden="true">- <ArrowsOut size={13} weight="bold" />- </div>- )}- </div>- <Flex- direction="column"- gap="1"- className="feature-bento-card__content shrink-0 px-1 pt-3 pb-1"- >- <Text className="font-medium text-(--gray-12) text-sm leading-snug">- {title}- </Text>- <Text className="text-(--gray-11) text-[12px] leading-snug">- {description}- </Text>- </Flex>- </motion.div>- );-}diff --git a/products/desktop/packages/ui/src/features/onboarding/components/ImportConfigStep.css b/products/desktop/packages/ui/src/features/onboarding/components/ImportConfigStep.cssdeleted file mode 100644index 94fee591d1af..000000000000--- a/products/desktop/packages/ui/src/features/onboarding/components/ImportConfigStep.css+++ /dev/null@@ -1,155 +0,0 @@-.import-stat-card {- position: relative;- display: flex;- flex-direction: column;- gap: 10px;- padding: 16px;- border-radius: var(--radius-4);- border: 1px solid var(--gray-a4);- background: var(--color-panel-solid);- overflow: hidden;- cursor: default;- user-select: none;- transition:- border-color 0.25s ease,- transform 0.25s ease,- box-shadow 0.25s ease;-}--.import-stat-card:hover {- border-color: var(--accent-a7);- transform: translateY(-2px);- box-shadow:- 0 1px 0 0 var(--gray-a3) inset,- 0 8px 24px -12px var(--accent-a4);-}--.import-stat-card__grid {- position: absolute;- inset: 0;- background-image:- linear-gradient(to right, var(--gray-a3) 1px, transparent 1px),- linear-gradient(to bottom, var(--gray-a3) 1px, transparent 1px);- background-size: 16px 16px;- background-position: -1px -1px;- mask-image: radial-gradient(110% 90% at 100% 0%, black 0%, transparent 65%);- opacity: 0.35;- transition: opacity 0.25s ease;- pointer-events: none;-}--.import-stat-card:hover .import-stat-card__grid {- opacity: 0.7;-}--.import-stat-card__glow {- position: absolute;- top: -30%;- right: -30%;- width: 65%;- height: 65%;- background: radial-gradient(closest-side, var(--accent-a3), transparent 70%);- opacity: 0.55;- transition: opacity 0.25s ease;- pointer-events: none;-}--.import-stat-card:hover .import-stat-card__glow {- opacity: 1;-}--.import-stat-card__icon {- display: inline-flex;- align-items: center;- justify-content: center;- width: 32px;- height: 32px;- border-radius: var(--radius-3);- background: var(--color-panel-solid);- border: 1px solid var(--accent-a5);- color: var(--accent-11);- box-shadow: 0 1px 0 0 var(--gray-a3) inset;- transition:- transform 0.2s ease,- border-color 0.2s ease;-}--.import-stat-card:hover .import-stat-card__icon {- transform: scale(1.06);- border-color: var(--accent-a8);-}--.import-stat-card__count {- font-weight: 700;- font-size: 32px;- line-height: 1;- letter-spacing: -0.03em;- color: var(--gray-12);- font-variant-numeric: tabular-nums;-}--.import-stat-card--empty {- background: var(--gray-2);-}--.import-stat-card--empty:hover {- border-color: var(--gray-a5);- transform: none;- box-shadow: none;-}--.import-stat-card--empty .import-stat-card__glow {- display: none;-}--.import-stat-card--empty:hover .import-stat-card__grid {- opacity: 0.35;-}--.import-stat-card--empty .import-stat-card__icon {- border-color: var(--gray-a4);- color: var(--gray-9);-}--.import-stat-card--empty:hover .import-stat-card__icon {- transform: none;- border-color: var(--gray-a4);-}--.import-stat-card--empty .import-stat-card__count {- color: var(--gray-8);-}--.import-stat-card__path {- display: inline-flex;- align-items: center;- gap: 5px;- align-self: flex-start;- max-width: 100%;- padding: 2px 7px;- border-radius: var(--radius-2);- border: 1px solid var(--gray-a4);- background: var(--gray-a2);- color: var(--gray-11);- font-family: var(--code-font-family);- font-size: 11px;- line-height: 1.45;-}--.import-stat-card__path svg {- flex-shrink: 0;- color: var(--gray-9);-}--.import-stat-card__path-text {- min-width: 0;- overflow: hidden;- text-overflow: ellipsis;- white-space: nowrap;-}--.import-stat-card__path-more {- flex-shrink: 0;- font-weight: 600;- color: var(--gray-9);-}diff --git a/products/desktop/packages/ui/src/features/onboarding/components/ImportConfigStep.tsx b/products/desktop/packages/ui/src/features/onboarding/components/ImportConfigStep.tsxdeleted file mode 100644index 43e58ff82c6e..000000000000--- a/products/desktop/packages/ui/src/features/onboarding/components/ImportConfigStep.tsx+++ /dev/null@@ -1,247 +0,0 @@-import {- ArrowLeft,- ArrowRight,- Folder,- type Icon,- PlugsConnected,- PuzzlePiece,- ShieldCheck,- Sparkle,-} from "@phosphor-icons/react";-import { useHostTRPC } from "@posthog/host-router/react";-import { happyHog } from "@posthog/ui/assets/hedgehogs";-import { StepActions } from "@posthog/ui/features/onboarding/components/StepActions";-import { OnboardingHogTip } from "@posthog/ui/primitives/OnboardingHogTip";-import { Tooltip } from "@posthog/ui/primitives/Tooltip";-import { Button, Flex, Spinner, Text } from "@radix-ui/themes";-import { useQuery } from "@tanstack/react-query";-import { motion } from "framer-motion";-import { useEffect, useState } from "react";-import "./ImportConfigStep.css";--interface ImportConfigStepProps {- onNext: () => void;- onBack: () => void;-}--interface StatCard {- key: string;- label: string;- count: number;- paths: string[];- icon: Icon;-}--function PathChip({ paths }: { paths: string[] }) {- const [primary, ...rest] = paths ?? [];- if (!primary) return null;-- const chip = (- <span className="import-stat-card__path">- <Folder size={11} weight="duotone" />- <span className="import-stat-card__path-text">{primary}</span>- {rest.length > 0 && (- <span className="import-stat-card__path-more">+{rest.length}</span>- )}- </span>- );-- if (rest.length === 0) return chip;-- return (- <Tooltip- side="bottom"- content={- <Flex direction="column" gap="1">- {paths.map((p) => (- <span key={p} className="font-[var(--code-font-family)] text-xs">- {p}- </span>- ))}- </Flex>- }- >- {chip}- </Tooltip>- );-}--const prefersReducedMotion = () =>- window?.matchMedia("(prefers-reduced-motion: reduce)").matches;--function useCountUp(target: number, durationMs = 850, delayMs = 0): number {- const [value, setValue] = useState(() =>- prefersReducedMotion() ? target : 0,- );-- useEffect(() => {- if (prefersReducedMotion() || target === 0) {- setValue(target);- return;- }- let raf = 0;- let startTs = 0;- const step = (now: number) => {- if (!startTs) startTs = now;- const t = Math.min(1, (now - startTs) / durationMs);- const eased = 1 - (1 - t) ** 3;- setValue(Math.round(eased * target));- if (t < 1) raf = requestAnimationFrame(step);- };- const timer = setTimeout(() => {- raf = requestAnimationFrame(step);- }, delayMs);- return () => {- clearTimeout(timer);- cancelAnimationFrame(raf);- };- }, [target, durationMs, delayMs]);-- return value;-}--function StatCardView({ card, index }: { card: StatCard; index: number }) {- const IconComponent = card.icon;- const isEmpty = card.count === 0;- const entryDelay = 0.06 + index * 0.07;- const count = useCountUp(card.count, 850, (entryDelay + 0.18) * 1000);-- return (- <motion.div- initial={{ opacity: 0, y: 12 }}- animate={{ opacity: 1, y: 0 }}- transition={{- duration: 0.35,- delay: entryDelay,- ease: [0.16, 1, 0.3, 1],- }}- className={- isEmpty- ? "import-stat-card import-stat-card--empty"- : "import-stat-card"- }- >- <div className="import-stat-card__grid" aria-hidden="true" />- <div className="import-stat-card__glow" aria-hidden="true" />- <Flex direction="column" gap="3" className="relative z-10">- <span className="import-stat-card__icon">- <IconComponent size={17} weight="duotone" />- </span>- <Flex direction="column" gap="2">- <Flex align="baseline" gap="2" wrap="wrap">- <span className="import-stat-card__count">{count}</span>- <Text className="font-semibold text-(--gray-12) text-base leading-tight">- {card.label}- </Text>- </Flex>- <PathChip paths={card.paths} />- </Flex>- </Flex>- </motion.div>- );-}--export function ImportConfigStep({ onNext, onBack }: ImportConfigStepProps) {- const trpc = useHostTRPC();- const { data: summary, isLoading } = useQuery(- trpc.onboardingImport.getSummary.queryOptions(undefined, {- staleTime: 60_000,- }),- );-- const cards: StatCard[] = summary- ? [- {- key: "skills",- label: summary.skills.count === 1 ? "Skill" : "Skills",- count: summary.skills.count,- paths: summary.skills.paths,- icon: Sparkle,- },- {- key: "plugins",- label: summary.plugins.count === 1 ? "Plugin" : "Plugins",- count: summary.plugins.count,- paths: summary.plugins.paths,- icon: PuzzlePiece,- },- {- key: "mcp",- label: summary.mcpServers.count === 1 ? "MCP server" : "MCP servers",- count: summary.mcpServers.count,- paths: summary.mcpServers.paths,- icon: PlugsConnected,- },- {- key: "permissions",- label: "Permission rules",- count: summary.permissions.count,- paths: summary.permissions.paths,- icon: ShieldCheck,- },- ]- : [];-- return (- <Flex align="center" height="100%" px="8">- <Flex- direction="column"- align="center"- className="h-full w-full pt-[24px] pb-[40px]"- >- <Flex direction="column" className="min-h-0 flex-1 overflow-y-auto">- <Flex- direction="column"- gap="5"- className="m-auto w-full max-w-[560px]"- >- <motion.div- initial={{ opacity: 0, y: 8 }}- animate={{ opacity: 1, y: 0 }}- transition={{ duration: 0.3 }}- >- <Flex direction="column" gap="2">- <Text className="font-bold text-(--gray-12) text-2xl tracking-[-0.02em]">- Your Claude Code environment is ready- </Text>- <Text className="text-(--gray-11) text-sm leading-relaxed">- Same workflow, now in PostHog.- </Text>- </Flex>- </motion.div>-- {isLoading ? (- <Flex align="center" justify="center" className="py-12">- <Spinner size="3" />- </Flex>- ) : (- <>- <div className="grid w-full grid-cols-2 gap-3">- {cards.map((card, index) => (- <StatCardView key={card.key} card={card} index={index} />- ))}- </div>- <OnboardingHogTip- hogSrc={happyHog}- message="All your favorite skills, plugins, and MCP servers are ready to use."- delay={0.2 + cards.length * 0.07}- />- </>- )}- </Flex>- </Flex>-- <StepActions>- <Button size="3" variant="outline" color="gray" onClick={onBack}>- <ArrowLeft size={16} weight="bold" />- Back- </Button>- <Button size="3" onClick={() => onNext()}>- Continue- <ArrowRight size={16} weight="bold" />- </Button>- </StepActions>- </Flex>- </Flex>- );-}diff --git a/products/desktop/packages/ui/src/features/onboarding/components/OnboardingFlow.tsx b/products/desktop/packages/ui/src/features/onboarding/components/OnboardingFlow.tsxindex 3991d4a442d7..e0a9970578d1 100644--- a/products/desktop/packages/ui/src/features/onboarding/components/OnboardingFlow.tsx+++ b/products/desktop/packages/ui/src/features/onboarding/components/OnboardingFlow.tsx@@ -25,10 +25,8 @@ import { TASK_CHANNELS_QUERY_KEY } from "@posthog/ui/features/canvas/hooks/useTaimport { ConsentStep } from "@posthog/ui/features/consent/ConsentStep";import { useUserGithubIntegrations } from "@posthog/ui/features/integrations/useIntegrations";import { ConnectGitHubStep } from "@posthog/ui/features/onboarding/components/ConnectGitHubStep";-import { ImportConfigStep } from "@posthog/ui/features/onboarding/components/ImportConfigStep";import { InstallCliStep } from "@posthog/ui/features/onboarding/components/InstallCliStep";import { StepIndicator } from "@posthog/ui/features/onboarding/components/StepIndicator";-import { WelcomeScreen } from "@posthog/ui/features/onboarding/components/WelcomeScreen";import { useOnboardingFlow } from "@posthog/ui/features/onboarding/hooks/useOnboardingFlow";import { useOnboardingStore } from "@posthog/ui/features/onboarding/onboardingStore";import { useSettingsStore } from "@posthog/ui/features/settings/settingsStore";@@ -231,6 +229,10 @@ export function OnboardingFlow({ onOpenSupport }: OnboardingFlowProps) {back();};+ // The first active step has nowhere to go back to, and which step that is+ // shifts as the conditional steps resolve.+ const onBack = currentIndex <= 0 ? undefined : handleBack;+useHotkeys("right", () => handleNext(), { enableOnFormTags: false }, [handleNext,]);@@ -329,21 +331,6 @@ export function OnboardingFlow({ onOpenSupport }: OnboardingFlowProps) {<FullScreenLayout footerRight={footerRight} onOpenSupport={onOpenSupport}><LayoutGroup><AnimatePresence mode="wait" custom={direction}>- {currentStep === "welcome" && (- <motion.div- key="welcome"- custom={direction}- initial="enter"- animate="center"- exit="exit"- variants={stepVariants}- transition={{ duration: 0.3 }}- className="min-h-0 w-full flex-1"- >- <WelcomeScreen onNext={handleNext} />- </motion.div>- )}-{currentStep === "project-select" && (<motion.divkey="project-select"@@ -355,7 +342,7 @@ export function OnboardingFlow({ onOpenSupport }: OnboardingFlowProps) {transition={{ duration: 0.3 }}className="min-h-0 w-full flex-1">- <ProjectSelectStep onNext={handleNext} onBack={handleBack} />+ <ProjectSelectStep onNext={handleNext} onBack={onBack} /></motion.div>)}@@ -372,7 +359,7 @@ export function OnboardingFlow({ onOpenSupport }: OnboardingFlowProps) {><ConsentSteponNext={handleNext}- onBack={handleBack}+ onBack={onBack}requirements={consentRequirement}onSubmittingChange={setConsentSubmitting}/>@@ -390,7 +377,7 @@ export function OnboardingFlow({ onOpenSupport }: OnboardingFlowProps) {transition={{ duration: 0.3 }}className="min-h-0 w-full flex-1">- <ConnectGitHubStep onNext={handleNext} onBack={handleBack} />+ <ConnectGitHubStep onNext={handleNext} onBack={onBack} /></motion.div>)}@@ -409,21 +396,6 @@ export function OnboardingFlow({ onOpenSupport }: OnboardingFlowProps) {</motion.div>)}- {currentStep === "import-config" && (- <motion.div- key="import-config"- custom={direction}- initial="enter"- animate="center"- exit="exit"- variants={stepVariants}- transition={{ duration: 0.3 }}- className="min-h-0 w-full flex-1"- >- <ImportConfigStep onNext={handleNext} onBack={handleBack} />- </motion.div>- )}-{currentStep === "select-repo" && (<motion.divkey="select-repo"diff --git a/products/desktop/packages/ui/src/features/onboarding/components/ProjectSelectStep.tsx b/products/desktop/packages/ui/src/features/onboarding/components/ProjectSelectStep.tsxindex 7c0364f08eda..f8761098cd3c 100644--- a/products/desktop/packages/ui/src/features/onboarding/components/ProjectSelectStep.tsx+++ b/products/desktop/packages/ui/src/features/onboarding/components/ProjectSelectStep.tsx@@ -53,7 +53,7 @@ interface Org {interface ProjectSelectStepProps {onNext: () => void;- onBack: () => void;+ onBack?: () => void;}export function ProjectSelectStep({ onNext, onBack }: ProjectSelectStepProps) {@@ -380,10 +380,12 @@ export function ProjectSelectStep({ onNext, onBack }: ProjectSelectStepProps) {</Flex><StepActions>- <Button size="3" variant="outline" color="gray" onClick={onBack}>- <ArrowLeft size={16} weight="bold" />- Back- </Button>+ {onBack && (+ <Button size="3" variant="outline" color="gray" onClick={onBack}>+ <ArrowLeft size={16} weight="bold" />+ Back+ </Button>+ )}{isAuthenticated && !isLoading && (<Buttonsize="3"diff --git a/products/desktop/packages/ui/src/features/onboarding/components/WelcomeScreen.tsx b/products/desktop/packages/ui/src/features/onboarding/components/WelcomeScreen.tsxdeleted file mode 100644index f767c832b7cb..000000000000--- a/products/desktop/packages/ui/src/features/onboarding/components/WelcomeScreen.tsx+++ /dev/null@@ -1,322 +0,0 @@-import {- ArrowRight,- ChartLine,- Cloud,- GitPullRequest,- Robot,- Tray,-} from "@phosphor-icons/react";-import { explorerHog } from "@posthog/ui/assets/hedgehogs";-import codeReviewDarkPoster from "@posthog/ui/features/onboarding/assets/code-review-dark.jpg";-import codeReviewDark from "@posthog/ui/features/onboarding/assets/code-review-dark.mp4";-import codeReviewLightPoster from "@posthog/ui/features/onboarding/assets/code-review-light.jpg";-import codeReviewLight from "@posthog/ui/features/onboarding/assets/code-review-light.mp4";-import commandCenterDarkPoster from "@posthog/ui/features/onboarding/assets/command-center-dark.jpg";-import commandCenterDark from "@posthog/ui/features/onboarding/assets/command-center-dark.mp4";-import commandCenterLightPoster from "@posthog/ui/features/onboarding/assets/command-center-light.jpg";-import commandCenterLight from "@posthog/ui/features/onboarding/assets/command-center-light.mp4";-import phcContextDarkPoster from "@posthog/ui/features/onboarding/assets/phc-context-dark.jpg";-import phcContextDark from "@posthog/ui/features/onboarding/assets/phc-context-dark.mp4";-import phcContextLightPoster from "@posthog/ui/features/onboarding/assets/phc-context-light.jpg";-import phcContextLight from "@posthog/ui/features/onboarding/assets/phc-context-light.mp4";-import phcHarnessDarkPoster from "@posthog/ui/features/onboarding/assets/phc-harness-dark.jpg";-import phcHarnessDark from "@posthog/ui/features/onboarding/assets/phc-harness-dark.mp4";-import phcHarnessLightPoster from "@posthog/ui/features/onboarding/assets/phc-harness-light.jpg";-import phcHarnessLight from "@posthog/ui/features/onboarding/assets/phc-harness-light.mp4";-import signalsInboxDarkPoster from "@posthog/ui/features/onboarding/assets/signals-inbox-dark.jpg";-import signalsInboxDark from "@posthog/ui/features/onboarding/assets/signals-inbox-dark.mp4";-import signalsInboxLightPoster from "@posthog/ui/features/onboarding/assets/signals-inbox-light.jpg";-import signalsInboxLight from "@posthog/ui/features/onboarding/assets/signals-inbox-light.mp4";-import { FeatureBentoCard } from "@posthog/ui/features/onboarding/components/FeatureBentoCard";-import { StepActions } from "@posthog/ui/features/onboarding/components/StepActions";-import Logo from "@posthog/ui/primitives/Logo";-import { OnboardingHogTip } from "@posthog/ui/primitives/OnboardingHogTip";-import { useThemeStore } from "@posthog/ui/shell/themeStore";-import { Button, Flex, Text } from "@radix-ui/themes";-import { motion, type Transition } from "framer-motion";-import {- type ReactNode,- useEffect,- useLayoutEffect,- useRef,- useState,-} from "react";--type MediaId =- | "code-review"- | "command-center"- | "phc-context"- | "phc-harness"- | "signals-inbox";--interface MediaDef {- light: { video: string; poster: string };- dark: { video: string; poster: string };- /** Seconds into the clip the still is taken from; playback starts/loops here. */- startTime: number;-}--/** Demo media per feature, keyed per theme; resolved at render. */-const MEDIA: Record<MediaId, MediaDef> = {- "code-review": {- light: { video: codeReviewLight, poster: codeReviewLightPoster },- dark: { video: codeReviewDark, poster: codeReviewDarkPoster },- startTime: 3,- },- "command-center": {- light: { video: commandCenterLight, poster: commandCenterLightPoster },- dark: { video: commandCenterDark, poster: commandCenterDarkPoster },- startTime: 0,- },- "phc-context": {- light: { video: phcContextLight, poster: phcContextLightPoster },- dark: { video: phcContextDark, poster: phcContextDarkPoster },- startTime: 0,- },- "phc-harness": {- light: { video: phcHarnessLight, poster: phcHarnessLightPoster },- dark: { video: phcHarnessDark, poster: phcHarnessDarkPoster },- startTime: 0,- },- "signals-inbox": {- light: { video: signalsInboxLight, poster: signalsInboxLightPoster },- dark: { video: signalsInboxDark, poster: signalsInboxDarkPoster },- startTime: 0,- },-};--interface FeatureDef {- icon: ReactNode;- title: string;- description: string;- /** Marks a card that shows a looping demo video instead of a placeholder. */- media?: MediaId;-}--const FEATURES: FeatureDef[] = [- {- icon: <ChartLine size={28} />,- title: "Product data as context",- description:- "Built-in context on analytics, session replays, experiments, feature flags, and more.",- media: "phc-context",- },- {- icon: <Tray size={26} />,- title: "Your signals inbox",- description:- "Automatically surfaces the highest-impact work from your product data so you always know what to do next.",- media: "signals-inbox",- },- {- icon: <Robot size={22} />,- title: "Your pick of Claude Code or Codex",- description:- "PostHog is harness-agnostic – both Anthropic and OpenAI supported.",- media: "phc-harness",- },- {- icon: <Cloud size={22} />,- title: "Build non-stop",- description:- "Run tasks in parallel across local and cloud environments - even while you're away.",- media: "command-center",- },- {- icon: <GitPullRequest size={22} />,- title: "Review and ship with confidence",- description:- "Inline diffs, AI-assisted code review and PR creation in a single flow.",- media: "code-review",- },-];--// Bento geometry (px). Cards are absolutely positioned into these slots and-// animate between them, so the whole grid slides around rather than snapping.-const GAP = 12;-const ROW0_HEIGHT = 288;-const ROW1_HEIGHT = 224;-const ROW1_TOP = ROW0_HEIGHT + GAP;-const GRID_HEIGHT = ROW1_TOP + ROW1_HEIGHT;--interface Rect {- x: number;- y: number;- width: number;- height: number;-}--/** Slot rectangles for a given container width. Slot 0 is the large cell. */-function slotRects(width: number): Rect[] {- const colWidth = (width - 5 * GAP) / 6;- const left = (col: number) => col * (colWidth + GAP);- const span2 = 2 * colWidth + GAP;- const span4 = 4 * colWidth + 3 * GAP;- return [- { x: left(0), y: 0, width: span4, height: ROW0_HEIGHT },- { x: left(4), y: 0, width: span2, height: ROW0_HEIGHT },- { x: left(0), y: ROW1_TOP, width: span2, height: ROW1_HEIGHT },- { x: left(2), y: ROW1_TOP, width: span2, height: ROW1_HEIGHT },- { x: left(4), y: ROW1_TOP, width: span2, height: ROW1_HEIGHT },- ];-}--/** Spring so every card glides to its new slot together. */-const SLIDE_TRANSITION: Transition = {- type: "spring",- stiffness: 320,- damping: 34,-};--interface WelcomeScreenProps {- onNext: () => void;-}--/** Pointer events are suppressed for this long so the reflow doesn't thrash. */-const REFLOW_MS = 550;--export function WelcomeScreen({ onNext }: WelcomeScreenProps) {- const [hoveredIndex, setHoveredIndex] = useState<number | null>(null);- // order[slot] = feature index currently occupying that slot.- const [order, setOrder] = useState(() => FEATURES.map((_, index) => index));- const [isReflowing, setIsReflowing] = useState(false);- const [gridWidth, setGridWidth] = useState(0);- const isDarkMode = useThemeStore((state) => state.isDarkMode);- const gridRef = useRef<HTMLDivElement>(null);-- // Measure the grid so slot rectangles stay correct and responsive.- useLayoutEffect(() => {- const element = gridRef.current;- if (!element) return;- const update = () => setGridWidth(element.clientWidth);- update();- const observer = new ResizeObserver(update);- observer.observe(element);- return () => observer.disconnect();- }, []);-- // Re-enable pointer events once the slide has settled.- useEffect(() => {- if (!isReflowing) return;- const timeout = setTimeout(() => setIsReflowing(false), REFLOW_MS);- return () => clearTimeout(timeout);- }, [isReflowing]);-- const handleMouseEnter = (index: number) => {- setHoveredIndex(index);- };-- const handleMouseLeave = () => {- setHoveredIndex(null);- };-- // Rotate the order so the clicked card moves into the large slot and every- // other card shifts along with it (keeping their relative order).- const handleSelect = (index: number) => {- const slot = order.indexOf(index);- if (slot <= 0) return; // already in the large slot- setIsReflowing(true);- setOrder((prev) => [...prev.slice(slot), ...prev.slice(0, slot)]);- };-- const rects = slotRects(gridWidth);- // Only the featured (large) card plays. Hover just moves the highlight.- const featuredIndex = order[0];-- return (- <Flex align="center" height="100%" px="8">- <Flex- direction="column"- align="center"- className="h-full w-full pt-[24px] pb-[40px]"- >- <Flex- direction="column"- align="center"- className="min-h-0 w-full flex-1"- >- <Flex- direction="column"- align="start"- className="mx-0 my-auto w-full max-w-[760px] gap-6 overflow-hidden"- >- <Flex direction="row" align="center" gap="3">- <Text- /** Very specifically 25px text to be the same size as the Logo's font size */- className="font-bold text-(--gray-12) text-[25px] tracking-[-0.05em]"- >- Welcome to- </Text>- <Logo />- </Flex>-- <div- ref={gridRef}- className="relative w-full overflow-hidden rounded-lg"- style={{- height: GRID_HEIGHT,- pointerEvents: isReflowing ? "none" : undefined,- }}- >- {gridWidth > 0 &&- FEATURES.map((feature, index) => {- const slot = order.indexOf(index);- const rect = rects[slot];- const mediaDef = feature.media- ? MEDIA[feature.media]- : undefined;- const media = mediaDef?.[isDarkMode ? "dark" : "light"];- return (- <motion.div- key={feature.title}- className="absolute top-0 left-0"- initial={false}- animate={{- x: rect.x,- y: rect.y,- width: rect.width,- height: rect.height,- }}- transition={SLIDE_TRANSITION}- >- <FeatureBentoCard- icon={feature.icon}- title={feature.title}- description={feature.description}- active={- index === featuredIndex && hoveredIndex === null- }- index={index}- videoSrc={media?.video}- posterSrc={media?.poster}- videoStartTime={mediaDef?.startTime}- shouldPlay={index === featuredIndex}- onSelect={- slot === 0 ? undefined : () => handleSelect(index)- }- onMouseEnter={() => handleMouseEnter(index)}- onMouseLeave={handleMouseLeave}- />- </motion.div>- );- })}- </div>- </Flex>- </Flex>-- <Flex direction="column" align="center" className="shrink-0 pt-[16px]">- <OnboardingHogTip- hogSrc={explorerHog}- message="Let's get you set up! It only takes a minute."- />- <StepActions delay={0.25}>- <Button size="3" onClick={() => onNext()}>- Start shipping- <ArrowRight size={16} weight="bold" />- </Button>- </StepActions>- </Flex>- </Flex>- </Flex>- );-}diff --git a/products/desktop/packages/ui/src/features/onboarding/hooks/useHasImportableConfig.ts b/products/desktop/packages/ui/src/features/onboarding/hooks/useHasImportableConfig.tsdeleted file mode 100644index 8aeb728fd903..000000000000--- a/products/desktop/packages/ui/src/features/onboarding/hooks/useHasImportableConfig.ts+++ /dev/null@@ -1,16 +0,0 @@-import { useHostTRPC } from "@posthog/host-router/react";-import { useQuery } from "@tanstack/react-query";--export function useHasImportableConfig(): boolean {- const trpc = useHostTRPC();- const { data } = useQuery(- trpc.onboardingImport.getSummary.queryOptions(undefined, {- staleTime: 60_000,- }),- );- // Loading and error states must NOT include the import-config step: this- // gates a step in a flow the user is standing in, and a step that appears- // while the query is pending and disappears when it settles ejects whoever- // is on it. Only proven importable config earns the step a place.- return data !== undefined && data.total > 0;-}diff --git a/products/desktop/packages/ui/src/features/onboarding/hooks/useOnboardingFlow.ts b/products/desktop/packages/ui/src/features/onboarding/hooks/useOnboardingFlow.tsindex 6b2433b8a153..964d56351044 100644--- a/products/desktop/packages/ui/src/features/onboarding/hooks/useOnboardingFlow.ts+++ b/products/desktop/packages/ui/src/features/onboarding/hooks/useOnboardingFlow.ts@@ -31,7 +31,6 @@ import {type ConsentRequirement,sampleConsentRequirement,} from "./consentRequirement";-import { useHasImportableConfig } from "./useHasImportableConfig";export type { DetectedRepo };@@ -134,7 +133,6 @@ export function useOnboardingFlow() {],);- const hasImportableConfig = useHasImportableConfig();const { data: githubUserIntegrations } = useUserGithubIntegrations();const hasGithubIntegration = githubUserIntegrations? githubUserIntegrations.length > 0@@ -188,12 +186,11 @@ export function useOnboardingFlow() {const activeSteps = useMemo(() =>computeActiveSteps({- hasImportableConfig,hasGithubIntegration,projectCount,consentRequired,}),- [hasImportableConfig, hasGithubIntegration, projectCount, consentRequired],+ [hasGithubIntegration, projectCount, consentRequired],);useEffect(() => {diff --git a/products/desktop/packages/ui/src/features/onboarding/onboardingStore.ts b/products/desktop/packages/ui/src/features/onboarding/onboardingStore.tsindex c5bdcc35d906..9662c369822c 100644--- a/products/desktop/packages/ui/src/features/onboarding/onboardingStore.ts+++ b/products/desktop/packages/ui/src/features/onboarding/onboardingStore.ts@@ -24,7 +24,7 @@ interface OnboardingStoreActions {type OnboardingStore = OnboardingStoreState & OnboardingStoreActions;const initialState: OnboardingStoreState = {- currentStep: "welcome",+ currentStep: "project-select",hasCompletedOnboarding: false,hasShippedFirstPr: false,selectedProjectId: null,@@ -54,7 +54,7 @@ export const useOnboardingStore = create<OnboardingStore>()(resetOnboarding: () => set({ ...initialState }),resetSelections: () =>set({- currentStep: "welcome",+ currentStep: "project-select",selectedProjectId: null,}),selectProjectId: (selectedProjectId) => set({ selectedProjectId }),diff --git a/products/desktop/packages/workspace-server/src/services/onboarding-import/identifiers.ts b/products/desktop/packages/workspace-server/src/services/onboarding-import/identifiers.tsdeleted file mode 100644index b6b4d26fe194..000000000000--- a/products/desktop/packages/workspace-server/src/services/onboarding-import/identifiers.ts+++ /dev/null@@ -1,9 +0,0 @@-import type { OnboardingImportSummary } from "./schemas";--export const ONBOARDING_IMPORT_SERVICE = Symbol.for(- "posthog.workspace.onboardingImport",-);--export interface OnboardingImportService {- getSummary(): Promise<OnboardingImportSummary>;-}diff --git a/products/desktop/packages/workspace-server/src/services/onboarding-import/onboarding-import.module.ts b/products/desktop/packages/workspace-server/src/services/onboarding-import/onboarding-import.module.tsdeleted file mode 100644index f53978df9652..000000000000--- a/products/desktop/packages/workspace-server/src/services/onboarding-import/onboarding-import.module.ts+++ /dev/null@@ -1,9 +0,0 @@-import { ContainerModule } from "inversify";-import { ONBOARDING_IMPORT_SERVICE } from "./identifiers";-import { OnboardingImportServiceImpl } from "./onboarding-import";--export const onboardingImportModule = new ContainerModule(({ bind }) => {- bind(ONBOARDING_IMPORT_SERVICE)- .to(OnboardingImportServiceImpl)- .inSingletonScope();-});diff --git a/products/desktop/packages/workspace-server/src/services/onboarding-import/onboarding-import.test.ts b/products/desktop/packages/workspace-server/src/services/onboarding-import/onboarding-import.test.tsdeleted file mode 100644index 154010a89ef5..000000000000--- a/products/desktop/packages/workspace-server/src/services/onboarding-import/onboarding-import.test.ts+++ /dev/null@@ -1,87 +0,0 @@-import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";-import { tmpdir } from "node:os";-import path from "node:path";-import { afterEach, beforeEach, describe, expect, it } from "vitest";-import type { FoldersService } from "../folders/folders";-import { OnboardingImportServiceImpl } from "./onboarding-import";--let home: string;-let originalHome: string | undefined;--const emptyFolders = {- getFolders: async () => [],-} as unknown as FoldersService;--async function writeJson(file: string, data: unknown) {- await mkdir(path.dirname(file), { recursive: true });- await writeFile(file, JSON.stringify(data));-}--async function createUserSkill(name: string) {- const skillPath = path.join(home, ".claude", "skills", name);- await mkdir(skillPath, { recursive: true });- await writeFile(- path.join(skillPath, "SKILL.md"),- `---\nname: ${name}\ndescription: a ${name} skill\n---\n`,- );-}--beforeEach(async () => {- home = await mkdtemp(path.join(tmpdir(), "onboarding-import-test-"));- originalHome = process.env.HOME;- process.env.HOME = home;-});--afterEach(async () => {- process.env.HOME = originalHome;- await rm(home, { recursive: true, force: true });-});--describe("OnboardingImportServiceImpl.getSummary", () => {- it("returns zeroes when nothing is configured", async () => {- const service = new OnboardingImportServiceImpl(emptyFolders);- const summary = await service.getSummary();- expect(summary).toEqual({- total: 0,- skills: { count: 0, paths: [] },- plugins: { count: 0, paths: [] },- mcpServers: { count: 0, paths: [] },- permissions: { count: 0, paths: [] },- });- });-- it("counts user skills, mcp servers, and permission rules", async () => {- await createUserSkill("alpha");- await createUserSkill("beta");- await writeJson(path.join(home, ".claude.json"), {- mcpServers: { one: {}, two: {} },- });- await writeJson(path.join(home, ".claude", "settings.json"), {- permissions: { allow: ["a", "b"], deny: ["c"] },- });-- const service = new OnboardingImportServiceImpl(emptyFolders);- const summary = await service.getSummary();-- expect(summary.skills.count).toBe(2);- expect(summary.skills.paths).toEqual(["~/.claude/skills"]);- expect(summary.mcpServers.count).toBe(2);- expect(summary.mcpServers.paths).toEqual(["~/.claude.json"]);- expect(summary.permissions.count).toBe(3);- expect(summary.permissions.paths).toEqual(["~/.claude/settings.json"]);- expect(summary.total).toBe(7);- });-- it("ignores malformed config files", async () => {- await mkdir(path.join(home, ".claude"), { recursive: true });- await writeFile(path.join(home, ".claude.json"), "not json");- await writeFile(path.join(home, ".claude", "settings.json"), "{ bad");-- const service = new OnboardingImportServiceImpl(emptyFolders);- const summary = await service.getSummary();-- expect(summary.mcpServers.count).toBe(0);- expect(summary.permissions.count).toBe(0);- expect(summary.total).toBe(0);- });-});diff --git a/products/desktop/packages/workspace-server/src/services/onboarding-import/onboarding-import.ts b/products/desktop/packages/workspace-server/src/services/onboarding-import/onboarding-import.tsdeleted file mode 100644index 7b45e3393291..000000000000--- a/products/desktop/packages/workspace-server/src/services/onboarding-import/onboarding-import.ts+++ /dev/null@@ -1,120 +0,0 @@-import * as fs from "node:fs";-import * as os from "node:os";-import * as path from "node:path";-import { inject, injectable } from "inversify";-import type { FoldersService } from "../folders/folders";-import { FOLDERS_SERVICE } from "../folders/identifiers";-import {- getMarketplaceInstallPaths,- readSkillMetadataFromDir,-} from "../skills/skill-discovery";-import type { OnboardingImportService } from "./identifiers";-import type { OnboardingImportSummary } from "./schemas";--function toDisplayPath(absolutePath: string): string {- const home = os.homedir();- return absolutePath.startsWith(home)- ? absolutePath.replace(home, "~")- : absolutePath;-}--function readClaudeMcpServers(): { count: number; paths: string[] } {- const file = path.join(os.homedir(), ".claude.json");- try {- const cfg = JSON.parse(fs.readFileSync(file, "utf-8")) as {- mcpServers?: Record<string, unknown>;- };- const count =- cfg.mcpServers && typeof cfg.mcpServers === "object"- ? Object.keys(cfg.mcpServers).length- : 0;- return { count, paths: count > 0 ? [toDisplayPath(file)] : [] };- } catch {- return { count: 0, paths: [] };- }-}--function readClaudePermissions(): { count: number; paths: string[] } {- const file = path.join(os.homedir(), ".claude", "settings.json");- try {- const settings = JSON.parse(fs.readFileSync(file, "utf-8")) as {- permissions?: { allow?: unknown; deny?: unknown };- };- const allow = Array.isArray(settings?.permissions?.allow)- ? settings.permissions.allow.length- : 0;- const deny = Array.isArray(settings?.permissions?.deny)- ? settings.permissions.deny.length- : 0;- const count = allow + deny;- return { count, paths: count > 0 ? [toDisplayPath(file)] : [] };- } catch {- return { count: 0, paths: [] };- }-}--@injectable()-export class OnboardingImportServiceImpl implements OnboardingImportService {- constructor(- @inject(FOLDERS_SERVICE)- private readonly folders: FoldersService,- ) {}-- async getSummary(): Promise<OnboardingImportSummary> {- const folders = await this.folders.getFolders();- const marketplacePaths = await getMarketplaceInstallPaths();-- const userSkillsDir = path.join(os.homedir(), ".claude", "skills");- const repoSkillDirs = folders.map((f) => ({- dir: path.join(f.path, ".claude", "skills"),- name: f.name,- }));- const marketplaceSkillDirs = marketplacePaths.map((p) =>- path.join(p, "skills"),- );-- const [userSkills, repoResults, marketplaceResults] = await Promise.all([- readSkillMetadataFromDir(userSkillsDir, "user"),- Promise.all(- repoSkillDirs.map(async (d) => ({- dir: d.dir,- skills: await readSkillMetadataFromDir(d.dir, "repo", d.name),- })),- ),- Promise.all(- marketplaceSkillDirs.map(async (dir) => ({- dir,- skills: await readSkillMetadataFromDir(dir, "marketplace"),- })),- ),- ]);-- const skillsPaths = [- ...(userSkills.length > 0 ? [userSkillsDir] : []),- ...repoResults.filter((r) => r.skills.length > 0).map((r) => r.dir),- ...marketplaceResults- .filter((r) => r.skills.length > 0)- .map((r) => r.dir),- ].map(toDisplayPath);-- const skillsCount =- userSkills.length +- repoResults.reduce((sum, r) => sum + r.skills.length, 0) +- marketplaceResults.reduce((sum, r) => sum + r.skills.length, 0);-- const plugins = {- count: marketplacePaths.length,- paths: marketplacePaths.map(toDisplayPath),- };- const mcpServers = readClaudeMcpServers();- const permissions = readClaudePermissions();-- return {- total: skillsCount + plugins.count + mcpServers.count + permissions.count,- skills: { count: skillsCount, paths: skillsPaths },- plugins,- mcpServers,- permissions,- };- }-}diff --git a/products/desktop/packages/workspace-server/src/services/onboarding-import/schemas.ts b/products/desktop/packages/workspace-server/src/services/onboarding-import/schemas.tsdeleted file mode 100644index 31f63fd82043..000000000000--- a/products/desktop/packages/workspace-server/src/services/onboarding-import/schemas.ts+++ /dev/null@@ -1,16 +0,0 @@-import { z } from "zod";--const category = z.object({- count: z.number(),- paths: z.array(z.string()),-});--export const summaryOutput = z.object({- total: z.number(),- skills: category,- plugins: category,- mcpServers: category,- permissions: category,-});--export type OnboardingImportSummary = z.infer<typeof summaryOutput>;diff --git a/products/desktop/scripts/optimize-onboarding-videos.mjs b/products/desktop/scripts/optimize-onboarding-videos.mjsdeleted file mode 100755index 90c12b441aa8..000000000000--- a/products/desktop/scripts/optimize-onboarding-videos.mjs+++ /dev/null@@ -1,175 +0,0 @@-#!/usr/bin/env node-// Optimize the onboarding bento-card demo videos for smooth in-app playback.-//-// The cards (packages/ui/src/features/onboarding) play a short looping clip in-// a slot that never renders wider than ~500 CSS px. Raw screen recordings come-// in at 2x+ that resolution with the moov atom at the end of the file, which-// makes playback hitch on first play / seek / the framer-motion slot reflow.-//-// This re-encodes each clip to a sane width with faststart so the player can-// begin instantly, and tags the output so re-runs skip already-optimized files.-//-// See .claude/skills/onboarding-videos/SKILL.md for the full workflow (posters,-// adding a new clip, the WelcomeScreen videoStartTime contract).-import { execFileSync } from "node:child_process";-import { readdirSync, renameSync, statSync } from "node:fs";-import { dirname, join } from "node:path";-import { fileURLToPath } from "node:url";--const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..");-const ASSET_DIR = join(ROOT, "packages/ui/src/features/onboarding/assets");--// Tuning. The poster JPGs are authored at 1000px wide; match them so the-// poster -> first-frame seam is pixel-consistent. Bump only if the bento slot-// grows — bigger means heavier decode for no visible gain at this size.-const TARGET_WIDTH = 1000;-const CRF = 23; // visually lossless for flat UI screencasts; lower = bigger.-const PRESET = "veryslow"; // one-time encode, so spend the CPU on compression.-// Marker written into the file's `comment` tag so re-runs are idempotent.-const MARKER = `optimized-by=optimize-onboarding-videos w<=${TARGET_WIDTH} crf=${CRF}`;--const USAGE = `optimize-onboarding-videos — re-encode onboarding demo clips for smooth playback.-- node scripts/optimize-onboarding-videos.mjs optimize clips not already optimized- node scripts/optimize-onboarding-videos.mjs --force re-encode every clip (e.g. after changing TARGET_WIDTH/CRF)- node scripts/optimize-onboarding-videos.mjs --dry-run report what would change, encode nothing--Target: H.264 yuv420p, width<=${TARGET_WIDTH}px, CRF ${CRF}, faststart, no audio.`;--const args = new Set(process.argv.slice(2));-if (args.has("-h") || args.has("--help")) {- console.log(USAGE);- process.exit(0);-}-const force = args.has("--force");-const dryRun = args.has("--dry-run");--function ffprobe(file, entries, stream) {- const selectArgs = stream ? ["-select_streams", stream] : [];- return execFileSync(- "ffprobe",- [- "-v",- "error",- ...selectArgs,- "-show_entries",- entries,- "-of",- "default=noprint_wrappers=1:nokey=1",- file,- ],- { encoding: "utf8" },- ).trim();-}--function isOptimized(file) {- const comment = ffprobe(file, "format_tags=comment");- const width = Number(ffprobe(file, "stream=width", "v:0"));- return comment === MARKER && Number.isFinite(width) && width <= TARGET_WIDTH;-}--function kb(bytes) {- return `${(bytes / 1024).toFixed(0)} KB`;-}--function ensureFfmpeg() {- try {- execFileSync("ffmpeg", ["-version"], { stdio: "ignore" });- execFileSync("ffprobe", ["-version"], { stdio: "ignore" });- } catch {- console.error(- "ffmpeg/ffprobe not found on PATH. Install with: brew install ffmpeg",- );- process.exit(1);- }-}--function optimize(file) {- const before = statSync(file).size;- const tmp = `${file}.opt.mp4`;- execFileSync(- "ffmpeg",- [- "-y",- "-i",- file,- // Cap width, keep aspect with an even height, crisp downscale. Never- // upscales a source already narrower than the target.- "-vf",- `scale='min(${TARGET_WIDTH},iw)':-2:flags=lanczos`,- "-c:v",- "libx264",- "-profile:v",- "high",- "-pix_fmt",- "yuv420p",- "-crf",- String(CRF),- "-preset",- PRESET,- "-movflags",- "+faststart", // moov atom up front -> player starts without reading EOF.- "-an", // muted in the UI; drop the audio track entirely.- "-map_metadata",- "-1", // strip source metadata, then stamp our marker.- "-metadata",- `comment=${MARKER}`,- tmp,- ],- { stdio: ["ignore", "ignore", "inherit"] },- );- const after = statSync(tmp).size;- renameSync(tmp, file);- return { before, after };-}--ensureFfmpeg();--let clips;-try {- clips = readdirSync(ASSET_DIR)- .filter((name) => name.endsWith(".mp4"))- .sort();-} catch {- console.error(`Asset dir not found: ${ASSET_DIR}`);- process.exit(1);-}--if (clips.length === 0) {- console.error(`No .mp4 clips in ${ASSET_DIR}`);- process.exit(1);-}--let optimized = 0;-let skipped = 0;-let totalBefore = 0;-let totalAfter = 0;--for (const name of clips) {- const file = join(ASSET_DIR, name);- if (!force && isOptimized(file)) {- console.log(` skip ${name} (already optimized)`);- skipped++;- continue;- }- if (dryRun) {- console.log(` would ${name} (${kb(statSync(file).size)})`);- continue;- }- const { before, after } = optimize(file);- totalBefore += before;- totalAfter += after;- optimized++;- const pct = (((before - after) / before) * 100).toFixed(0);- console.log(` ok ${name} ${kb(before)} -> ${kb(after)} (-${pct}%)`);-}--if (dryRun) {- console.log(`\nDry run: ${clips.length - skipped} clip(s) would be encoded.`);-} else if (optimized > 0) {- console.log(- `\nOptimized ${optimized} clip(s): ${kb(totalBefore)} -> ${kb(totalAfter)} total.`,- );-} else {- console.log("\nNothing to do — all clips already optimized.");-}