Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
feat(onboarding): first-run setup tour — info + interaction per step
enes54312b13895f
diff --git a/src/renderer/canvas/Canvas.tsx b/src/renderer/canvas/Canvas.tsxindex de9528b2a..ce30bcb2c 100644--- a/src/renderer/canvas/Canvas.tsx+++ b/src/renderer/canvas/Canvas.tsx@@ -75,6 +75,7 @@ import { SourceControlPanel } from '../components/SourceControlPanel'import { WelcomeScreen } from '../components/WelcomeScreen'import { CloneRepoDialog } from '../components/CloneRepoDialog'import { ShortcutsPanel } from '../components/ShortcutsPanel'+import { OnboardingFlow } from '../components/onboarding/OnboardingFlow'import { DictationOverlay, type DictationTarget } from '../components/DictationOverlay'import { BugReportDialog } from '../components/BugReportDialog'import { describeOs, REPO_URL } from '../lib/bugReport'@@ -464,6 +465,8 @@ export function Canvas() {const [settingsSection, setSettingsSection] = useState<SettingsSectionId | undefined>(undefined)const [scOpen, setScOpen] = useState(false)const [shortcutsOpen, setShortcutsOpen] = useState(false)+ // First-run setup tour (agents / dictation / kanban / notifications) — see OnboardingFlow.+ const [onboardingOpen, setOnboardingOpen] = useState(false)const [dictationOpen, setDictationOpen] = useState(false)// Target = the first selected terminal node AT OPEN TIME (not live-tracked while the// overlay is up — the design explicitly freezes it so a stray click elsewhere mid-dictation@@ -1094,9 +1097,16 @@ export function Canvas() {.getState().hydrate().then(() => {- if (!useSettings.getState().settings.seenShortcuts) {- setShortcutsOpen(true)- useSettings.getState().update({ seenShortcuts: true })+ const s = useSettings.getState().settings+ if (s.seenOnboarding) return+ if (s.seenShortcuts) {+ // Existing install (pre-tour): the setup tour is for fresh installs — migrate+ // silently so it never pops over an established workspace. Rerunnable via ⌘K.+ useSettings.getState().update({ seenOnboarding: true })+ } else {+ // Fresh install: the tour replaces the auto-opened ShortcutsPanel (⌘/ still+ // opens it manually) and owns the notification-consent question.+ setOnboardingOpen(true)}})api.workspace.load().then((ws) => {@@ -5275,13 +5285,16 @@ export function Canvas() {// First-launch consent: ask once whether to enable Claude completion notifications.// Gated on settings hydration — otherwise it runs before settings load from disk and// sees the default (notifyConsentAsked=false) on every launch, re-asking each time.+ // While the setup tour is pending (seenOnboarding false), the tour owns this question —+ // its last step asks it in context instead of a standalone dialog popping over the tour.const settingsHydrated = useSettings((s) => s.hydrated)+ const seenOnboarding = useSettings((s) => s.settings.seenOnboarding)useEffect(() => {- if (!settingsHydrated) return+ if (!settingsHydrated || !seenOnboarding) returnif (useSettings.getState().settings.notifyConsentAsked) returnuseSettings.getState().update({ notifyConsentAsked: true, notifyOnClaudeDone: false })setConsentOpen(true)- }, [settingsHydrated])+ }, [settingsHydrated, seenOnboarding])// Load saved SSH servers once so the RemotePicker / palette have them available.useEffect(() => {@@ -5759,6 +5772,13 @@ export function Canvas() {run: () => useViewMode.getState().toggle(kanbanId)})}+ cmds.push({+ id: 'setup-tour',+ label: 'Setup tour',+ hint: 'welcome onboarding first-run',+ section: 'View',+ run: () => setOnboardingOpen(true)+ })return cmds}, [addTerminal,@@ -6215,6 +6235,21 @@ export function Canvas() {)}{shortcutsOpen && <ShortcutsPanel onClose={() => setShortcutsOpen(false)} />}+ {onboardingOpen && (+ <OnboardingFlow+ onClose={() => {+ setOnboardingOpen(false)+ const s = useSettings.getState().settings+ useSettings.getState().update({+ seenOnboarding: true,+ seenShortcuts: true,+ // Skipping the tour is also a consent answer — the standalone dialog must not+ // pop right on top of a just-skipped setup. Re-decidable in Settings.+ ...(s.notifyConsentAsked ? {} : { notifyConsentAsked: true, notifyOnClaudeDone: false })+ })+ }}+ />+ )}{dictationOpen && (<DictationOverlaydiff --git a/src/renderer/components/onboarding/OnboardingFlow.tsx b/src/renderer/components/onboarding/OnboardingFlow.tsxnew file mode 100644index 000000000..fd5cc89db--- /dev/null+++ b/src/renderer/components/onboarding/OnboardingFlow.tsx@@ -0,0 +1,334 @@+import { useCallback, useEffect, useState } from 'react'+import { createPortal } from 'react-dom'+import type { SpeechModelInfo } from '@shared/types'+import { AGENT_CONFIG, BUILTIN_AGENT_IDS, type BuiltinAgentId } from '@shared/agents/config'+import { isHoldChord, shortcutKeyParts } from '@shared/shortcut'+import { keyLabel } from '@shared/platform-utils'+import { useSettings } from '../../state/settings'+import { useEntitlement } from '../../state/entitlement'+import {+ OnbBrandMark,+ OnbGhostCanvas,+ SceneAgents,+ SceneDictation,+ SceneKanban,+ SceneNotify+} from './scenes'++const isMac = /Mac/i.test(navigator.platform || navigator.userAgent)++/** `large-v3-turbo` -> `"Large V3 Turbo"` (same rendering as Settings → Speech). */+function modelLabel(id: string): string {+ return id+ .split('-')+ .map((w) => w.charAt(0).toUpperCase() + w.slice(1))+ .join(' ')+}++function formatSize(mb: number): string {+ return mb >= 1000 ? `${(mb / 1000).toFixed(1)} GB` : `${Math.round(mb)} MB`+}++/** Info step + the setting it configures, one per screen. Step 0 is the welcome cover. */+const STEP_COUNT = 5++/**+ * First-run setup tour: welcome → agents → dictation → kanban → notifications. Each step+ * pairs an animated scene with ONE decision, and every choice writes settings immediately+ * (there is no final "save" — closing mid-way keeps what was chosen so far). Replaces both+ * the auto-opened ShortcutsPanel and the standalone notification-consent dialog on first+ * launch; rerunnable via the ⌘K "Setup tour" command.+ */+export function OnboardingFlow({ onClose }: { onClose: () => void }) {+ const settings = useSettings((s) => s.settings)+ const update = useSettings((s) => s.update)+ const isPremium = useEntitlement((s) => s.isPremium)+ const [step, setStep] = useState(0)++ // ---- dictation models (loaded once; selection + download mirror Settings → Speech) ----+ const [models, setModels] = useState<SpeechModelInfo[]>([])+ const [progress, setProgress] = useState<Record<string, number>>({})+ const [modelHint, setModelHint] = useState('')+ const refreshModels = useCallback(async () => {+ try {+ setModels(await window.nodeTerminal.speech.models())+ } catch {+ // transient read error — the list just stays empty and the step degrades to info-only+ }+ }, [])+ useEffect(() => {+ void refreshModels()+ const unsub = window.nodeTerminal.speech.onProgress(({ id, pct }) => {+ setProgress((p) => ({ ...p, [id]: pct }))+ if (pct >= 100) {+ setProgress((p) => {+ const next = { ...p }+ delete next[id]+ return next+ })+ void refreshModels()+ }+ })+ return unsub+ }, [refreshModels])++ const pickModel = (m: SpeechModelInfo): void => {+ if (m.pro && !isPremium) {+ setModelHint('Pro model — unlock later in Settings → License. Tiny is free and works offline.')+ return+ }+ setModelHint('')+ update({ speech: { ...settings.speech, model: m.id } })+ if (!m.downloaded && progress[m.id] === undefined) {+ setProgress((p) => ({ ...p, [m.id]: 0 }))+ window.nodeTerminal.speech.downloadModel(m.id).catch(() => {+ setProgress((p) => {+ const next = { ...p }+ delete next[m.id]+ return next+ })+ setModelHint('Download failed — you can retry any time in Settings → Speech.')+ })+ }+ }++ // ---- kanban try-it: catch a real ⌘⇧B while the step is up (capture phase, so the+ // canvas's own toggle handler never fires under the tour) ----+ const [kanbanTried, setKanbanTried] = useState(false)+ const [kanbanPulse, setKanbanPulse] = useState(0)+ useEffect(() => {+ if (step !== 3) return+ const onKey = (e: KeyboardEvent) => {+ if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.key.toLowerCase() === 'b') {+ e.preventDefault()+ e.stopPropagation()+ setKanbanTried(true)+ setKanbanPulse((n) => n + 1)+ }+ }+ window.addEventListener('keydown', onKey, true)+ return () => window.removeEventListener('keydown', onKey, true)+ }, [step])++ // Esc skips the tour (settings chosen so far are already saved).+ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if (e.key === 'Escape') onClose()+ }+ window.addEventListener('keydown', onKey)+ return () => window.removeEventListener('keydown', onKey)+ }, [onClose])++ // ---- notifications (last step: both choices finish the tour) ----+ const finishWithNotifications = (enable: boolean): void => {+ update({ notifyOnClaudeDone: enable, notifyConsentAsked: true })+ if (enable) {+ void window.nodeTerminal.notify({+ title: 'Notifications enabled',+ body: "You'll be told when an agent finishes in the background.",+ nodeId: '',+ force: true+ })+ }+ onClose()+ }++ // `defaultAgent` is always a launchable builtin per its doc, but the type is open — guard.+ const agentId: BuiltinAgentId = (BUILTIN_AGENT_IDS as readonly string[]).includes(settings.defaultAgent)+ ? (settings.defaultAgent as BuiltinAgentId)+ : 'claude'+ const agent = AGENT_CONFIG[agentId]+ const dictKeys = shortcutKeyParts(settings.speech.shortcut, isMac)+ const dictHold = isHoldChord(settings.speech.shortcut)++ const next = () => setStep((s) => Math.min(s + 1, STEP_COUNT - 1))+ const back = () => setStep((s) => Math.max(s - 1, 0))++ return createPortal(+ <div className="onb">+ {step === 0 && <OnbGhostCanvas />}+ <button className="onb-skip" onClick={onClose}>+ Skip setup+ </button>++ {step === 0 ? (+ <div className="onb-cover">+ <div className="onb-cover__brand">+ <OnbBrandMark />+ <span className="onb-cover__name">nodeterm</span>+ </div>+ <p className="onb-cover__tagline">A canvas of terminals — spatial, not stacked.</p>+ <div className="onb-cover__props">+ <div className="onb-prop">+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round">+ <rect x="3" y="4" width="18" height="14" rx="2" />+ <path d="M7 9l3 2.5L7 14M12.5 14H17" />+ </svg>+ <span>Terminals never die — tmux keeps them running across restarts</span>+ </div>+ <div className="onb-prop">+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round">+ <circle cx="12" cy="12" r="3" />+ <path d="M12 2v4M12 18v4M2 12h4M18 12h4" />+ </svg>+ <span>AI agents are first-class nodes — Claude, Codex, Gemini, opencode</span>+ </div>+ <div className="onb-prop">+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round">+ <rect x="3" y="3" width="7" height="7" rx="1.5" />+ <rect x="14" y="8" width="7" height="7" rx="1.5" />+ <rect x="6" y="14" width="7" height="7" rx="1.5" />+ </svg>+ <span>Lay your work out in space — pan, zoom, group, connect</span>+ </div>+ </div>+ <button className="onb-btn onb-btn--primary onb-cover__cta" autoFocus onClick={next}>+ Set up in a minute →+ </button>+ </div>+ ) : (+ <div className="onb-card">+ <div className="onb-scene">+ {step === 1 && <SceneAgents label={agent.label} color={agent.color} />}+ {step === 2 && <SceneDictation keys={dictKeys.map((k) => keyLabel(k, isMac))} hold={dictHold} />}+ {step === 3 && <SceneKanban pulseKey={kanbanPulse} />}+ {step === 4 && <SceneNotify />}+ </div>+ <div className="onb-pane">+ <div className="onb-step-no">Step {step} of {STEP_COUNT - 1}</div>++ {step === 1 && (+ <>+ <h2>Everything is a node</h2>+ <p>+ Right-click the canvas to open a terminal — or an AI agent. Each one runs in+ its own persistent tmux session.+ </p>+ <div className="onb-label">Default agent (what ⌘⇧C opens)</div>+ <div className="onb-agent-grid">+ {BUILTIN_AGENT_IDS.map((id) => (+ <button+ key={id}+ className={`onb-agent ${settings.defaultAgent === id ? 'is-selected' : ''}`}+ onClick={() => update({ defaultAgent: id })}+ >+ <span className="onb-dot" style={{ background: AGENT_CONFIG[id].color }} />+ {AGENT_CONFIG[id].label}+ </button>+ ))}+ </div>+ <div className="onb-fineprint">+ Bring your own CLI too — add custom agents in Settings → Agents.+ </div>+ </>+ )}++ {step === 2 && (+ <>+ <h2>Talk to your terminal</h2>+ <p>+ {dictHold ? 'Hold' : 'Press'}{' '}+ {dictKeys.map((k, i) => (+ <kbd key={i} className="kbd">+ {keyLabel(k, isMac)}+ </kbd>+ ))}{' '}+ anywhere to dictate — on-device Whisper turns speech into text. Nothing is+ sent to the cloud, and nothing auto-submits.+ </p>+ <div className="onb-label">Whisper model</div>+ <div className="onb-models">+ {models.map((m) => {+ const selected = settings.speech.model === m.id+ const pct = progress[m.id]+ return (+ <button+ key={m.id}+ className={`onb-model ${selected ? 'is-selected' : ''} ${m.pro && !isPremium ? 'is-locked' : ''}`}+ onClick={() => pickModel(m)}+ >+ <span className="onb-model__radio" />+ <span className="onb-model__name">{modelLabel(m.id)}</span>+ <span className="onb-model__size">{formatSize(m.sizeMB ?? m.approxMB)}</span>+ {m.pro && <span className="onb-pro">PRO</span>}+ {m.downloaded && <span className="onb-model__ok">✓</span>}+ {pct !== undefined && (+ <span className="onb-model__bar">+ <span style={{ width: `${pct}%` }} />+ </span>+ )}+ </button>+ )+ })}+ </div>+ {modelHint && <div className="onb-fineprint">{modelHint}</div>}+ </>+ )}++ {step === 3 && (+ <>+ <h2>One project, two views</h2>+ <p>+ Every project is a canvas — and also a kanban board. Cards are your live+ sessions: drag them across columns, open them, comment on them.+ </p>+ <div className={`onb-tryit ${kanbanTried ? 'is-done' : ''}`}>+ {kanbanTried ? (+ <>✓ That's the toggle — it works in any project.</>+ ) : (+ <>+ Try it now — press{' '}+ {['⌘', '⇧', 'B'].map((k, i) => (+ <kbd key={i} className="kbd">+ {keyLabel(k, isMac)}+ </kbd>+ ))}+ </>+ )}+ </div>+ </>+ )}++ {step === 4 && (+ <>+ <h2>Know when an agent needs you</h2>+ <p>+ nodeterm can notify you when an agent finishes — or gets stuck waiting on an+ approval — while you're somewhere else. Change any time in Settings →+ Notifications.+ </p>+ <div className="onb-notify-actions">+ <button className="onb-btn onb-btn--primary" autoFocus onClick={() => finishWithNotifications(true)}>+ Enable notifications & finish+ </button>+ <button className="onb-btn" onClick={() => finishWithNotifications(false)}>+ Not now — just finish+ </button>+ </div>+ </>+ )}++ <div className="onb-nav">+ <div className="onb-dots">+ {Array.from({ length: STEP_COUNT }, (_, i) => (+ <span key={i} className={i === step ? 'is-active' : ''} />+ ))}+ </div>+ <div className="onb-nav__btns">+ <button className="onb-btn" onClick={back}>+ Back+ </button>+ {step < STEP_COUNT - 1 && (+ <button className="onb-btn onb-btn--primary" onClick={next}>+ Next+ </button>+ )}+ </div>+ </div>+ </div>+ </div>+ )}+ </div>,+ document.body+ )+}diff --git a/src/renderer/components/onboarding/scenes.tsx b/src/renderer/components/onboarding/scenes.tsxnew file mode 100644index 000000000..54fab9142--- /dev/null+++ b/src/renderer/components/onboarding/scenes.tsx@@ -0,0 +1,211 @@+import { useEffect, useRef, useState } from 'react'++/**+ * Animated scenes for the first-run setup tour (OnboardingFlow). All motion is CSS-only+ * (keyframes in styles.css, `.onb-*`) so there are no new dependencies; every scene loops+ * and respects `prefers-reduced-motion` (styles.css freezes them to their final frame).+ */++/** The nodeterm mark (same path as WelcomeScreen's, sized for the tour). */+export function OnbBrandMark({ size = 56 }: { size?: number }) {+ return (+ <svg viewBox="0 0 48 48" width={size} height={size} aria-hidden="true">+ <defs>+ <linearGradient id="onbg" x1="0" y1="0" x2="1" y2="1">+ <stop offset="0" stopColor="#a38dff" />+ <stop offset="1" stopColor="#622994" />+ </linearGradient>+ </defs>+ <path+ d="M13 12 L31 24 L13 36"+ fill="none"+ stroke="url(#onbg)"+ strokeWidth="5"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ <circle cx="13" cy="12" r="3.6" fill="#a38dff" />+ <circle cx="13" cy="36" r="3.6" fill="#a38dff" />+ <circle cx="31" cy="24" r="3.6" fill="#fff" />+ <rect x="33.5" y="32.5" width="10.5" height="5" rx="2.5" fill="#a38dff" />+ </svg>+ )+}++/** Floating ghost nodes + edges behind the welcome step — the canvas metaphor, sensed+ * before it's explained. Pure decoration (aria-hidden). */+export function OnbGhostCanvas() {+ return (+ <div className="onb-ghosts" aria-hidden="true">+ <div className="onb-ghost onb-ghost--a" />+ <div className="onb-ghost onb-ghost--b" />+ <div className="onb-ghost onb-ghost--c" />+ <div className="onb-ghost onb-ghost--d" />+ <svg className="onb-ghost-edges" viewBox="0 0 800 500" preserveAspectRatio="none">+ <path d="M180 140 C 300 120, 380 220, 520 200" />+ <path d="M540 230 C 480 320, 340 340, 240 380" />+ </svg>+ </div>+ )+}++/** Right-click → context menu → an agent node pops onto the canvas. The highlighted menu+ * row and the spawned node follow the currently selected default agent. */+export function SceneAgents({ label, color }: { label: string; color: string }) {+ return (+ <div className="onb-scene-canvas" aria-hidden="true">+ {/* click ripple where the cursor right-clicks */}+ <div className="onb-ripple" />+ {/* mock context menu */}+ <div className="onb-menu">+ <div className="onb-menu__row">New terminal</div>+ <div className="onb-menu__row onb-menu__row--hl">+ <span className="onb-dot" style={{ background: color }} />+ New {label}+ </div>+ <div className="onb-menu__row">New sticky note</div>+ <div className="onb-menu__row">Open file…</div>+ </div>+ {/* the spawned agent node */}+ <div className="onb-node" style={{ borderColor: color }}>+ <div className="onb-node__head">+ <span className="onb-dot" style={{ background: color }} />+ <span className="onb-node__title">{label}</span>+ <span className="onb-badge">RUNNING</span>+ </div>+ <div className="onb-node__body">+ <div className="onb-line onb-line--w70" />+ <div className="onb-line onb-line--w50" />+ <div className="onb-line onb-line--w60" />+ </div>+ </div>+ {/* animated cursor */}+ <svg className="onb-cursor" viewBox="0 0 24 24" width="18" height="18">+ <path+ d="M5 3l14 8-6 1.5L16 19l-2.5 1-3-6.5L6 17z"+ fill="#fff"+ stroke="rgba(0,0,0,0.55)"+ strokeWidth="1.2"+ />+ </svg>+ </div>+ )+}++/** Dictation: the shortcut keys depress, the mic pulses with a live waveform, and the+ * transcribed text types into a mini terminal line. */+export function SceneDictation({ keys, hold }: { keys: string[]; hold: boolean }) {+ return (+ <div className="onb-scene-canvas onb-scene--dictation" aria-hidden="true">+ <div className="onb-kbd-row">+ {keys.map((k, i) => (+ <kbd key={i} className={`onb-kbd ${hold ? 'onb-kbd--hold' : ''}`} style={{ animationDelay: `${i * 0.12}s` }}>+ {k}+ </kbd>+ ))}+ {hold && <span className="onb-kbd-hint">hold</span>}+ </div>+ <div className="onb-mic">+ <div className="onb-mic__ring" />+ <div className="onb-mic__ring onb-mic__ring--late" />+ <svg viewBox="0 0 24 24" width="22" height="22" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round">+ <rect x="9" y="3" width="6" height="11" rx="3" />+ <path d="M5 11a7 7 0 0 0 14 0M12 18v3" />+ </svg>+ <div className="onb-wave">+ {[0, 1, 2, 3, 4].map((i) => (+ <span key={i} style={{ animationDelay: `${i * 0.15}s` }} />+ ))}+ </div>+ </div>+ <div className="onb-term-line">+ <span className="onb-term-prompt">❯</span>+ <span className="onb-term-typed">run the tests and fix what breaks</span>+ <span className="onb-caret" />+ </div>+ </div>+ )+}++const KANBAN_CARDS = [+ // [canvas x, canvas y, rotate] → column index + row index on the board+ { id: 0, c: [12, 18, -3], col: 0, row: 0, w: 64 },+ { id: 1, c: [150, 8, 2], col: 0, row: 1, w: 52 },+ { id: 2, c: [236, 52, -2], col: 1, row: 0, w: 58 },+ { id: 3, c: [58, 108, 3], col: 1, row: 1, w: 66 },+ { id: 4, c: [188, 128, -1], col: 2, row: 0, w: 48 }+]+const COL_X = [10, 112, 214]+const COL_LABELS = ['To Do', 'In Progress', 'Done']++/** Canvas ↔ kanban morph: scattered session cards fly into three labelled columns and back,+ * on a timer (transition-driven, so a JS toggle is enough — no per-card keyframes). */+export function SceneKanban({ pulseKey }: { pulseKey?: number }) {+ const [board, setBoard] = useState(false)+ const reduced = useRef(+ typeof matchMedia !== 'undefined' && matchMedia('(prefers-reduced-motion: reduce)').matches+ )+ useEffect(() => {+ if (reduced.current) {+ setBoard(true) // static: show the board form+ return+ }+ const t = setInterval(() => setBoard((b) => !b), 2600)+ return () => clearInterval(t)+ }, [])+ // an external pulse (the user pressing ⌘⇧B for real) flips the scene too — the animation+ // answers their keystroke, which is the whole point of the try-it interaction+ const lastPulse = useRef(pulseKey)+ useEffect(() => {+ if (pulseKey !== undefined && pulseKey !== lastPulse.current) {+ lastPulse.current = pulseKey+ setBoard((b) => !b)+ }+ }, [pulseKey])++ return (+ <div className={`onb-scene-canvas onb-scene--kanban ${board ? 'is-board' : ''}`} aria-hidden="true">+ {COL_LABELS.map((l, i) => (+ <div key={l} className="onb-col" style={{ left: COL_X[i] }}>+ {l}+ </div>+ ))}+ {KANBAN_CARDS.map((k) => (+ <div+ key={k.id}+ className="onb-mini"+ style={+ board+ ? { left: COL_X[k.col], top: 34 + k.row * 34, transform: 'rotate(0deg)', width: 88 }+ : { left: k.c[0], top: k.c[1], transform: `rotate(${k.c[2]}deg)`, width: k.w }+ }+ >+ <span className="onb-mini__dot" />+ <span className="onb-mini__bar" />+ </div>+ ))}+ </div>+ )+}++/** A mock OS notification sliding in — what enabling notifications buys you. */+export function SceneNotify() {+ return (+ <div className="onb-scene-canvas onb-scene--notify" aria-hidden="true">+ <svg className="onb-bell" viewBox="0 0 24 24" width="30" height="30" fill="none" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" strokeLinejoin="round">+ <path d="M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9" />+ <path d="M13.7 21a2 2 0 0 1-3.4 0" />+ </svg>+ <div className="onb-notif">+ <div className="onb-notif__icon">+ <OnbBrandMark size={22} />+ </div>+ <div className="onb-notif__text">+ <div className="onb-notif__title">Claude Code finished</div>+ <div className="onb-notif__body">fix-auth · tests passing ✓</div>+ </div>+ <div className="onb-notif__time">now</div>+ </div>+ </div>+ )+}diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex 2ac1f94ab..ba375b207 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -7116,3 +7116,795 @@ body,.kanban-prio-chip {letter-spacing: 0.04em;}++/* ============================== Setup tour (onboarding) ==============================+ First-run flow: full-screen overlay, one animated scene + one decision per step.+ All motion is CSS keyframes (no deps); prefers-reduced-motion freezes every scene. */++.onb {+ position: fixed;+ inset: 0;+ z-index: 40; /* above the welcome screen (5) + controls (26); below dialog-stack scrims (55) */+ display: flex;+ align-items: center;+ justify-content: center;+ background: #000;+ color: var(--text);+}++.onb-skip {+ position: absolute;+ top: 40px; /* clears the traffic lights / tab bar drag region */+ right: 24px;+ background: transparent;+ border: none;+ color: var(--muted);+ font-size: 12.5px;+ cursor: pointer;+ padding: 6px 10px;+}+.onb-skip:hover {+ color: var(--text);+}++/* ---- step 0: cover ---- */+.onb-cover {+ position: relative;+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 8px;+ text-align: center;+ max-width: 460px;+}+.onb-cover__brand {+ display: flex;+ align-items: center;+ gap: 14px;+}+.onb-cover__name {+ font-size: 34px;+ font-weight: 800;+ letter-spacing: -0.5px;+}+.onb-cover__tagline {+ margin: 6px 0 22px;+ font-size: 14px;+ color: var(--muted);+}+.onb-cover__props {+ display: flex;+ flex-direction: column;+ gap: 14px;+ text-align: left;+ margin-bottom: 30px;+}+.onb-prop {+ display: flex;+ align-items: center;+ gap: 12px;+ font-size: 13px;+ color: rgba(235, 235, 245, 0.75);+}+.onb-prop svg {+ width: 20px;+ height: 20px;+ flex: none;+ color: var(--accent);+}+.onb-cover__cta {+ font-size: 14px;+ padding: 10px 22px;+}++/* ghost nodes floating behind the cover */+.onb-ghosts {+ position: absolute;+ inset: 0;+ overflow: hidden;+ pointer-events: none;+}+.onb-ghost {+ position: absolute;+ width: 150px;+ height: 92px;+ border: 1px solid rgba(163, 141, 255, 0.16);+ border-radius: 10px;+ background: rgba(163, 141, 255, 0.045);+ animation: onb-float 9s ease-in-out infinite;+}+.onb-ghost--a { top: 14%; left: 12%; }+.onb-ghost--b { top: 22%; right: 14%; width: 180px; animation-delay: -3s; }+.onb-ghost--c { bottom: 18%; left: 20%; width: 120px; height: 74px; animation-delay: -5s; }+.onb-ghost--d { bottom: 24%; right: 18%; animation-delay: -7s; }+.onb-ghost-edges {+ position: absolute;+ inset: 0;+ width: 100%;+ height: 100%;+}+.onb-ghost-edges path {+ fill: none;+ stroke: rgba(163, 141, 255, 0.12);+ stroke-width: 1.5;+ stroke-dasharray: 6 7;+ animation: onb-dash 14s linear infinite;+}+@keyframes onb-float {+ 0%, 100% { transform: translateY(0); }+ 50% { transform: translateY(-14px); }+}+@keyframes onb-dash {+ to { stroke-dashoffset: -260; }+}++/* ---- steps 1-4: two-pane card ---- */+.onb-card {+ display: flex;+ width: min(820px, calc(100vw - 80px));+ min-height: 400px;+ background: var(--panel);+ border: 1px solid var(--border);+ border-radius: 16px;+ overflow: hidden;+ box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);+}+.onb-scene {+ flex: 0 0 46%;+ position: relative;+ background:+ radial-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px) 0 0 / 22px 22px,+ #0a0a0c;+ border-right: 1px solid var(--border);+ display: flex;+ align-items: center;+ justify-content: center;+}+.onb-pane {+ flex: 1;+ display: flex;+ flex-direction: column;+ padding: 30px 32px 22px;+ min-width: 0;+}+.onb-step-no {+ font-size: 11px;+ font-weight: 600;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--muted);+ margin-bottom: 10px;+}+.onb-pane h2 {+ margin: 0 0 8px;+ font-size: 20px;+ font-weight: 700;+ letter-spacing: -0.3px;+}+.onb-pane p {+ margin: 0 0 18px;+ font-size: 13px;+ line-height: 1.55;+ color: rgba(235, 235, 245, 0.72);+}+.onb-pane p .kbd {+ margin: 0 1px;+}+.onb-label {+ font-size: 11.5px;+ font-weight: 600;+ color: var(--muted);+ margin-bottom: 8px;+}+.onb-fineprint {+ margin-top: 10px;+ font-size: 11.5px;+ color: var(--muted);+ line-height: 1.5;+}++.onb-nav {+ margin-top: auto;+ padding-top: 18px;+ display: flex;+ align-items: center;+ justify-content: space-between;+}+.onb-dots {+ display: flex;+ gap: 6px;+}+.onb-dots span {+ width: 6px;+ height: 6px;+ border-radius: 50%;+ background: rgba(255, 255, 255, 0.18);+ transition: background 0.15s;+}+.onb-dots span.is-active {+ background: var(--accent);+}+.onb-nav__btns {+ display: flex;+ gap: 8px;+}+.onb-btn {+ background: rgba(255, 255, 255, 0.06);+ border: 1px solid var(--border);+ border-radius: 8px;+ color: var(--text);+ font-size: 12.5px;+ font-weight: 600;+ padding: 7px 14px;+ cursor: pointer;+ transition: background 0.12s, border-color 0.12s;+}+.onb-btn:hover {+ background: rgba(255, 255, 255, 0.1);+}+.onb-btn--primary {+ background: var(--accent);+ border-color: transparent;+ color: #fff;+}+.onb-btn--primary:hover {+ background: var(--accent);+ filter: brightness(1.12);+}++/* ---- agent picker ---- */+.onb-agent-grid {+ display: grid;+ grid-template-columns: 1fr 1fr;+ gap: 8px;+}+.onb-agent {+ display: flex;+ align-items: center;+ gap: 8px;+ background: rgba(255, 255, 255, 0.04);+ border: 1px solid var(--border);+ border-radius: 9px;+ color: var(--text);+ font-size: 12.5px;+ font-weight: 600;+ padding: 10px 12px;+ cursor: pointer;+ transition: border-color 0.12s, background 0.12s;+}+.onb-agent:hover {+ background: rgba(255, 255, 255, 0.07);+}+.onb-agent.is-selected {+ border-color: var(--accent);+ background: color-mix(in srgb, var(--accent) 14%, transparent);+}+.onb-dot {+ width: 9px;+ height: 9px;+ border-radius: 50%;+ flex: none;+}++/* ---- dictation model list ---- */+.onb-models {+ display: flex;+ flex-direction: column;+ gap: 6px;+}+.onb-model {+ position: relative;+ display: flex;+ align-items: center;+ gap: 9px;+ background: rgba(255, 255, 255, 0.04);+ border: 1px solid var(--border);+ border-radius: 9px;+ color: var(--text);+ font-size: 12.5px;+ padding: 8px 12px;+ cursor: pointer;+ transition: border-color 0.12s, background 0.12s;+ overflow: hidden;+}+.onb-model:hover {+ background: rgba(255, 255, 255, 0.07);+}+.onb-model.is-selected {+ border-color: var(--accent);+}+.onb-model.is-locked {+ opacity: 0.6;+}+.onb-model__radio {+ width: 12px;+ height: 12px;+ border-radius: 50%;+ border: 1.5px solid rgba(255, 255, 255, 0.35);+ flex: none;+}+.onb-model.is-selected .onb-model__radio {+ border-color: var(--accent);+ background: radial-gradient(circle at center, var(--accent) 0 4px, transparent 4.5px);+}+.onb-model__name {+ font-weight: 600;+}+.onb-model__size {+ color: var(--muted);+ font-size: 11.5px;+}+.onb-pro {+ margin-left: auto;+ font-size: 9.5px;+ font-weight: 800;+ letter-spacing: 0.06em;+ color: #e7c46a;+ border: 1px solid rgba(231, 196, 106, 0.45);+ border-radius: 5px;+ padding: 1.5px 5px;+}+.onb-model__ok {+ color: #34c759;+ font-weight: 700;+ margin-left: auto; /* right-aligned when it's the only trailing chip… */+}+.onb-pro + .onb-model__ok {+ margin-left: 6px; /* …but sits beside the PRO chip when both are shown */+}+.onb-model__bar {+ position: absolute;+ left: 0;+ right: 0;+ bottom: 0;+ height: 2.5px;+ background: rgba(255, 255, 255, 0.08);+}+.onb-model__bar span {+ display: block;+ height: 100%;+ background: var(--accent);+ transition: width 0.25s ease;+}++/* ---- kanban try-it ---- */+.onb-tryit {+ display: inline-flex;+ align-items: center;+ gap: 5px;+ font-size: 13px;+ border: 1px dashed rgba(255, 255, 255, 0.22);+ border-radius: 10px;+ padding: 12px 16px;+ color: rgba(235, 235, 245, 0.8);+}+.onb-tryit.is-done {+ border-style: solid;+ border-color: rgba(52, 199, 89, 0.5);+ color: #34c759;+ font-weight: 600;+}++/* ---- notify actions ---- */+.onb-notify-actions {+ display: flex;+ flex-direction: column;+ gap: 8px;+ align-items: stretch;+ max-width: 280px;+}++/* ============ scenes ============ */+.onb-scene-canvas {+ position: relative;+ width: 100%;+ height: 100%;+ min-height: 320px;+}++/* -- agents scene: cursor → right-click → menu → node pop (one shared 7s loop) -- */+.onb-cursor {+ position: absolute;+ left: 30px;+ top: 200px;+ animation: onb-cursor-path 7s ease-in-out infinite;+ filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));+}+@keyframes onb-cursor-path {+ 0% { transform: translate(0, 0); }+ 16%, 58% { transform: translate(58px, -78px); } /* arrive at the click point, dwell */+ 74%, 100% { transform: translate(150px, -40px); } /* drift toward the spawned node */+}+.onb-ripple {+ position: absolute;+ left: 96px;+ top: 128px;+ width: 26px;+ height: 26px;+ border-radius: 50%;+ border: 1.5px solid rgba(163, 141, 255, 0.8);+ opacity: 0;+ animation: onb-ripple 7s ease-out infinite;+}+@keyframes onb-ripple {+ 0%, 16% { opacity: 0; transform: scale(0.3); }+ 20% { opacity: 0.9; transform: scale(0.5); }+ 30%, 100% { opacity: 0; transform: scale(1.6); }+}+.onb-menu {+ position: absolute;+ left: 112px;+ top: 132px;+ width: 148px;+ background: #1d1d21;+ border: 1px solid var(--border);+ border-radius: 8px;+ padding: 4px;+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);+ opacity: 0;+ transform-origin: top left;+ animation: onb-menu 7s ease infinite;+}+@keyframes onb-menu {+ 0%, 19% { opacity: 0; transform: scale(0.92); }+ 23%, 52% { opacity: 1; transform: scale(1); }+ 56%, 100% { opacity: 0; transform: scale(0.97); }+}+.onb-menu__row {+ display: flex;+ align-items: center;+ gap: 7px;+ font-size: 11px;+ color: rgba(235, 235, 245, 0.75);+ padding: 5px 8px;+ border-radius: 5px;+}+.onb-menu__row--hl {+ color: #fff;+ animation: onb-menu-hl 7s ease infinite;+}+@keyframes onb-menu-hl {+ 0%, 30% { background: transparent; }+ 36%, 54% { background: var(--accent); }+ 58%, 100% { background: transparent; }+}+.onb-node {+ position: absolute;+ left: 128px;+ top: 96px;+ width: 168px;+ background: #131316;+ border: 1px solid;+ border-radius: 10px;+ overflow: hidden;+ opacity: 0;+ animation: onb-node-pop 7s cubic-bezier(0.34, 1.4, 0.5, 1) infinite;+}+@keyframes onb-node-pop {+ 0%, 56% { opacity: 0; transform: scale(0.7); }+ 63%, 94% { opacity: 1; transform: scale(1); }+ 98%, 100% { opacity: 0; transform: scale(0.96); }+}+.onb-node__head {+ display: flex;+ align-items: center;+ gap: 6px;+ padding: 6px 8px;+ background: rgba(255, 255, 255, 0.05);+ font-size: 10.5px;+ font-weight: 600;+}+.onb-node__title {+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}+.onb-badge {+ margin-left: auto;+ font-size: 8px;+ font-weight: 800;+ letter-spacing: 0.05em;+ color: #34c759;+ border: 1px solid rgba(52, 199, 89, 0.5);+ border-radius: 4px;+ padding: 1px 4px;+ animation: onb-pulse 1.6s ease-in-out infinite;+}+@keyframes onb-pulse {+ 0%, 100% { opacity: 1; }+ 50% { opacity: 0.45; }+}+.onb-node__body {+ padding: 9px 10px 12px;+ display: flex;+ flex-direction: column;+ gap: 6px;+}+.onb-line {+ height: 5px;+ border-radius: 3px;+ background: rgba(255, 255, 255, 0.12);+}+.onb-line--w70 { width: 70%; }+.onb-line--w50 { width: 50%; }+.onb-line--w60 { width: 60%; }++/* -- dictation scene -- */+.onb-scene--dictation {+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 26px;+}+.onb-kbd-row {+ display: flex;+ align-items: center;+ gap: 6px;+}+.onb-kbd {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ min-width: 34px;+ height: 34px;+ padding: 0 8px;+ background: #1d1d21;+ border: 1px solid var(--border);+ border-bottom-width: 3px;+ border-radius: 8px;+ font-size: 15px;+ font-weight: 600;+ animation: onb-keypress 5s ease infinite;+}+.onb-kbd--hold {+ animation-name: onb-keyhold;+}+@keyframes onb-keypress {+ 0%, 6% { transform: translateY(0); border-bottom-width: 3px; }+ 10%, 14% { transform: translateY(2px); border-bottom-width: 1px; }+ 18%, 100% { transform: translateY(0); border-bottom-width: 3px; }+}+@keyframes onb-keyhold {+ 0%, 6% { transform: translateY(0); border-bottom-width: 3px; }+ 12%, 72% { transform: translateY(2px); border-bottom-width: 1px; }+ 80%, 100% { transform: translateY(0); border-bottom-width: 3px; }+}+.onb-kbd-hint {+ font-size: 10.5px;+ color: var(--muted);+ margin-left: 4px;+}+.onb-mic {+ position: relative;+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 12px;+ color: #ff375f;+}+.onb-mic__ring {+ position: absolute;+ top: -14px;+ width: 50px;+ height: 50px;+ border-radius: 50%;+ border: 1.5px solid rgba(255, 55, 95, 0.5);+ animation: onb-ring 2.4s ease-out infinite;+}+.onb-mic__ring--late {+ animation-delay: 1.2s;+}+@keyframes onb-ring {+ 0% { opacity: 0.8; transform: scale(0.5); }+ 100% { opacity: 0; transform: scale(1.5); }+}+.onb-wave {+ display: flex;+ align-items: center;+ gap: 4px;+ height: 22px;+}+.onb-wave span {+ width: 4px;+ height: 8px;+ border-radius: 2px;+ background: rgba(255, 55, 95, 0.85);+ animation: onb-wave 1s ease-in-out infinite;+}+@keyframes onb-wave {+ 0%, 100% { height: 6px; }+ 50% { height: 20px; }+}+.onb-term-line {+ display: flex;+ align-items: center;+ gap: 8px;+ width: 78%;+ background: #131316;+ border: 1px solid var(--border);+ border-radius: 8px;+ padding: 9px 12px;+ font-family: Menlo, Monaco, monospace;+ font-size: 11px;+}+.onb-term-prompt {+ color: var(--accent);+ font-weight: 700;+}+.onb-term-typed {+ overflow: hidden;+ white-space: nowrap;+ max-width: 0;+ animation: onb-type 5s steps(32) infinite;+ color: rgba(235, 235, 245, 0.85);+}+@keyframes onb-type {+ 0%, 14% { max-width: 0; }+ 70%, 100% { max-width: 100%; }+}+.onb-caret {+ width: 6px;+ height: 13px;+ background: rgba(235, 235, 245, 0.8);+ animation: onb-caret 1s steps(1) infinite;+}+@keyframes onb-caret {+ 50% { opacity: 0; }+}++/* -- kanban scene (positions transition; the JS interval flips .is-board) -- */+.onb-scene--kanban {+ min-height: 240px;+}+.onb-col {+ position: absolute;+ top: 12px;+ width: 88px;+ font-size: 9px;+ font-weight: 700;+ letter-spacing: 0.07em;+ text-transform: uppercase;+ color: var(--muted);+ border-bottom: 1px solid rgba(255, 255, 255, 0.12);+ padding-bottom: 4px;+ opacity: 0;+ transition: opacity 0.5s ease 0.25s;+}+.onb-scene--kanban.is-board .onb-col {+ opacity: 1;+}+.onb-mini {+ position: absolute;+ display: flex;+ align-items: center;+ gap: 5px;+ height: 24px;+ padding: 0 7px;+ background: #1c1c20;+ border: 1px solid var(--border);+ border-radius: 6px;+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);+ transition: left 0.7s cubic-bezier(0.4, 0.9, 0.3, 1), top 0.7s cubic-bezier(0.4, 0.9, 0.3, 1),+ transform 0.7s ease, width 0.7s ease;+}+.onb-mini__dot {+ width: 6px;+ height: 6px;+ border-radius: 50%;+ background: var(--accent);+ flex: none;+}+.onb-mini:nth-child(odd) .onb-mini__dot {+ background: #d97757;+}+.onb-mini__bar {+ flex: 1;+ height: 4px;+ border-radius: 2px;+ background: rgba(255, 255, 255, 0.14);+}++/* -- notify scene -- */+.onb-scene--notify {+ display: flex;+ align-items: center;+ justify-content: center;+}+.onb-bell {+ position: absolute;+ top: 46px;+ color: rgba(235, 235, 245, 0.45);+ transform-origin: top center;+ animation: onb-bell 5s ease-in-out infinite;+}+@keyframes onb-bell {+ 0%, 8% { transform: rotate(0); }+ 12% { transform: rotate(13deg); }+ 16% { transform: rotate(-11deg); }+ 20% { transform: rotate(7deg); }+ 24%, 100% { transform: rotate(0); }+}+.onb-notif {+ display: flex;+ align-items: center;+ gap: 10px;+ width: 82%;+ background: rgba(40, 40, 46, 0.92);+ border: 1px solid rgba(255, 255, 255, 0.14);+ border-radius: 12px;+ padding: 10px 12px;+ box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);+ animation: onb-notif 5s ease infinite;+}+@keyframes onb-notif {+ 0%, 6% { opacity: 0; transform: translateX(60px); }+ 14%, 86% { opacity: 1; transform: translateX(0); }+ 94%, 100% { opacity: 0; transform: translateX(60px); }+}+.onb-notif__icon {+ display: flex;+ align-items: center;+ justify-content: center;+ width: 32px;+ height: 32px;+ border-radius: 8px;+ background: #131316;+ flex: none;+}+.onb-notif__text {+ min-width: 0;+}+.onb-notif__title {+ font-size: 12px;+ font-weight: 600;+}+.onb-notif__body {+ font-size: 11px;+ color: rgba(235, 235, 245, 0.6);+}+.onb-notif__time {+ margin-left: auto;+ font-size: 10px;+ color: var(--muted);+ align-self: flex-start;+}++/* ---- reduced motion: freeze every scene to a readable final frame ---- */+@media (prefers-reduced-motion: reduce) {+ .onb-ghost,+ .onb-ghost-edges path,+ .onb-cursor,+ .onb-ripple,+ .onb-kbd,+ .onb-mic__ring,+ .onb-wave span,+ .onb-caret,+ .onb-bell,+ .onb-notif {+ animation: none;+ }+ .onb-menu {+ animation: none;+ opacity: 1;+ }+ .onb-menu__row--hl {+ animation: none;+ background: var(--accent);+ }+ .onb-node {+ animation: none;+ opacity: 1;+ transform: none;+ }+ .onb-badge {+ animation: none;+ }+ .onb-term-typed {+ animation: none;+ max-width: 100%;+ }+ .onb-mini {+ transition: none;+ }+}diff --git a/src/shared/types.ts b/src/shared/types.tsindex 8acf2cd45..87f3a011e 100644--- a/src/shared/types.ts+++ b/src/shared/types.ts@@ -617,6 +617,10 @@ export interface Settings {commitExtraPrompt: string/** Whether the shortcuts overlay has been shown on first launch. */seenShortcuts: boolean+ /** Whether the first-run setup tour (onboarding) has been completed or skipped. Existing+ * installs (seenShortcuts already true) are migrated to true silently — the tour is for+ * fresh installs; rerunnable via the ⌘K "Setup tour" command. */+ seenOnboarding: boolean/** Notify (OS notification) when a Claude Code turn finishes while the app is in the background. */notifyOnClaudeDone: boolean/** Periodically `git fetch` while the Source Control panel is open, so ahead/behind stays@@ -686,6 +690,7 @@ export const DEFAULT_SETTINGS: Settings = {commitAgentCommand: '',commitExtraPrompt: '',seenShortcuts: false,+ seenOnboarding: false,notifyOnClaudeDone: true,gitAutoFetch: true,notifyConsentAsked: false,