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(notch): a Notch settings section + a macOS step in the setup tour
enes265d30461e60
diff --git a/docs/notch-hud.md b/docs/notch-hud.mdindex ff0d97139..ddf431dc2 100644--- a/docs/notch-hud.md+++ b/docs/notch-hud.md@@ -103,9 +103,19 @@ and the notchless `--pill-top-gap` (6) / `--pill-radius` (18) / `--pill-height`## Settings + lifecycle-New `settings.notchHud` (default **true**). `initNotchHud(win)` from `index.ts`, guarded-`process.platform === 'darwin'` and the setting; toggling the setting creates/destroys the HUD-window live. Three-surfaces: desktop/macOS-only — `src/server` and iOS untouched (pure reader of+**Settings → Interface → Notch** (`NotchSection.tsx`, macOS-only: `nav.ts` marks the section+`macOnly` and `visibleSettingsGroups(isMac)` drops it elsewhere) owns all three knobs:+`notchHud` (default **true**), `notchWidth` (default 168 — the assumed notch width, i.e. the+flush-alignment knob, clamped to `NOTCH_WIDTH_MIN/MAX` in main) and `notchHoverExpand`+(default true; off = click-only, the renderer reads it from the `hoverExpand` push field).+`initNotchHud(deps, tunables)` from `index.ts`, guarded `process.platform === 'darwin'`;+`settingsStore.onChange` → `applyNotchHudSettings(tunables)` creates/destroys the window on the+enable toggle and pushes width/hover into a RUNNING controller (`setTunables`), so the width+slider moves the capsule as you drag it.++The first-run tour has a macOS-only **notch step** (`OnboardingFlow`'s `STEPS` is ID-keyed+precisely so this step can be absent off macOS, plus `SceneNotch` in `scenes.tsx`): scene on the+left, explanation + a live `notchHud` toggle on the right, like every other step. Three-surfaces: desktop/macOS-only — `src/server` and iOS untouched (pure reader ofexisting main state; the no-electron tests stay green because all new code is in `src/main` + arenderer entry).diff --git a/src/main/index.ts b/src/main/index.tsindex 18bf34e2a..8390cc07c 100644--- a/src/main/index.ts+++ b/src/main/index.ts@@ -28,7 +28,8 @@ import {import { setMainWindow, getMainWindow, sendToMain, shouldHideOnClose } from './main-window'import {initNotchHud,- setNotchHudEnabled,+ applyNotchHudSettings,+ type NotchHudTunables,destroyNotchHud,notchHudOnAgentEvent,notchHudOnContextUpdate,@@ -749,11 +750,15 @@ app.whenReady().then(async () => {// show:false, shown on 'ready-to-show'), it can be the only orderFront-ed window on screen and// demote the app to accessory — the Dock icon then disappears. Gating on the main window's first// 'show' guarantees a regular window has established the app's Dock presence first.+ const notchTunables = (): NotchHudTunables => {+ const s = settingsStore.get()+ return { enabled: s.notchHud, notchWidth: s.notchWidth, hoverExpand: s.notchHoverExpand }+ }const startNotchHud = (): void =>- initNotchHud({ getNodeTitle: (nodeId) => workspaceStore.getNodeTitle(nodeId) }, settingsStore.get().notchHud)+ initNotchHud({ getNodeTitle: (nodeId) => workspaceStore.getNodeTitle(nodeId) }, notchTunables())if (win.isVisible()) startNotchHud()else win.once('show', startNotchHud)- settingsStore.onChange((s) => setNotchHudEnabled(s.notchHud))+ settingsStore.onChange(() => applyNotchHudSettings(notchTunables()))// Advertise launch settings to the mobile companion through the mirror. The provider is// consulted at every flush (heartbeat ≤60s), so a settings change propagates without extra// plumbing. Caps arrive async: re-flush once the memoized probe answers.diff --git a/src/main/notch-hud.ts b/src/main/notch-hud.tsindex 3c415805c..7c247e5ed 100644--- a/src/main/notch-hud.ts+++ b/src/main/notch-hud.ts@@ -32,6 +32,9 @@ const NOTCH_BAR_FLOOR = 24* capsule LEFT, lower it to slide the capsule RIGHT toward the notch.*/const NOTCH_WIDTH = 168+/** Bounds for the user-tunable notch width (settings.notchWidth). */+export const NOTCH_WIDTH_MIN = 100+export const NOTCH_WIDTH_MAX = 320/** How long the panel must stay open before closing it counts as "read" (clears done latches). */const PANEL_READ_MS = 700/**@@ -93,6 +96,20 @@ export interface NotchHudDeps {getNodeTitle: (nodeId: string) => string | undefined}+/** The user-tunable part of the HUD (Settings → Interface → Notch). Applied live, no restart. */+export interface NotchHudTunables {+ enabled: boolean+ /** Assumed physical notch width in px — the knob that makes the capsule sit flush. */+ notchWidth: number+ /** Expand the panel on hover (else click-only). */+ hoverExpand: boolean+}++/** Clamp a hand-editable width to something that can't push the capsule off the display. */+function sanitizeNotchWidth(px: number): number {+ return Number.isFinite(px) ? Math.max(NOTCH_WIDTH_MIN, Math.min(NOTCH_WIDTH_MAX, Math.round(px))) : NOTCH_WIDTH+}+class NotchHudController {private model: HudModel = createHudModel()private unsubs: (() => void)[] = []@@ -107,7 +124,10 @@ class NotchHudController {private panelOpenedAt = 0private readonly onDisplayChange: () => void- constructor(private deps: NotchHudDeps) {+ constructor(+ private deps: NotchHudDeps,+ private tunables: { notchWidth: number; hoverExpand: boolean }+ ) {this.onSetIgnoreMouse = (_e, ignore) => {// Ignore-mouse ON = click-through (the strip is transparent to the app beneath); OFF while the// pointer is over the hotspot/panel so clicks land. `forward` keeps move events flowing so the@@ -229,6 +249,12 @@ class NotchHudController {this.ipcBound = false}+ /** Apply live tunables and re-push, so a slider drag moves the capsule as you drag. */+ setTunables(t: { notchWidth: number; hoverExpand: boolean }): void {+ this.tunables = { notchWidth: t.notchWidth, hoverExpand: t.hoverExpand }+ this.schedulePush()+ }+private geometry(): {x: numbery: number@@ -256,7 +282,7 @@ class NotchHudController {width: b.width,height,bar,- notchWidth: NOTCH_WIDTH,+ notchWidth: sanitizeNotchWidth(this.tunables.notchWidth),notchCenterX: Math.round(b.width / 2),hasNotch}@@ -364,6 +390,7 @@ class NotchHudController {bar: g.bar,width: g.width,notchWidth: g.notchWidth,+ hoverExpand: this.tunables.hoverExpand,notchCenterX: g.notchCenterX,hasNotch: g.hasNotch && !clamped})@@ -384,25 +411,33 @@ function supported(): boolean {* Create the HUD (if darwin + enabled). Idempotent. `deps.getNodeTitle` is retained so a later* `setNotchHudEnabled(true)` (settings toggle) can recreate it without re-plumbing.*/-export function initNotchHud(deps: NotchHudDeps, enabled: boolean): void {+export function initNotchHud(deps: NotchHudDeps, t: NotchHudTunables): void {controllerDeps = deps- if (!supported() || !enabled) return+ if (!supported() || !t.enabled) returnif (controller) return- controller = new NotchHudController(deps)+ controller = new NotchHudController(deps, t)controller.start()}-/** Live settings toggle: create or destroy the HUD window without a restart. */-export function setNotchHudEnabled(enabled: boolean): void {+/**+ * Live settings apply: create/destroy the window on the enable toggle, and push the geometry+ * tunables (notch width, hover-expand) straight through to a running HUD — no restart, so the+ * width slider can be dragged while watching the capsule move.+ */+export function applyNotchHudSettings(t: NotchHudTunables): void {if (!supported()) return- if (enabled) {- if (controller || !controllerDeps) return- controller = new NotchHudController(controllerDeps)- controller.start()- } else {+ if (!t.enabled) {controller?.stop()controller = null+ return}+ if (controller) {+ controller.setTunables(t)+ return+ }+ if (!controllerDeps) return+ controller = new NotchHudController(controllerDeps, t)+ controller.start()}/** Tear the HUD down (app quit). */diff --git a/src/preload/hud.ts b/src/preload/hud.tsindex 553640b6d..015c2a8b2 100644--- a/src/preload/hud.ts+++ b/src/preload/hud.ts@@ -34,6 +34,8 @@ export interface HudPush {notchCenterX: number/** True when a physical notch is present (fuse to it); false = draw a standalone floating pill. */hasNotch: boolean+ /** Expand the panel on hover (settings.notchHoverExpand); false = click-only. */+ hoverExpand: boolean}export interface HudApi {diff --git a/src/renderer/components/onboarding/OnboardingFlow.tsx b/src/renderer/components/onboarding/OnboardingFlow.tsxindex b2d732f29..1d7db1212 100644--- a/src/renderer/components/onboarding/OnboardingFlow.tsx+++ b/src/renderer/components/onboarding/OnboardingFlow.tsx@@ -6,6 +6,7 @@ import { isHoldChord, shortcutKeyParts } from '@shared/shortcut'import { keyLabel } from '@shared/platform-utils'import { useSettings } from '../../state/settings'import { useEntitlement } from '../../state/entitlement'+import { Switch } from '@renderer/ui/Switch'import { AgentIcon } from '../../lib/agentIcons'import {OnbBrandMark,@@ -14,6 +15,7 @@ import {SceneAgents,SceneDictation,SceneKanban,+ SceneNotch,SceneNotify,ScenePhone} from './scenes'@@ -32,9 +34,20 @@ 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;- * the last step is the mobile-app announcement (info-only). */-const STEP_COUNT = 6+/** Info step + the setting it configures, one per screen. Step 0 is the welcome cover; the last+ * step is the mobile-app announcement (info-only). Steps are addressed by ID, not index, because+ * the notch step only exists on macOS — an index-keyed tour would shift under it. */+const STEPS = [+ 'cover',+ 'agents',+ 'dictation',+ 'kanban',+ 'notify',+ ...(isMac ? (['notch'] as const) : []),+ 'phone'+] as const+type StepId = (typeof STEPS)[number]+const STEP_COUNT = STEPS.length/*** First-run setup tour: welcome → agents → dictation → kanban → notifications. Each step@@ -101,7 +114,7 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {const [kanbanTried, setKanbanTried] = useState(false)const [kanbanPulse, setKanbanPulse] = useState(0)useEffect(() => {- if (step !== 3) return+ if (STEPS[step] !== 'kanban') returnconst onKey = (e: KeyboardEvent) => {if ((e.metaKey || e.ctrlKey) && e.shiftKey && e.key.toLowerCase() === 'b') {e.preventDefault()@@ -145,17 +158,18 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {const dictKeys = shortcutKeyParts(settings.speech.shortcut, isMac)const dictHold = isHoldChord(settings.speech.shortcut)+ const stepId: StepId = STEPS[step] ?? 'cover'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 />}+ {stepId === 'cover' && <OnbGhostCanvas />}<button className="onb-skip" onClick={onClose}>Skip setup</button>- {step === 0 ? (+ {stepId === 'cover' ? (<div className="onb-cover"><div className="onb-cover__brand"><OnbBrandMark />@@ -193,16 +207,17 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {) : (<div className="onb-card"><div className="onb-scene">- {step === 1 && <SceneAgents agentId={agentId} 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 />}- {step === 5 && <ScenePhone />}+ {stepId === 'agents' && <SceneAgents agentId={agentId} label={agent.label} color={agent.color} />}+ {stepId === 'dictation' && <SceneDictation keys={dictKeys.map((k) => keyLabel(k, isMac))} hold={dictHold} />}+ {stepId === 'kanban' && <SceneKanban pulseKey={kanbanPulse} />}+ {stepId === 'notify' && <SceneNotify />}+ {stepId === 'notch' && <SceneNotch />}+ {stepId === 'phone' && <ScenePhone />}</div><div className="onb-pane"><div className="onb-step-no">Step {step} of {STEP_COUNT - 1}</div>- {step === 1 && (+ {stepId === 'agents' && (<><h2>Everything is a node</h2><p>@@ -230,7 +245,7 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {</>)}- {step === 2 && (+ {stepId === 'dictation' && (<><h2>Talk to your terminal</h2><p>@@ -276,7 +291,7 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {</>)}- {step === 3 && (+ {stepId === 'kanban' && (<><h2>One project, two views</h2><p>@@ -302,7 +317,7 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {</>)}- {step === 4 && (+ {stepId === 'notify' && (<><h2>Know when an agent needs you</h2><p>@@ -319,7 +334,34 @@ export function OnboardingFlow({ onClose }: { onClose: () => void }) {</>)}- {step === 5 && (+ {stepId === 'notch' && (+ <>+ <h2>Your agents, inside the notch</h2>+ <p>+ On a MacBook, nodeterm can grow the notch into a small black capsule: a walking+ mascot for every agent that's working, a red dot when one needs you, and a green+ blob when one has finished and you haven't looked yet.+ </p>+ <p>+ Point at it and it opens a mini panel of your live sessions — hit <strong>Go</strong>{' '}+ and nodeterm comes forward with that node centred.+ </p>+ <div className="onb-toggle-row">+ <Switch+ checked={settings.notchHud}+ ariaLabel="Notch HUD"+ onChange={(on) => update({ notchHud: on })}+ />+ <span>Show the notch HUD</span>+ </div>+ <div className="onb-fineprint">+ Fine-tune it any time in Settings → Interface → Notch — including the notch width,+ which is what makes the capsule sit flush on your Mac.+ </div>+ </>+ )}++ {stepId === 'phone' && (<><h2>Your sessions, in your pocket</h2><p>diff --git a/src/renderer/components/onboarding/scenes.tsx b/src/renderer/components/onboarding/scenes.tsxindex 969064083..501b240c1 100644--- a/src/renderer/components/onboarding/scenes.tsx+++ b/src/renderer/components/onboarding/scenes.tsx@@ -2,6 +2,7 @@ import { useEffect, useRef, useState } from 'react'import type { AgentId } from '@shared/agents/config'import { AgentIcon } from '../../lib/agentIcons'import { IconTerminal, IconNote, IconEditor } from '../icons'+import { AgentMascot } from '../../nodes/AgentMascot'/*** Animated scenes for the first-run setup tour (OnboardingFlow). All motion is CSS-only@@ -228,6 +229,42 @@ export function SceneKanban({ pulseKey }: { pulseKey?: number }) {}/** A mock OS notification sliding in — what enabling notifications buys you. */+/**+ * The macOS notch capsule: a laptop lid whose notch grows sideways into a black capsule with a+ * walking mascot + a green "finished" blob, then drops the mini session panel out of it. Same+ * geometry story as the real HUD (fused to the notch, extends left/right, never taller).+ */+export function SceneNotch() {+ return (+ <div className="onb-scene-canvas onb-scene--notch" aria-hidden="true">+ <div className="onb-lid">+ <div className="onb-lid__bar">+ <div className="onb-capsule">+ <span className="onb-capsule__left">+ <AgentMascot agentId="claude" />+ <span className="onb-capsule__blob" />+ </span>+ <span className="onb-capsule__notch" />+ </div>+ <div className="onb-notchpanel">+ <div className="onb-notchpanel__row">+ <span className="onb-mini__dot" style={{ background: '#d97757' }} />+ <span className="onb-mini__bar" />+ <span className="onb-notchpanel__go">Go</span>+ </div>+ <div className="onb-notchpanel__row">+ <span className="onb-mini__dot" style={{ background: '#30d158' }} />+ <span className="onb-mini__bar onb-mini__bar--short" />+ <span className="onb-notchpanel__go">Go</span>+ </div>+ </div>+ </div>+ <div className="onb-lid__screen" />+ </div>+ </div>+ )+}+export function SceneNotify() {return (<div className="onb-scene-canvas onb-scene--notify" aria-hidden="true">diff --git a/src/renderer/components/settings/SettingsIcons.tsx b/src/renderer/components/settings/SettingsIcons.tsxindex cf7b21448..c39668ff9 100644--- a/src/renderer/components/settings/SettingsIcons.tsx+++ b/src/renderer/components/settings/SettingsIcons.tsx@@ -10,6 +10,13 @@ const PATHS: Record<SettingsSectionId, React.JSX.Element> = {</>),shell: <path d="M3 4.5 6 8l-3 3.5M8 11.5h5" />,+ // A screen with the notch bitten out of its top edge.+ notch: (+ <>+ <path d="M2 5V4.5A1.5 1.5 0 0 1 3.5 3h2v1.2a1 1 0 0 0 1 1h2.6a1 1 0 0 0 1-1V3h2.4A1.5 1.5 0 0 1 14 4.5V11a1.5 1.5 0 0 1-1.5 1.5h-9A1.5 1.5 0 0 1 2 11V5Z" />+ <path d="M5.5 9.2h1.2M9.3 9.2h1.2" />+ </>+ ),behavior: (<><path d="M2.5 5.5h6M10.5 5.5h3M2.5 10.5h3M7.5 10.5h6" />diff --git a/src/renderer/components/settings/SettingsPage.tsx b/src/renderer/components/settings/SettingsPage.tsxindex e99fdca20..d4cab8865 100644--- a/src/renderer/components/settings/SettingsPage.tsx+++ b/src/renderer/components/settings/SettingsPage.tsx@@ -8,6 +8,7 @@ import { TerminalSection } from './sections/TerminalSection'import { ShellSection } from './sections/ShellSection'import { BehaviorSection } from './sections/BehaviorSection'import { AppearanceSection } from './sections/AppearanceSection'+import { NotchSection } from './sections/NotchSection'import { PhoneSection } from './sections/PhoneSection'import { SpeechSection } from './sections/SpeechSection'import { AgentsSection } from './sections/AgentsSection'@@ -25,6 +26,8 @@ import { SshSection } from './sections/SshSection'import { UpdatesSection } from './sections/UpdatesSection'import { PrivacySection } from './sections/PrivacySection'+const isMac = /Mac/i.test(navigator.platform || navigator.userAgent)+export function SettingsPage({onClose,initialSection@@ -70,6 +73,7 @@ export function SettingsPage({<ShellSection isActive={active === 'shell'} /><BehaviorSection isActive={active === 'behavior'} /><AppearanceSection isActive={active === 'appearance'} />+ {isMac && <NotchSection isActive={active === 'notch'} />}<PhoneSection isActive={active === 'phone'} /><SpeechSection isActive={active === 'speech'} onNavigate={setActive} /><AgentsSection isActive={active === 'agents'} />diff --git a/src/renderer/components/settings/SettingsSidebar.tsx b/src/renderer/components/settings/SettingsSidebar.tsxindex b23da1a9c..fadeac7d9 100644--- a/src/renderer/components/settings/SettingsSidebar.tsx+++ b/src/renderer/components/settings/SettingsSidebar.tsx@@ -1,6 +1,9 @@import { cn } from '@renderer/ui/cn'import { Input } from '@renderer/ui/Input'-import { SETTINGS_GROUPS, type SettingsSectionId } from './nav'+import { visibleSettingsGroups, type SettingsSectionId } from './nav'++const isMac = /Mac/i.test(navigator.platform || navigator.userAgent)+const GROUPS = visibleSettingsGroups(isMac)import { matchesQuery } from './search'import { SectionIcon } from './SettingsIcons'@@ -65,7 +68,7 @@ export function SettingsSidebar({</div><nav className="min-h-0 flex-1 space-y-5 overflow-y-auto px-3 pb-4">- {SETTINGS_GROUPS.map((group) => (+ {GROUPS.map((group) => (<div key={group.id} className="space-y-0.5"><p className="px-2.5 pb-1 text-[10px] font-semibold uppercase tracking-[0.12em] text-muted-2">{group.title}diff --git a/src/renderer/components/settings/nav.test.ts b/src/renderer/components/settings/nav.test.tsindex 0cc493f8a..737b5246a 100644--- a/src/renderer/components/settings/nav.test.ts+++ b/src/renderer/components/settings/nav.test.ts@@ -1,13 +1,21 @@import { describe, it, expect } from 'vitest'-import { SETTINGS_GROUPS, allSectionIds, FIRST_SECTION_ID } from './nav'+import { SETTINGS_GROUPS, allSectionIds, FIRST_SECTION_ID, visibleSettingsGroups } from './nav'describe('SETTINGS_GROUPS', () => {- it('lists exactly 20 sections with no duplicates', () => {+ it('lists exactly 21 sections with no duplicates', () => {const ids = allSectionIds()- expect(ids).toHaveLength(20)- expect(new Set(ids).size).toBe(20)+ expect(ids).toHaveLength(21)+ expect(new Set(ids).size).toBe(21)})it('starts at a section that exists in the groups', () => {expect(allSectionIds()).toContain(FIRST_SECTION_ID)})+ it('hides mac-only sections off macOS, keeps them on', () => {+ const off = visibleSettingsGroups(false).flatMap((g) => g.sections.map((s) => s.id))+ expect(off).not.toContain('notch')+ expect(off).toHaveLength(20)+ expect(visibleSettingsGroups(true)).toEqual(SETTINGS_GROUPS)+ // No group is left empty by the filter.+ expect(visibleSettingsGroups(false).every((g) => g.sections.length > 0)).toBe(true)+ })})diff --git a/src/renderer/components/settings/nav.ts b/src/renderer/components/settings/nav.tsindex f4bab1fcb..b71d26929 100644--- a/src/renderer/components/settings/nav.ts+++ b/src/renderer/components/settings/nav.ts@@ -3,6 +3,7 @@ export type SettingsSectionId =| 'shell'| 'behavior'| 'appearance'+ | 'notch'| 'phone'| 'speech'| 'agents'@@ -20,10 +21,17 @@ export type SettingsSectionId =| 'updates'| 'privacy'+export interface SettingsSectionRef {+ id: SettingsSectionId+ title: string+ /** Only meaningful on macOS (the notch capsule) — hidden elsewhere by `visibleSettingsGroups`. */+ macOnly?: boolean+}+export interface SettingsGroup {id: stringtitle: string- sections: { id: SettingsSectionId; title: string }[]+ sections: SettingsSectionRef[]}// Grouped by what the user is DOING, not by where the code lives: AI work first (it is what@@ -55,6 +63,7 @@ export const SETTINGS_GROUPS: SettingsGroup[] = [title: 'Interface',sections: [{ id: 'appearance', title: 'Appearance' },+ { id: 'notch', title: 'Notch', macOnly: true },{ id: 'notifications', title: 'Notifications' },{ id: 'speech', title: 'Speech' }]@@ -86,3 +95,15 @@ export const FIRST_SECTION_ID: SettingsSectionId = 'agents'export function allSectionIds(): SettingsSectionId[] {return SETTINGS_GROUPS.flatMap((g) => g.sections.map((s) => s.id))}++/**+ * The groups as the sidebar should render them for this platform: a mac-only section is dropped+ * entirely off macOS (an empty group would be dropped too, though none exists today). Pure — the+ * caller passes the platform so this stays testable.+ */+export function visibleSettingsGroups(isMac: boolean): SettingsGroup[] {+ if (isMac) return SETTINGS_GROUPS+ return SETTINGS_GROUPS.map((g) => ({ ...g, sections: g.sections.filter((s) => !s.macOnly) })).filter(+ (g) => g.sections.length > 0+ )+}diff --git a/src/renderer/components/settings/sections/AppearanceSection.tsx b/src/renderer/components/settings/sections/AppearanceSection.tsxindex 7517631b2..2b6898dfc 100644--- a/src/renderer/components/settings/sections/AppearanceSection.tsx+++ b/src/renderer/components/settings/sections/AppearanceSection.tsx@@ -2,24 +2,15 @@ import { useSettings } from '../../../state/settings'import { NODE_COLORS } from '../../../state/workspace'import { SettingsSection } from '../SettingsSection'import { SearchableRow } from '../SearchableRow'-import { FieldRow } from '../FieldRow'-import { Switch } from '@renderer/ui/Switch'import { cn } from '@renderer/ui/cn'-const isMac = /Mac/i.test(navigator.platform || navigator.userAgent)-const ROWS = {- accent: { title: 'Accent', keywords: ['accent', 'color', 'theme', 'appearance'] },- notchHud: {- title: 'Notch HUD',- keywords: ['notch', 'hud', 'mascot', 'menu bar', 'overlay', 'agent', 'status', 'macos']- }+ accent: { title: 'Accent', keywords: ['accent', 'color', 'theme', 'appearance'] }}const ENTRIES = Object.values(ROWS)export function AppearanceSection({ isActive }: { isActive: boolean }): React.JSX.Element {const accent = useSettings((s) => s.settings.accent)- const notchHud = useSettings((s) => s.settings.notchHud)const update = useSettings((s) => s.update)return (<SettingsSection@@ -48,21 +39,6 @@ export function AppearanceSection({ isActive }: { isActive: boolean }): React.JS</div></div></SearchableRow>- {isMac && (- <SearchableRow {...ROWS.notchHud}>- <FieldRow- label="Notch HUD"- description="Show walking agent mascots by the notch while agents work; click to expand a mini session panel. macOS only."- control={- <Switch- checked={notchHud}- ariaLabel="macOS Notch HUD"- onChange={(on) => update({ notchHud: on })}- />- }- />- </SearchableRow>- )}</SettingsSection>)}diff --git a/src/renderer/components/settings/sections/NotchSection.tsx b/src/renderer/components/settings/sections/NotchSection.tsxnew file mode 100644index 000000000..8b248c714--- /dev/null+++ b/src/renderer/components/settings/sections/NotchSection.tsx@@ -0,0 +1,109 @@+import { useSettings } from '../../../state/settings'+import { SettingsSection } from '../SettingsSection'+import { SearchableRow } from '../SearchableRow'+import { FieldRow } from '../FieldRow'+import { Switch } from '@renderer/ui/Switch'++/** Keep in sync with NOTCH_WIDTH_MIN/MAX in src/main/notch-hud.ts (which clamps anyway). */+const WIDTH_MIN = 100+const WIDTH_MAX = 320++const ROWS = {+ enabled: {+ title: 'Notch HUD',+ keywords: ['notch', 'hud', 'mascot', 'menu bar', 'overlay', 'agent', 'status', 'macos', 'capsule', 'dynamic island']+ },+ width: {+ title: 'Notch width',+ keywords: ['notch', 'width', 'flush', 'align', 'capsule', 'position', 'offset', 'tune']+ },+ hover: {+ title: 'Expand on hover',+ keywords: ['notch', 'hover', 'expand', 'panel', 'click', 'open', 'sessions']+ }+}+const ENTRIES = Object.values(ROWS)++/**+ * Settings → Interface → Notch (macOS only; the page only renders it on darwin).+ *+ * Everything the notch capsule exposes lives here rather than in Appearance: the enable toggle, the+ * notch-width knob (macOS exposes no API for the real notch width, so the capsule has to assume one+ * — this is how you make it sit flush on YOUR Mac), and hover-vs-click expansion. All three apply+ * live: dragging the width slider moves the capsule as you drag.+ */+export function NotchSection({ isActive }: { isActive: boolean }): React.JSX.Element {+ const notchHud = useSettings((s) => s.settings.notchHud)+ const notchWidth = useSettings((s) => s.settings.notchWidth)+ const hoverExpand = useSettings((s) => s.settings.notchHoverExpand)+ const update = useSettings((s) => s.update)+ return (+ <SettingsSection+ id="notch"+ title="Notch"+ description="Walking agent mascots inside the MacBook notch, and a mini session panel when you need it."+ isActive={isActive}+ searchEntries={ENTRIES}+ >+ <SearchableRow {...ROWS.enabled}>+ <FieldRow+ label="Show the notch HUD"+ description="Extends the notch into a black capsule while agents work: a walking mascot per busy agent, a red dot when one needs you, a green blob when one has finished and you haven't looked yet."+ control={+ <Switch+ checked={notchHud}+ ariaLabel="macOS Notch HUD"+ onChange={(on) => update({ notchHud: on })}+ />+ }+ />+ </SearchableRow>++ <div+ className={+ 'mt-3 space-y-3 border-l border-white/10 pl-4' ++ (notchHud ? '' : ' pointer-events-none opacity-40')+ }+ aria-disabled={!notchHud}+ >+ <SearchableRow {...ROWS.width}>+ <FieldRow+ label="Notch width"+ description="macOS doesn't tell apps how wide the notch is, so the capsule assumes it. Nudge this until the capsule sits flush against the notch — larger moves it left, smaller moves it right."+ control={+ <div className="flex items-center gap-3">+ <input+ type="range"+ min={WIDTH_MIN}+ max={WIDTH_MAX}+ step={2}+ value={notchWidth}+ aria-label="Assumed notch width in pixels"+ onChange={(e) => update({ notchWidth: Number(e.target.value) })}+ className="w-40 accent-[var(--accent)]"+ />+ <span className="w-12 text-right text-[12px] text-white/50 tabular-nums">+ {notchWidth} px+ </span>+ </div>+ }+ />+ </SearchableRow>++ <SearchableRow {...ROWS.hover}>+ <FieldRow+ label="Expand on hover"+ description="Point at the capsule to open the session panel. Off = it only opens when you click it. Either way it closes when you move away — and that's when a finished session stops glowing green."+ control={+ <Switch+ checked={hoverExpand}+ ariaLabel="Expand the notch panel on hover"+ onChange={(on) => update({ notchHoverExpand: on })}+ />+ }+ />+ </SearchableRow>+ </div>+ </SettingsSection>+ )+}diff --git a/src/renderer/hud/hud.css b/src/renderer/hud/hud.cssindex e8e75ee3a..76b8d7294 100644--- a/src/renderer/hud/hud.css+++ b/src/renderer/hud/hud.css@@ -328,8 +328,10 @@ body {color: #8e8e93;}.hud-row__sub {- grid-column: 2 / span 2;+ /* Column 2 ONLY: spanning into column 3 ran the `You: …` line UNDER the Go button. */+ grid-column: 2;grid-row: 2;+ min-width: 0;font-family: var(--hud-mono);font-size: 11px;color: #98989d;diff --git a/src/renderer/hud/main.ts b/src/renderer/hud/main.tsindex 0c64312cd..6914417eb 100644--- a/src/renderer/hud/main.ts+++ b/src/renderer/hud/main.ts@@ -34,6 +34,7 @@ interface HudPush {notchWidth: numbernotchCenterX: numberhasNotch: boolean+ hoverExpand: boolean}interface HudApi {onRows(cb: (push: HudPush) => void): () => void@@ -68,6 +69,8 @@ let expanded = falselet latestRows: HudRow[] = []// Notch width from main's geometry push — drives the symmetric right-hand padding.let notchWidthPx = 168+// Hover-to-expand (settings.notchHoverExpand). Off = the capsule only expands on click.+let hoverExpand = true// Which subagent disclosures the user has opened (by nodeId), preserved across re-renders.const openSubs = new Set<string>()@@ -86,7 +89,7 @@ let hoverTimer: number | undefinedcapsule.addEventListener('pointerenter', () => {window.hud.setIgnoreMouse(false)window.clearTimeout(hoverTimer)- hoverTimer = window.setTimeout(() => setExpanded(true), HOVER_OPEN_MS)+ if (hoverExpand) hoverTimer = window.setTimeout(() => setExpanded(true), HOVER_OPEN_MS)})capsule.addEventListener('pointerleave', () => {window.clearTimeout(hoverTimer)@@ -370,6 +373,7 @@ function applyGeometry(push: HudPush): void {rs.setProperty('--notch-width', `${push.notchWidth}px`)}if (typeof push.notchCenterX === 'number') rs.setProperty('--notch-center-x', `${push.notchCenterX}px`)+ if (typeof push.hoverExpand === 'boolean') hoverExpand = push.hoverExpand// No physical notch → draw a standalone floating pill instead of fusing to y=0.document.documentElement.classList.toggle('notchless', push.hasNotch === false)}diff --git a/src/renderer/styles.css b/src/renderer/styles.cssindex b2835c3ee..9e2bd2183 100644--- a/src/renderer/styles.css+++ b/src/renderer/styles.css@@ -7434,6 +7434,15 @@ body,color: var(--muted);margin-bottom: 8px;}+.onb-toggle-row {+ display: flex;+ align-items: center;+ gap: 10px;+ margin: 14px 0 4px;+ font-size: 13px;+ color: var(--text, #f5f5f7);+}+.onb-fineprint {margin-top: 10px;font-size: 11.5px;@@ -7969,8 +7978,117 @@ body,border-radius: 2px;background: rgba(255, 255, 255, 0.14);}+.onb-mini__bar--short {+ flex: 0 0 46px;+}/* -- notify scene -- */+/* --- Step: the notch capsule (SceneNotch) ------------------------------------------------+ A laptop lid seen from the front: the black top bar carries the notch, the capsule grows out+ of it sideways (never taller — the whole point of the real design), and every loop the mini+ session panel drops out of the capsule and retracts. */+.onb-scene--notch {+ display: flex;+ align-items: center;+ justify-content: center;+}+.onb-lid {+ position: relative;+ width: 78%;+ max-width: 340px;+ border-radius: 12px 12px 6px 6px;+ border: 1px solid rgba(255, 255, 255, 0.14);+ background: #0b0b0d;+ overflow: visible;+ box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);+}+.onb-lid__bar {+ position: relative;+ height: 26px;+ display: flex;+ align-items: flex-start;+ justify-content: center;+ border-radius: 11px 11px 0 0;+ background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));+}+.onb-lid__screen {+ height: 132px;+ border-radius: 0 0 5px 5px;+ background:+ radial-gradient(120% 80% at 50% 0%, rgba(163, 141, 255, 0.16), transparent 60%),+ #101014;+}+/* The capsule: notch-black, top corners square (fused to the bar), bottom corners rounded. */+.onb-capsule {+ position: absolute;+ top: 0;+ display: flex;+ align-items: center;+ height: 26px;+ padding-left: 8px;+ background: #000;+ border-radius: 0 0 10px 10px;+ animation: onb-capsule 6s ease-in-out infinite;+}+.onb-capsule__left {+ display: flex;+ align-items: center;+ gap: 6px;+}+/* Stands in for the physical notch the capsule is fused to. */+.onb-capsule__notch {+ width: 62px;+ height: 26px;+}+.onb-capsule__blob {+ width: 8px;+ height: 8px;+ border-radius: 50%;+ background: rgb(48, 209, 88);+ animation: onb-blob 1.6s ease-in-out infinite;+}+@keyframes onb-capsule {+ 0%, 10% { padding-right: 8px; }+ 30%, 100% { padding-right: 8px; }+}+@keyframes onb-blob {+ 0%, 100% { opacity: 0.45; }+ 50% { opacity: 1; }+}+/* The mini session panel dropping out of the capsule. */+.onb-notchpanel {+ position: absolute;+ top: 26px;+ width: 168px;+ padding: 7px;+ display: flex;+ flex-direction: column;+ gap: 6px;+ background: #000;+ border-radius: 0 0 12px 12px;+ transform-origin: top center;+ animation: onb-notchpanel 6s ease-in-out infinite;+}+.onb-notchpanel__row {+ display: flex;+ align-items: center;+ gap: 6px;+}+.onb-notchpanel__go {+ margin-left: auto;+ font-size: 9px;+ font-weight: 600;+ color: #0a84ff;+ background: rgba(10, 132, 255, 0.18);+ border-radius: 4px;+ padding: 1px 5px;+}+@keyframes onb-notchpanel {+ 0%, 22% { transform: scaleY(0.05); opacity: 0; }+ 34%, 72% { transform: scaleY(1); opacity: 1; }+ 86%, 100% { transform: scaleY(0.05); opacity: 0; }+}+.onb-scene--notify {display: flex;align-items: center;diff --git a/src/shared/types.ts b/src/shared/types.tsindex 76e443b66..baeff70ba 100644--- a/src/shared/types.ts+++ b/src/shared/types.ts@@ -698,6 +698,12 @@ export interface Settings {* walking agent mascots while agents work, expanding into a mini session panel. Default on;* macOS + desktop only (ignored on other platforms / Server Edition). */notchHud: boolean+ /** Assumed physical notch width in px. macOS exposes no API for it (Electron has no+ * `auxiliaryTopLeftArea`), so the capsule has to assume one — this is the knob that makes it sit+ * flush on YOUR Mac. Bigger = the capsule sits further left. */+ notchWidth: number+ /** Expand the notch panel on hover (after a short dwell). Off = click the capsule to expand. */+ notchHoverExpand: boolean/** Dictation (desktop/server). Written as a whole object by the renderer. */speech: SpeechSettings}@@ -755,6 +761,8 @@ export const DEFAULT_SETTINGS: Settings = {hookReplyApprovals: true,// macOS Notch HUD default ON (guarded to darwin at runtime; a no-op elsewhere).notchHud: true,+ notchWidth: 168,+ notchHoverExpand: true,speech: { engine: 'whisper', model: 'tiny', language: 'auto', shortcut: 'Cmd+Alt' },}