The VS Code of video editing, built for agents.
TypeScript
Remove onboarding page and related references
konstantin-paulus9fc1926acf0d
diff --git a/apps/web/src/app.tsx b/apps/web/src/app.tsxindex 39361eb9..a57cf178 100644--- a/apps/web/src/app.tsx+++ b/apps/web/src/app.tsx@@ -17,7 +17,6 @@ import { ScreenTooSmall } from '@/components/screen-too-small';import { UnsupportedBrowser } from '@/components/unsupported-browser';import { ProjectPage } from '@/pages/project';import { LoginPage } from '@/pages/login';-import { OnboardingPage, onboardingCompleted } from '@/pages/onboarding';import { AuthCallbackPage } from '@/pages/auth-callback';import { NotFoundPage } from '@/pages/not-found';import { DashboardPage } from '@/pages/dashboard';@@ -28,12 +27,7 @@ function AuthGate(props: { children: JSX.Element }) {return (<Show when={!auth.isLoading()}><Show when={auth.isAuthenticated() || auth.headless()}>- <Show- when={onboardingCompleted() || auth.headless()}- fallback={<OnboardingPage />}- >- {props.children}- </Show>+ {props.children}</Show><Show when={!auth.isAuthenticated()}><LoginPage />diff --git a/apps/web/src/lib/desktop-app.ts b/apps/web/src/lib/desktop-app.tsindex ba502898..160e4e49 100644--- a/apps/web/src/lib/desktop-app.ts+++ b/apps/web/src/lib/desktop-app.ts@@ -16,7 +16,7 @@ const DOWNLOAD_URL ="https://github.com/diffusionstudio/editor/releases/latest/download/Diffusion-Studio-arm64.dmg";/** Where a download was started from, so the promos can be compared. */-export type DesktopAppDownloadSource = "canvas_banner" | "dashboard_footer" | "main_menu" | "onboarding";+export type DesktopAppDownloadSource = "canvas_banner" | "dashboard_footer" | "main_menu";function isMacOS() {const uaData = (navigator as { userAgentData?: { platform?: string } }).userAgentData;diff --git a/apps/web/src/pages/onboarding.tsx b/apps/web/src/pages/onboarding.tsxdeleted file mode 100644index 923aea60..00000000--- a/apps/web/src/pages/onboarding.tsx+++ /dev/null@@ -1,247 +0,0 @@-/* This Source Code Form is subject to the terms of the Mozilla Public- * License, v. 2.0. If a copy of the MPL was not distributed with this- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */--import { createSignal, onMount, Show } from 'solid-js';-import type { JSX } from 'solid-js';-import { toast } from 'somoto';--import { MAIN_CHANNELS } from '@desktop/main-channels';-import { Button } from '@/components/ui/button';-import { Icon } from '@/components/ui/icon';-import { downloadDesktopApp } from '@/lib/desktop-app';-import { createStoredSignal } from '@/lib/store';-import { mainBridge } from '@/lib/ipc';-import { track } from '@/lib/analytics';-import { store } from '@/init';--const [onboardingCompleted, setOnboardingCompleted] = createStoredSignal(- store.define('onboarding.completed', false),-);--export { onboardingCompleted };--type StepState = 'todo' | 'busy' | 'done';--type SetupRowProps = {- title: string;- description: string;- action: JSX.Element;-};--function SetupRow(props: SetupRowProps) {- return (- <div class="flex items-center gap-4">- <div class="flex min-w-0 flex-1 flex-col gap-1">- <p class="text-xs text-foreground">{props.title}</p>- <p class="text-xs text-muted-foreground">{props.description}</p>- </div>- {props.action}- </div>- );-}--type StepButtonProps = {- state: StepState;- label: string;- busyLabel?: string;- doneLabel: string;- onClick: () => void;-};--function StepButton(props: StepButtonProps) {- return (- <Show- when={props.state !== 'done'}- fallback={- <Button variant="on" class="pointer-events-none">- {props.doneLabel}- </Button>- }- >- <Button- variant="secondary"- disabled={props.state === 'busy'}- onClick={props.onClick}- >- {props.state === 'busy' ? props.busyLabel ?? props.label : props.label}- </Button>- </Show>- );-}--/**- * Post-signup screen for connecting agents to the app: its MCP server, which- * carries the tools and the authoring reference, and the dapi CLI. Shown by- * AuthGate until dismissed; the dismissal is per-device (same store as the- * promo banners).- *- * On desktop there are two agent steps, both via main and both also in the- * app menu: registering the bundled `dapi mcp` with the agents on this- * machine, and linking the `dapi` binary into PATH for shells and scripts.- * On the web, where neither exists, one row offers the desktop app instead.- */-export function OnboardingPage() {- const isDesktop = !!window.desktop;- const [mcpState, setMcpState] = createSignal<StepState>('todo');- const [cliState, setCliState] = createSignal<StepState>('todo');-- onMount(async () => {- if (!isDesktop) return;- try {- const [mcp, cli] = await Promise.all([- mainBridge.call(MAIN_CHANNELS.MCP_IS_REGISTERED, undefined),- mainBridge.call(MAIN_CHANNELS.CLI_IS_INSTALLED, undefined),- ]);- if (mcp) setMcpState('done');- if (cli) setCliState('done');- } catch {- // Can't tell — leave the install buttons available.- }- });-- const registerMcp = async () => {- setMcpState('busy');- try {- const result = await mainBridge.call(MAIN_CHANNELS.MCP_REGISTER, undefined);- if (result.status === 'registered') {- track('onboarding_mcp_registered', { agents: result.agents.join(',') });- setMcpState('done');- toast('Connected', {- description: `Registered with ${result.agents.join(', ')}. Restart the agent to pick it up.`,- });- } else {- setMcpState('todo');- toast('Could not connect your agents', { description: result.error });- }- } catch (error) {- setMcpState('todo');- toast('Could not connect your agents', {- description: error instanceof Error ? error.message : 'Unknown error',- });- }- };-- const installCli = async () => {- setCliState('busy');- try {- const result = await mainBridge.call(MAIN_CHANNELS.CLI_INSTALL, undefined);- if (result.status === 'installed') {- track('onboarding_cli_installed');- setCliState('done');- } else {- setCliState('todo');- if (result.status === 'error') {- toast('Could not install the dapi CLI', { description: result.error });- }- }- } catch (error) {- setCliState('todo');- toast('Could not install the dapi CLI', {- description: error instanceof Error ? error.message : 'Unknown error',- });- }- };-- // The web has one row for both: the server and the CLI ship with the app.- const downloadApp = () => {- downloadDesktopApp('onboarding');- setMcpState('done');- setCliState('done');- };-- const allDone = () => mcpState() === 'done' && cliState() === 'done';-- const finish = (event: 'onboarding_completed' | 'onboarding_skipped') => {- track(event);- setOnboardingCompleted(true);- };-- return (- <div class="flex flex-col bg-background fixed inset-0 z-999">- <Show when={!isDesktop}>- <div class="flex items-center gap-1 p-4">- <Icon name="diffusion-logo" class="size-6" />- <span class="text-sm font-450 text-foreground">Diffusion Studio</span>- </div>- </Show>-- <div class="flex flex-1 items-center justify-center pb-16">- <div class="flex w-124 max-w-[calc(100vw-2rem)] flex-col gap-6">- <div class="flex flex-col">- <div class="flex flex-col gap-1 px-2 pt-2 pb-3">- <h2 class="text-[12px] font-450 text-foreground">Connect your agent</h2>- <p class="text-xs text-muted-foreground">- Edit videos with coding agents like Claude Code, Codex, or Cursor.- </p>- </div>-- <div class="flex flex-col gap-3 rounded-xl bg-accent/40 p-4">- <Show- when={isDesktop}- fallback={- <SetupRow- title="Desktop app"- description="Ships the MCP server and the dapi CLI that agents control the editor with."- action={- <StepButton- state={mcpState()}- label="Get app"- doneLabel="Downloaded"- onClick={downloadApp}- />- }- />- }- >- <SetupRow- title="MCP server"- description="Lets agents like Claude Code, Codex, and Cursor control the editor."- action={- <StepButton- state={mcpState()}- label="Connect"- busyLabel="Connecting…"- doneLabel="Connected"- onClick={registerMcp}- />- }- />-- <div class="h-px w-full bg-border" />-- <SetupRow- title="dapi CLI"- description="The dapi command in your shell, for scripts and for agents without MCP."- action={- <StepButton- state={cliState()}- label="Install"- busyLabel="Installing…"- doneLabel="Installed"- onClick={installCli}- />- }- />- </Show>-- </div>- </div>-- <div class="flex items-center gap-2 px-2">- <Button disabled={!allDone()} onClick={() => finish('onboarding_completed')}>- Get started- </Button>- <Button- variant="ghost"- class="text-muted-foreground"- onClick={() => finish('onboarding_skipped')}- >- Setup later- </Button>- </div>- </div>- </div>- </div>- );-}