The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
feat(desktop): name the app's shared surfaces for tours
Brooklyn Nicholson702d7bacc922
diff --git a/apps/desktop/src/app/artifacts/index.tsx b/apps/desktop/src/app/artifacts/index.tsxindex 07f2cc70481..73321f5ae78 100644--- a/apps/desktop/src/app/artifacts/index.tsx+++ b/apps/desktop/src/app/artifacts/index.tsx@@ -492,7 +492,10 @@ function ArtifactImageCard({ artifact, failedImage, onImageError, onOpenChat }:}, [artifact.href, artifact.id, artifact.value, onImageError])return (- <article className="group/artifact overflow-hidden rounded-lg border border-(--ui-stroke-tertiary) bg-(--ui-chat-bubble-background)">+ <article+ className="group/artifact overflow-hidden rounded-lg border border-(--ui-stroke-tertiary) bg-(--ui-chat-bubble-background)"+ data-tour="artifact-card"+ ><divclassName={cn('relative flex h-40 w-full items-center justify-center overflow-hidden border-b border-(--ui-stroke-tertiary) bg-(--ui-bg-quinary) p-1.5',diff --git a/apps/desktop/src/app/overlays/overlay-split-layout.tsx b/apps/desktop/src/app/overlays/overlay-split-layout.tsxindex b4a90dd0f32..d1ef5d27103 100644--- a/apps/desktop/src/app/overlays/overlay-split-layout.tsx+++ b/apps/desktop/src/app/overlays/overlay-split-layout.tsx@@ -31,6 +31,8 @@ interface OverlayMainProps {interface OverlayNavItemProps {active: booleanicon: IconComponent+ /** Stable identity for the row, used as its `data-tour` handle. */+ id?: stringlabel: string// Renders as an indented child of another nav item: smaller icon and a// lighter active state so it never competes with the boxed parent item.@@ -67,6 +69,10 @@ export function OverlaySidebar({ children, className }: OverlaySidebarProps) {OVERLAY_TOP_CLEARANCE,className)}+ // Every overlay's left nav (settings, cron, profiles, agents) answers to+ // one name, so a tour can point at "the nav" without knowing which+ // overlay is open. See lib/tour.+ data-tour="overlay-nav">{children}</aside>@@ -97,6 +103,7 @@ export function OverlayMain({ children, className }: OverlayMainProps) {export const OverlayNavItem = memo(function OverlayNavItem({active,icon: Icon,+ id,label,nested,onClick,@@ -114,6 +121,9 @@ export const OverlayNavItem = memo(function OverlayNavItem({? 'border-(--ui-stroke-tertiary) bg-(--ui-bg-tertiary) text-foreground': 'border-transparent bg-transparent text-(--ui-text-secondary) hover:bg-(--chrome-action-hover) hover:text-foreground')}+ // Names the row by its own id, so a tour can address one link+ // (`[data-tour="nav-models"]`) instead of guessing at nth-child.+ data-tour={id ? `nav-${id}` : undefined}onClick={onClick}type="button">@@ -159,13 +169,20 @@ export function OverlayNav({ footer, groups }: { footer?: ReactNode; groups: Ove{groups.map(group => (<Fragment key={group.id}>{group.gapBefore && <div aria-hidden className="h-2" />}- <OverlayNavItem active={group.active} icon={group.icon} label={group.label} onClick={group.onSelect} />+ <OverlayNavItem+ active={group.active}+ icon={group.icon}+ id={group.id}+ label={group.label}+ onClick={group.onSelect}+ />{group.children && group.active && (<div className="ml-3.5 flex flex-col gap-0.5 pl-1.5">{group.children.map(child => (<OverlayNavItemactive={child.active}icon={child.icon}+ id={child.id}key={child.id}label={child.label}nesteddiff --git a/apps/desktop/src/app/page-search-shell.tsx b/apps/desktop/src/app/page-search-shell.tsxindex b94f28114ca..1219a64ba5f 100644--- a/apps/desktop/src/app/page-search-shell.tsx+++ b/apps/desktop/src/app/page-search-shell.tsx@@ -103,7 +103,13 @@ export function PageSearchShell({/>)}</div>- {hasTabs ? <ShellTabs activeTab={activeTab} onTabChange={onTabChange} tabs={tabs!} /> : <span />}+ {hasTabs ? (+ <div className="flex min-w-0 items-center justify-center" data-tour="page-tabs">+ <ShellTabs activeTab={activeTab} onTabChange={onTabChange} tabs={tabs!} />+ </div>+ ) : (+ <span />+ )}<div className="flex min-w-0 items-center justify-end">{searchTrailingAction}</div></div>)}diff --git a/apps/desktop/src/app/settings/config-field.tsx b/apps/desktop/src/app/settings/config-field.tsxindex 21e46787226..dc645d06ba3 100644--- a/apps/desktop/src/app/settings/config-field.tsx+++ b/apps/desktop/src/app/settings/config-field.tsx@@ -74,8 +74,17 @@ export function ConfigField({description)+ // Every config row is addressable by its canonical schema key, so a tour can+ // point at one setting (`[data-tour="field-model"]`) without hunting through+ // the section for an nth-child path. See lib/tour.const row = (action: ReactNode, wide = false) => (- <ListRow action={action} description={descriptionNode} title={label} wide={wide} />+ <ListRow+ action={action}+ data-tour={`field-${schemaKey}`}+ description={descriptionNode}+ title={label}+ wide={wide}+ />)// `fallback_providers` is a list of {provider, model} objects; the genericdiff --git a/apps/desktop/src/app/settings/primitives.tsx b/apps/desktop/src/app/settings/primitives.tsxindex 59f3e1fe002..ab875ed7037 100644--- a/apps/desktop/src/app/settings/primitives.tsx+++ b/apps/desktop/src/app/settings/primitives.tsx@@ -111,6 +111,7 @@ export function ListRow({hint,action,below,+ 'data-tour': dataTour,id,wide = false,className@@ -120,6 +121,8 @@ export function ListRow({hint?: ReactNodeaction?: ReactNodebelow?: ReactNode+ /** Durable handle for tours (see lib/tour) — usually the field's schema key. */+ 'data-tour'?: stringid?: stringwide?: booleanclassName?: string@@ -128,7 +131,7 @@ export function ListRow({// Container-queried, not viewport-queried: the label/control split keys on// the row's own pane width, so a narrow detail column (messaging, split// views) stacks instead of squishing the label against minmax(15rem,…).- <div className={cn('@container', className)} id={id}>+ <div className={cn('@container', className)} data-tour={dataTour} id={id}><divclassName={cn('grid gap-3 py-3',diff --git a/apps/desktop/src/components/ui/tab-dropdown.tsx b/apps/desktop/src/components/ui/tab-dropdown.tsxindex 5e207010089..83a5d68ebf1 100644--- a/apps/desktop/src/components/ui/tab-dropdown.tsx+++ b/apps/desktop/src/components/ui/tab-dropdown.tsx@@ -114,7 +114,14 @@ export function ResponsiveTabs({<><div className={cn('hidden min-w-0 flex-wrap items-center gap-x-2 gap-y-1 md:flex', wideClassName)}>{tabs.map(tab => (- <TextTab active={tab.id === value} key={tab.id} onClick={() => onChange(tab.id)}>+ <TextTab+ active={tab.id === value}+ // Names each tab by its own id, so a tour can walk them one by one+ // (`[data-tour="tab-images"]`) on every page that uses this row.+ data-tour={`tab-${tab.id}`}+ key={tab.id}+ onClick={() => onChange(tab.id)}+ >{tab.label}{tab.meta !== undefined && <TextTabMeta>{tabMetaContent(tab.meta)}</TextTabMeta>}</TextTab>