The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
feat(desktop): organize settings into ordered subpages
brooklyn!5a0fb0f38d2c
diff --git a/apps/desktop/DESIGN.md b/apps/desktop/DESIGN.mdindex 77388052ec8..f5eafb4e15d 100644--- a/apps/desktop/DESIGN.md+++ b/apps/desktop/DESIGN.md@@ -247,6 +247,17 @@ blurred backdrop.- **Master/detail overlays:** `OverlaySplitLayout` + `OverlaySidebar` /`OverlayMain`. Cron, profiles, etc. ride this — don't rebuild a titlebarshell.+- **Settings subpages:** `OverlayNav` keeps navigation and disclosure separate:+ labels navigate; the shared `DisclosureCaret` button opens a branch without+ changing the page. Active paths reveal automatically, inactive paths stay+ folded unless manually opened. General comes first wherever present; parent+ labels and parent URLs open the first ordered subpage, never an overview or+ the last visited child. Explicit child links retain their destination;+ every parent and child uses the same Settings breadcrumb, without a duplicate+ icon-and-title heading. Page-level `SectionHeading page` retains actions and+ counts under breadcrumb-owned chrome; embedded callers keep their headings.+ Narrow windows keep every destination available in the shared navigation dropdown.+ Search and saved field links resolve to the owning child before highlighting.- **Rows:** `ListRow` (settings `primitives.tsx`) for label/description/actionrows. Flat, flush-left; no per-row indentation that fights flush headers.- **No dividers between rows** unless the list genuinely needs them; preferdiff --git a/apps/desktop/src/app/command-palette/index.tsx b/apps/desktop/src/app/command-palette/index.tsxindex 72b1729fc4e..28201cbf498 100644--- a/apps/desktop/src/app/command-palette/index.tsx+++ b/apps/desktop/src/app/command-palette/index.tsx@@ -1180,7 +1180,7 @@ function CommandPaletteBody({ onExited }: { onExited: () => void }) {})}- const fieldItems = [...settingsCatalog.appearanceEntries, ...settingsCatalog.configEntries].map(settingsEntryItem)+ const fieldItems = [...settingsCatalog.subpageEntries, ...settingsCatalog.appearanceEntries, ...settingsCatalog.configEntries].map(settingsEntryItem)if (fieldItems.length > 0) {result.push({ heading: t.commandCenter.settingsFields, items: fieldItems })@@ -1302,7 +1302,7 @@ function CommandPaletteBody({ onExited }: { onExited: () => void }) {if (search.trim()) {result.push({heading: cc.settingsFields,- items: [...settingsCatalog.appearanceEntries, ...settingsCatalog.configEntries].map(settingsEntryItem)+ items: [...settingsCatalog.subpageEntries, ...settingsCatalog.appearanceEntries, ...settingsCatalog.configEntries].map(settingsEntryItem)})if (settingsCatalog.credentialEntries.length > 0) {diff --git a/apps/desktop/src/app/overlays/overlay-split-layout.test.tsx b/apps/desktop/src/app/overlays/overlay-split-layout.test.tsxnew file mode 100644index 00000000000..9c66340e938--- /dev/null+++ b/apps/desktop/src/app/overlays/overlay-split-layout.test.tsx@@ -0,0 +1,34 @@+import { cleanup, fireEvent, render, within } from '@testing-library/react'+import { afterEach, expect, it, vi } from 'vitest'++import { Settings2 } from '@/lib/icons'++import { OverlayNav, type OverlayNavGroup } from './overlay-split-layout'++afterEach(cleanup)++it('expands independently of navigation and reveals a newly selected child', () => {+ const select = vi.fn()++ const group = (active: boolean, child: string): OverlayNavGroup => ({+ active, id: 'appearance', label: 'Appearance', icon: Settings2, onSelect: select,+ children: ['General', 'Theme'].map(label => ({+ active: active && child === label, id: label, label, icon: Settings2, onSelect: select+ }))+ })++ const { container, rerender } = render(<OverlayNav groups={[group(false, '')]} />)+ const rail = within(container.querySelector('[data-tour="overlay-nav"]') as HTMLElement)+ fireEvent.click(rail.getByRole('button', { name: 'Expand: Appearance' }))+ expect(select).not.toHaveBeenCalled()+ expect(rail.getByRole('button', { name: 'Theme' })).toBeTruthy()+ fireEvent.click(rail.getByRole('button', { name: 'Theme' }))+ expect(select).toHaveBeenCalledOnce()+ rerender(<OverlayNav groups={[group(true, 'Theme')]} />)+ fireEvent.click(rail.getByRole('button', { name: 'Collapse: Appearance' }))+ expect(select).toHaveBeenCalledOnce()+ expect(rail.queryByRole('button', { name: 'Theme' })).toBeNull()+ rerender(<OverlayNav groups={[group(true, 'General')]} />)+ expect(rail.getByRole('button', { name: 'General' }).getAttribute('aria-current')).toBe('page')+ expect(rail.getByRole('button', { name: 'Collapse: Appearance' }).getAttribute('aria-expanded')).toBe('true')+})diff --git a/apps/desktop/src/app/overlays/overlay-split-layout.tsx b/apps/desktop/src/app/overlays/overlay-split-layout.tsxindex d1ef5d27103..ecbc9fe2866 100644--- a/apps/desktop/src/app/overlays/overlay-split-layout.tsx+++ b/apps/desktop/src/app/overlays/overlay-split-layout.tsx@@ -1,6 +1,9 @@-import { Fragment, memo, type ReactNode } from 'react'+import { Fragment, memo, type ReactNode, useEffect, useId, useState } from 'react'+import { Button } from '@/components/ui/button'+import { DisclosureCaret } from '@/components/ui/disclosure-caret'import { TabDropdown } from '@/components/ui/tab-dropdown'+import { useI18n } from '@/i18n'import type { IconComponent } from '@/lib/icons'import { cn } from '@/lib/utils'@@ -30,6 +33,7 @@ interface OverlayMainProps {interface OverlayNavItemProps {active: boolean+ current?: booleanicon: IconComponent/** Stable identity for the row, used as its `data-tour` handle. */id?: string@@ -102,6 +106,7 @@ export function OverlayMain({ children, className }: OverlayMainProps) {export const OverlayNavItem = memo(function OverlayNavItem({active,+ current = active,icon: Icon,id,label,@@ -111,6 +116,7 @@ export const OverlayNavItem = memo(function OverlayNavItem({}: OverlayNavItemProps) {return (<button+ aria-current={current ? 'page' : undefined}className={cn('flex h-7 w-full items-center justify-start gap-2 rounded-md border px-2 text-left text-[length:var(--conversation-text-font-size)] font-normal transition-colors',nested@@ -149,8 +155,8 @@ export interface OverlayNavLink {}export interface OverlayNavGroup extends OverlayNavLink {- /** Sub-links: expanded under the active group on the rail, always listed- * (flattened + indented) in the narrow dropdown. */+ /** Sub-links: revealed by navigation or independently by the disclosure.+ * Always listed (flattened + indented) in the narrow dropdown. */children?: OverlayNavLink[]/** Visual break before this group — a spacer on the rail, a separator in* the dropdown. */@@ -163,36 +169,106 @@ export interface OverlayNavGroup extends OverlayNavLink {// same way instead of stacking its whole sidebar. Drop it in as the first// child of an OverlaySplitLayout, before OverlayMain.export function OverlayNav({ footer, groups }: { footer?: ReactNode; groups: OverlayNavGroup[] }) {+ const { t } = useI18n()+ const navId = useId()+ const [disclosures, setDisclosures] = useState<Record<string, boolean>>({})+ const activeGroup = groups.find(group => group.active)+ const activeGroupId = activeGroup?.id+ const activeChildId = activeGroup?.children?.find(child => child.active)?.id++ // Route entry reveals its branch. Explicitly opened inactive branches stay+ // open, while automatically revealed branches fold when leaving them.+ useEffect(() => {+ if (!activeGroupId) {+ return+ }++ setDisclosures(previous => {+ if (previous[activeGroupId] !== false) {+ return previous+ }++ const next = { ...previous }+ delete next[activeGroupId]++ return next+ })+ }, [activeGroupId, activeChildId])+return (<><OverlaySidebar className={RAIL_HIDDEN}>- {groups.map(group => (- <Fragment key={group.id}>- {group.gapBefore && <div aria-hidden className="h-2" />}- <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 => (- <OverlayNavItem- active={child.active}- icon={child.icon}- id={child.id}- key={child.id}- label={child.label}- nested- onClick={child.onSelect}- />- ))}+ {groups.map(group => {+ const hasChildren = Boolean(group.children?.length)+ const expanded = disclosures[group.id] ?? group.active+ const childrenId = `${navId}-${group.id}`++ return (+ <Fragment key={group.id}>+ {group.gapBefore && <div aria-hidden className="h-2" />}+ <div className="relative">+ <OverlayNavItem+ active={group.active}+ current={group.active && !group.children?.some(child => child.active)}+ icon={group.icon}+ id={group.id}+ label={group.label}+ onClick={() => {+ if (hasChildren) {+ setDisclosures(previous => {+ if (previous[group.id] !== false) {+ return previous+ }++ const next = { ...previous }+ delete next[group.id]++ return next+ })+ }++ group.onSelect()+ }}+ trailing={hasChildren ? <span aria-hidden className="w-4 shrink-0" /> : undefined}+ />+ {hasChildren && (+ <Button+ aria-controls={childrenId}+ aria-expanded={expanded}+ aria-label={`${expanded ? t.common.collapse : t.common.expand}: ${group.label}`}+ className="absolute right-0.5 top-1/2 -translate-y-1/2"+ data-tour={`nav-toggle-${group.id}`}+ onClick={() => setDisclosures(previous => ({ ...previous, [group.id]: !expanded }))}+ size="icon-xs"+ type="button"+ variant="ghost"+ >+ <DisclosureCaret open={expanded} />+ </Button>+ )}</div>- )}- </Fragment>- ))}+ {hasChildren && (+ <div+ className={cn('ml-3.5 flex flex-col gap-0.5 pl-1.5', !expanded && 'hidden')}+ hidden={!expanded}+ id={childrenId}+ >+ {group.children?.map(child => (+ <OverlayNavItem+ active={child.active}+ icon={child.icon}+ id={child.id}+ key={child.id}+ label={child.label}+ nested+ onClick={child.onSelect}+ />+ ))}+ </div>+ )}+ </Fragment>+ )+ })}{footer && <div className="mt-auto flex items-center gap-1 pt-2">{footer}</div>}</OverlaySidebar>diff --git a/apps/desktop/src/app/settings/about-settings.tsx b/apps/desktop/src/app/settings/about-settings.tsxindex 5d84d65e283..fda946eaa21 100644--- a/apps/desktop/src/app/settings/about-settings.tsx+++ b/apps/desktop/src/app/settings/about-settings.tsx@@ -46,7 +46,23 @@ function relativeTime(ms: number | undefined, a: Translations['settings']['aboutreturn a.daysAgo(Math.round(diff / 86_400_000))}-export function AboutSettings() {+interface AboutSettingsProps {+ subpage?: string+}++export function AboutSettings({ subpage }: AboutSettingsProps = {}) {+ if (subpage === 'uninstall') {+ return (+ <SettingsContent>+ <UninstallSection />+ </SettingsContent>+ )+ }++ return <AppUpdatesSettings includeUninstall={subpage === undefined} />+}++function AppUpdatesSettings({ includeUninstall }: { includeUninstall: boolean }) {const { t } = useI18n()const a = t.settings.aboutconst version = useStore($desktopVersion)@@ -230,7 +246,7 @@ export function AboutSettings() {title={a.automaticUpdates}/>- <UninstallSection />+ {includeUninstall && <UninstallSection />}</div></SettingsContent>)diff --git a/apps/desktop/src/app/settings/appearance-settings.tsx b/apps/desktop/src/app/settings/appearance-settings.tsxindex 49b740fc004..d24390282c3 100644--- a/apps/desktop/src/app/settings/appearance-settings.tsx+++ b/apps/desktop/src/app/settings/appearance-settings.tsx@@ -64,6 +64,7 @@ import { $marketplaceInstalls, isUserTheme, removeUserTheme } from '@/themes/useimport { setHermesConfigCache, useHermesConfigRecord } from '../hooks/use-config-record'+import { appearanceSubpageForSetting, type AppearanceSubpageId } from './appearance-subpages'import { ChatFontSetting } from './chat-font-setting'import { MODE_OPTIONS } from './constants'import { setNested } from './helpers'@@ -159,7 +160,6 @@ function ThemePreview({ name, mode }: { name: string; mode: 'light' | 'dark' })// presets highlights nothing, and the row description keeps showing the// exact current percent.const UI_SCALE_PRESETS = ['90', '100', '110', '125', '150', '175'] as const-const APPEARANCE_SEARCH_TARGETS = new Set<string>(Object.values(APPEARANCE_SETTING_IDS))const appearanceSettingElementId = (id: string) => `setting-field-${id}`type UiScalePreset = (typeof UI_SCALE_PRESETS)[number]@@ -399,7 +399,11 @@ function GlassRow({ children, label }: GlassRowProps) {)}-export function AppearanceSettings() {+interface AppearanceSettingsProps {+ subpage?: string+}++export function AppearanceSettings({ subpage }: AppearanceSettingsProps = {}) {const { t, isSavingLocale } = useI18n()const { themeName, mode, resolvedMode, availableThemes, setTheme, setMode } = useTheme()const toolViewMode = useStore($toolViewMode)@@ -430,9 +434,9 @@ export function AppearanceSettings() {// A pointer held on the intensity slider when this overlay closes (Escape// mid-drag) never delivers its pointerup here, which would strand the peek- // counter above zero and ghost the NEXT settings overlay. Unmount drops- // every outstanding hold.- useEffect(() => resetTranslucencyPeek, [])+ // counter above zero and ghost the NEXT settings overlay. Leaving a subpage+ // also unmounts its sliders, so drop every outstanding hold on that change.+ useEffect(() => resetTranslucencyPeek, [subpage])// Shared by the mode/frost/area pickers: apply the choice, then show it// through the overlay it just altered (a pulse, not a hold — see the peek@@ -449,11 +453,16 @@ export function AppearanceSettings() {}const [query, setQuery] = useState('')+ const show = (id: AppearanceSubpageId) => subpage === undefined || subpage === iduseDeepLinkHighlight({elementId: appearanceSettingElementId,param: 'setting',- ready: id => APPEARANCE_SEARCH_TARGETS.has(id)+ ready: id => {+ const targetSubpage = appearanceSubpageForSetting(id)++ return targetSubpage !== undefined && show(targetSubpage)+ }})// One box does double duty: filter installed themes live (below), and run a@@ -516,188 +525,210 @@ export function AppearanceSettings() {return (<SettingsContent><div>- <SectionHeading icon={Palette} title={a.title} />- <p className="max-w-2xl text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">- {a.intro}- </p>+ {subpage === undefined && (+ <>+ <SectionHeading icon={Palette} title={a.title} />+ <p className="max-w-2xl text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">+ {a.intro}+ </p>+ </>+ )}++ <div className={subpage === undefined ? 'mt-2' : undefined}>+ {show('general') && (+ <ListRow+ action={<LanguageSwitcher />}+ description={isSavingLocale ? t.language.saving : t.language.description}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.language)}+ title={t.language.label}+ />+ )}- <div className="mt-2">- <ListRow- action={<LanguageSwitcher />}- description={isSavingLocale ? t.language.saving : t.language.description}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.language)}- title={t.language.label}- />-- <ListRow- below={- <>- {/* One search box: filters your installed themes (the grid)- and live-searches the VS Code Marketplace below. */}- <div className="mt-3">- <input- className="w-full rounded-lg border border-(--ui-stroke-tertiary) bg-(--ui-bg-quinary) px-3 py-1.5 text-[length:var(--conversation-caption-font-size)] outline-none placeholder:text-(--ui-text-tertiary) focus:border-(--ui-stroke-secondary)"- onChange={event => setQuery(event.target.value)}- placeholder={a.themeSearchPlaceholder}- spellCheck={false}- value={query}- />- </div>+ {show('theme') && (+ <ListRow+ below={+ <>+ {/* One search box: filters your installed themes (the grid)+ and live-searches the VS Code Marketplace below. */}+ <div className="mt-3">+ <input+ className="w-full rounded-lg border border-(--ui-stroke-tertiary) bg-(--ui-bg-quinary) px-3 py-1.5 text-[length:var(--conversation-caption-font-size)] outline-none placeholder:text-(--ui-text-tertiary) focus:border-(--ui-stroke-secondary)"+ onChange={event => setQuery(event.target.value)}+ placeholder={a.themeSearchPlaceholder}+ spellCheck={false}+ value={query}+ />+ </div>- {/* Fixed-height scroll area so the (growing) theme list never- runs the page long; the grid scrolls inside it. */}- <div className="mt-3 max-h-96 overflow-y-auto pr-1">- {filteredThemes.length === 0 ? (- needle ? (- <p className="text-[length:var(--conversation-caption-font-size)] text-(--ui-text-tertiary)">- No installed themes match "{query.trim()}".- </p>- ) : null- ) : (- <div className="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">- {filteredThemes.map(theme => {- const active = themeName === theme.name- const removable = isUserTheme(theme.name)-- return (- <div className="group relative" key={theme.name}>- <button- className={cn('w-full p-2 text-left', selectableCardClass({ active, prominent: true }))}- onClick={() => {- triggerHaptic('crisp')- setTheme(theme.name)- }}- type="button"- >- <ThemePreview mode={resolvedMode} name={theme.name} />- <div className="mt-3 px-1">- <div className="truncate text-[length:var(--conversation-text-font-size)] font-medium">- {theme.label}- </div>- <div className="mt-0.5 line-clamp-2 text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">- {theme.description}- </div>- </div>- </button>- {removable && (+ {/* The dedicated theme page uses the page scroller rather+ than clipping its gallery inside another scroll area. */}+ <div className={cn('mt-3', subpage === undefined && 'max-h-96 overflow-y-auto pr-1')}>+ {filteredThemes.length === 0 ? (+ needle ? (+ <p className="text-[length:var(--conversation-caption-font-size)] text-(--ui-text-tertiary)">+ No installed themes match "{query.trim()}".+ </p>+ ) : null+ ) : (+ <div className="grid gap-3 sm:grid-cols-2 xl:grid-cols-3">+ {filteredThemes.map(theme => {+ const active = themeName === theme.name+ const removable = isUserTheme(theme.name)++ return (+ <div className="group relative" key={theme.name}><button- aria-label={a.removeTheme}- className="absolute right-1.5 top-1.5 grid size-6 place-items-center rounded-md bg-(--ui-bg-elevated)/80 text-(--ui-text-tertiary) opacity-0 backdrop-blur-sm transition hover:text-(--ui-red) focus-visible:opacity-100 group-hover:opacity-100"+ className={cn('w-full p-2 text-left', selectableCardClass({ active, prominent: true }))}onClick={() => {triggerHaptic('crisp')- removeUserTheme(theme.name)-- // Re-normalize off the now-missing skin → default.- if (active) {- setTheme(theme.name)- }+ setTheme(theme.name)}}type="button">- <Trash2 className="size-3.5" />+ <ThemePreview mode={resolvedMode} name={theme.name} />+ <div className="mt-3 px-1">+ <div className="truncate text-[length:var(--conversation-text-font-size)] font-medium">+ {theme.label}+ </div>+ <div className="mt-0.5 line-clamp-2 text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">+ {theme.description}+ </div>+ </div></button>- )}- </div>- )- })}- </div>+ {removable && (+ <button+ aria-label={a.removeTheme}+ className="absolute right-1.5 top-1.5 grid size-6 place-items-center rounded-md bg-(--ui-bg-elevated)/80 text-(--ui-text-tertiary) opacity-0 backdrop-blur-sm transition hover:text-(--ui-red) focus-visible:opacity-100 group-hover:opacity-100"+ onClick={() => {+ triggerHaptic('crisp')+ removeUserTheme(theme.name)++ // Re-normalize off the now-missing skin → default.+ if (active) {+ setTheme(theme.name)+ }+ }}+ type="button"+ >+ <Trash2 className="size-3.5" />+ </button>+ )}+ </div>+ )+ })}+ </div>+ )}+ <MarketplaceThemeResults installs={installs} onInstalled={name => setTheme(name)} query={query} />+ </div>+ {showProfileNote && (+ <p className="mt-3 text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">+ {a.themeProfileNote(activeProfileName)}+ </p>)}- <MarketplaceThemeResults installs={installs} onInstalled={name => setTheme(name)} query={query} />+ </>+ }+ description={a.themeDesc}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.theme)}+ title={+ <div className="flex items-center justify-between gap-3">+ <span>{a.themeTitle}</span>+ <SegmentedControl+ onChange={id => {+ triggerHaptic('crisp')+ setMode(id)+ }}+ options={modeOptions}+ value={mode}+ /></div>- {showProfileNote && (- <p className="mt-3 text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">- {a.themeProfileNote(activeProfileName)}- </p>- )}- </>- }- description={a.themeDesc}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.theme)}- title={- <div className="flex items-center justify-between gap-3">- <span>{a.themeTitle}</span>+ }+ wide+ />+ )}++ {show('typography') && (+ <>+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setZoomPercent(Number(id))+ }}+ options={uiScaleOptions}+ value={matchedScalePreset ?? ('' as UiScalePreset)}+ />+ }+ description={a.uiScaleDesc(zoomPercent)}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.uiScale)}+ title={a.uiScaleTitle}+ />++ <div id={appearanceSettingElementId('desktop.font_family')}>+ <ChatFontSetting />+ </div>++ <div id={appearanceSettingElementId('terminal.font_family')}>+ <TerminalFontSetting />+ </div>+ </>+ )}++ {show('window-layout') && (+ <ListRow+ action={<SegmentedControlonChange={id => {- triggerHaptic('crisp')- setMode(id)+ triggerHaptic('selection')+ setSessionListDensity(id)}}- options={modeOptions}- value={mode}+ options={sessionDensityOptions}+ value={sessionListDensity}/>- </div>- }- wide- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setZoomPercent(Number(id))- }}- options={uiScaleOptions}- value={matchedScalePreset ?? ('' as UiScalePreset)}- />- }- description={a.uiScaleDesc(zoomPercent)}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.uiScale)}- title={a.uiScaleTitle}- />-- <ChatFontSetting />-- <TerminalFontSetting />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setSessionListDensity(id)- }}- options={sessionDensityOptions}- value={sessionListDensity}- />- }- description={a.sessionDensityDesc}- title={a.sessionDensityTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setTabStripDefault(id)- }}- options={tabStripOptions}- value={tabStripDefault}- />- }- description={a.tabStripDesc}- title={a.tabStripTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setTitlebarAppActionsSide(id)- }}- options={appActionsOptions}- value={titlebarAppActionsSide}- />- }- description={a.appActionsDesc}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.appActions)}- title={a.appActionsTitle}- />+ }+ description={a.sessionDensityDesc}+ title={a.sessionDensityTitle}+ />+ )}++ {show('window-layout') && (+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setTabStripDefault(id)+ }}+ options={tabStripOptions}+ value={tabStripDefault}+ />+ }+ description={a.tabStripDesc}+ title={a.tabStripTitle}+ />+ )}++ {show('window-layout') && (+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setTitlebarAppActionsSide(id)+ }}+ options={appActionsOptions}+ value={titlebarAppActionsSide}+ />+ }+ description={a.appActionsDesc}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.appActions)}+ title={a.appActionsTitle}+ />+ )}{/* Linux has neither half of this setting (see TRANSLUCENCY_SUPPORTED),so the row is absent there rather than offering a dead lever. */}- {TRANSLUCENCY_SUPPORTED && (+ {show('window-layout') && TRANSLUCENCY_SUPPORTED && (<ListRowaction={<div@@ -779,266 +810,294 @@ export function AppearanceSettings() {/>)}- <ListRow- action={- // Same peek as the window lever: the bubble being tuned sits- // behind this overlay, so the overlay ghosts while the hand is- // on the slider.- <div className="flex items-center gap-3" data-translucency-peek-scope="">- <TranslucencySlider- label={a.userBubbleTitle}- onChange={setUserBubbleTransparency}- value={userBubbleTransparency}+ {show('chat-display') && (+ <ListRow+ action={+ // Same peek as the window lever: the bubble being tuned sits+ // behind this overlay, so the overlay ghosts while the hand is+ // on the slider.+ <div className="flex items-center gap-3" data-translucency-peek-scope="">+ <TranslucencySlider+ label={a.userBubbleTitle}+ onChange={setUserBubbleTransparency}+ value={userBubbleTransparency}+ />+ </div>+ }+ description={a.userBubbleDesc}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.userBubble)}+ title={a.userBubbleTitle}+ />+ )}++ {show('window-layout') && (+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setBackdrop(id === 'on')+ }}+ options={[+ { id: 'off', label: t.common.off },+ { id: 'on', label: t.common.on }+ ]}+ value={backdrop ? 'on' : 'off'}+ />+ }+ description={a.backdropDesc}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.backdrop)}+ title={a.backdropTitle}+ />+ )}++ {show('chat-display') && (+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setHideThreadTimeline(id === 'on')+ }}+ options={[+ { id: 'off', label: t.common.off },+ { id: 'on', label: t.common.on }+ ]}+ value={hideThreadTimeline ? 'on' : 'off'}/>- </div>- }- description={a.userBubbleDesc}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.userBubble)}- title={a.userBubbleTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setBackdrop(id === 'on')- }}- options={[- { id: 'off', label: t.common.off },- { id: 'on', label: t.common.on }- ]}- value={backdrop ? 'on' : 'off'}- />- }- description={a.backdropDesc}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.backdrop)}- title={a.backdropTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setIntroSplash(id === 'on')- }}- options={[- { id: 'off', label: t.common.off },- { id: 'on', label: t.common.on }- ]}- value={introSplash ? 'on' : 'off'}- />- }- description={a.introSplashDesc}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.introSplash)}- title={a.introSplashTitle}- />-- <ToggleRow- checked={composerPopoutGesturesEnabled}- description={a.composerPopoutDesc}- label={a.composerPopoutTitle}- onChange={setComposerPopoutGesturesEnabled}- />-- <ResumeLastSessionSetting />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setReactionsEnabled(id === 'on')- }}- options={[- { id: 'off', label: t.common.off },- { id: 'on', label: t.common.on }- ]}- value={reactionsEnabled ? 'on' : 'off'}- />- }- description={a.reactionsDesc}- title={a.reactionsTitle}- />-- <ListRow- action={- <div className="flex flex-col items-end gap-1.5">+ }+ description={a.hideThreadTimelineDesc}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.hideThreadTimeline)}+ title={a.hideThreadTimelineTitle}+ />+ )}++ {show('general') && (+ <ListRow+ action={<SegmentedControlonChange={id => {triggerHaptic('selection')- setTipsEnabled(id === 'on')+ setIntroSplash(id === 'on')}}options={[{ id: 'off', label: t.common.off },{ id: 'on', label: t.common.on }]}- value={tipsEnabled ? 'on' : 'off'}+ value={introSplash ? 'on' : 'off'}/>- {/* A tip shows once (✕ or timer), so this is the only way to a- second lap. It appears once there is something to bring back. */}- {spentTips > 0 && (- <Button- onClick={() => {+ }+ description={a.introSplashDesc}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.introSplash)}+ title={a.introSplashTitle}+ />+ )}++ {show('window-layout') && (+ <ToggleRow+ checked={composerPopoutGesturesEnabled}+ description={a.composerPopoutDesc}+ label={a.composerPopoutTitle}+ onChange={setComposerPopoutGesturesEnabled}+ />+ )}++ {show('general') && <ResumeLastSessionSetting />}++ {show('chat-display') && (+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setReactionsEnabled(id === 'on')+ }}+ options={[+ { id: 'off', label: t.common.off },+ { id: 'on', label: t.common.on }+ ]}+ value={reactionsEnabled ? 'on' : 'off'}+ />+ }+ description={a.reactionsDesc}+ title={a.reactionsTitle}+ />+ )}++ {show('general') && (+ <ListRow+ action={+ <div className="flex flex-col items-end gap-1.5">+ <SegmentedControl+ onChange={id => {triggerHaptic('selection')- resetTips()+ setTipsEnabled(id === 'on')}}- size="inline"- variant="text"- >- {a.tipsReset(spentTips)}- </Button>- )}- </div>- }- description={a.tipsDesc}- title={a.tipsTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setToursEnabled(id === 'on')- }}- options={[- { id: 'off', label: t.common.off },- { id: 'on', label: t.common.on }- ]}- value={toursEnabled ? 'on' : 'off'}- />- }- description={a.toursDesc}- title={a.toursTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setVibeHeartsEnabled(id === 'on')- }}- options={[- { id: 'off', label: t.common.off },- { id: 'on', label: t.common.on }- ]}- value={vibeHeartsEnabled ? 'on' : 'off'}- />- }- description={a.vibeHeartsDesc}- title={a.vibeHeartsTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setToolViewMode(id)- }}- options={toolOptions}- value={toolViewMode}- />- }- description={a.toolViewDesc}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.toolView)}- title={a.toolViewTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setHideCodeDiffs(id === 'on')- }}- options={[- { id: 'off', label: t.common.off },- { id: 'on', label: t.common.on }- ]}- value={hideCodeDiffs ? 'on' : 'off'}- />- }- description={a.hideCodeDiffsDesc}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.hideCodeDiffs)}- title={a.hideCodeDiffsTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setHideThreadTimeline(id === 'on')- }}- options={[- { id: 'off', label: t.common.off },- { id: 'on', label: t.common.on }- ]}- value={hideThreadTimeline ? 'on' : 'off'}- />- }- description={a.hideThreadTimelineDesc}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.hideThreadTimeline)}- title={a.hideThreadTimelineTitle}- />-- <ListRow- action={- <SegmentedControl- onChange={id => {- triggerHaptic('selection')- setReasoningCollapsedByDefault(id === 'on')- }}- options={[- { id: 'off', label: t.common.off },- { id: 'on', label: t.common.on }- ]}- value={reasoningCollapsedByDefault ? 'on' : 'off'}- />- }- description={a.reasoningCollapsedDesc}- title={a.reasoningCollapsedTitle}- />-- <ListRow- action={- <div className="flex flex-col items-end gap-1.5">+ options={[+ { id: 'off', label: t.common.off },+ { id: 'on', label: t.common.on }+ ]}+ value={tipsEnabled ? 'on' : 'off'}+ />+ {/* A tip shows once (✕ or timer), so this is the only way to a+ second lap. It appears once there is something to bring back. */}+ {spentTips > 0 && (+ <Button+ onClick={() => {+ triggerHaptic('selection')+ resetTips()+ }}+ size="inline"+ variant="text"+ >+ {a.tipsReset(spentTips)}+ </Button>+ )}+ </div>+ }+ description={a.tipsDesc}+ title={a.tipsTitle}+ />+ )}++ {show('general') && (+ <ListRow+ action={<SegmentedControlonChange={id => {triggerHaptic('selection')- setEmbedMode(id)+ setToursEnabled(id === 'on')}}- options={embedOptions}- value={embedMode}+ options={[+ { id: 'off', label: t.common.off },+ { id: 'on', label: t.common.on }+ ]}+ value={toursEnabled ? 'on' : 'off'}+ />+ }+ description={a.toursDesc}+ title={a.toursTitle}+ />+ )}++ {show('chat-display') && (+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setVibeHeartsEnabled(id === 'on')+ }}+ options={[+ { id: 'off', label: t.common.off },+ { id: 'on', label: t.common.on }+ ]}+ value={vibeHeartsEnabled ? 'on' : 'off'}/>- {embedAllowed.length > 0 && (- <Button- onClick={() => {+ }+ description={a.vibeHeartsDesc}+ title={a.vibeHeartsTitle}+ />+ )}++ {show('chat-display') && (+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setToolViewMode(id)+ }}+ options={toolOptions}+ value={toolViewMode}+ />+ }+ description={a.toolViewDesc}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.toolView)}+ title={a.toolViewTitle}+ />+ )}++ {show('chat-display') && (+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setHideCodeDiffs(id === 'on')+ }}+ options={[+ { id: 'off', label: t.common.off },+ { id: 'on', label: t.common.on }+ ]}+ value={hideCodeDiffs ? 'on' : 'off'}+ />+ }+ description={a.hideCodeDiffsDesc}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.hideCodeDiffs)}+ title={a.hideCodeDiffsTitle}+ />+ )}++ {show('chat-display') && (+ <ListRow+ action={+ <SegmentedControl+ onChange={id => {+ triggerHaptic('selection')+ setReasoningCollapsedByDefault(id === 'on')+ }}+ options={[+ { id: 'off', label: t.common.off },+ { id: 'on', label: t.common.on }+ ]}+ value={reasoningCollapsedByDefault ? 'on' : 'off'}+ />+ }+ description={a.reasoningCollapsedDesc}+ title={a.reasoningCollapsedTitle}+ />+ )}++ {show('chat-display') && (+ <ListRow+ action={+ <div className="flex flex-col items-end gap-1.5">+ <SegmentedControl+ onChange={id => {triggerHaptic('selection')- clearEmbedAllowed()+ setEmbedMode(id)}}- size="inline"- variant="text"- >- {a.embedsReset(embedAllowed.length)}- </Button>- )}- </div>- }- description={a.embedsDesc}- id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.embeds)}- title={a.embedsTitle}- />+ options={embedOptions}+ value={embedMode}+ />+ {embedAllowed.length > 0 && (+ <Button+ onClick={() => {+ triggerHaptic('selection')+ clearEmbedAllowed()+ }}+ size="inline"+ variant="text"+ >+ {a.embedsReset(embedAllowed.length)}+ </Button>+ )}+ </div>+ }+ description={a.embedsDesc}+ id={appearanceSettingElementId(APPEARANCE_SETTING_IDS.embeds)}+ title={a.embedsTitle}+ />+ )}</div></div>- <div className="mt-6">- <PetSettings />- </div>+ {show('pet') && (+ <div className={subpage === undefined ? 'mt-6' : undefined} id={appearanceSettingElementId('appearance.pet')}>+ <PetSettings />+ </div>+ )}</SettingsContent>)}diff --git a/apps/desktop/src/app/settings/appearance-subpages.ts b/apps/desktop/src/app/settings/appearance-subpages.tsnew file mode 100644index 00000000000..c3b980fcc2f--- /dev/null+++ b/apps/desktop/src/app/settings/appearance-subpages.ts@@ -0,0 +1,33 @@+export const APPEARANCE_SUBPAGES = [+ { id: 'general', labelKey: 'appearanceGeneral' },+ { id: 'theme', labelKey: 'appearanceTheme' },+ { id: 'typography', labelKey: 'appearanceTypography' },+ { id: 'window-layout', labelKey: 'appearanceWindowLayout' },+ { id: 'chat-display', labelKey: 'appearanceChatDisplay' },+ { id: 'pet', labelKey: 'appearancePet' }+] as const++export type AppearanceSubpageId = (typeof APPEARANCE_SUBPAGES)[number]['id']++// Keep routing metadata independent of settings-search, which consumes it.+const SETTING_SUBPAGES: Readonly<Record<string, AppearanceSubpageId>> = {+ 'appearance.app-actions': 'window-layout',+ 'appearance.backdrop': 'window-layout',+ 'appearance.embeds': 'chat-display',+ 'appearance.hide-code-diffs': 'chat-display',+ 'appearance.hide-thread-timeline': 'chat-display',+ 'appearance.intro-splash': 'general',+ 'appearance.language': 'general',+ 'appearance.pet': 'pet',+ 'appearance.theme': 'theme',+ 'appearance.tool-view': 'chat-display',+ 'appearance.translucency': 'window-layout',+ 'appearance.ui-scale': 'typography',+ 'appearance.user-bubble': 'chat-display',+ 'desktop.font_family': 'typography',+ 'terminal.font_family': 'typography'+}++export function appearanceSubpageForSetting(setting: string): AppearanceSubpageId | undefined {+ return Object.hasOwn(SETTING_SUBPAGES, setting) ? SETTING_SUBPAGES[setting] : undefined+}diff --git a/apps/desktop/src/app/settings/billing/index.tsx b/apps/desktop/src/app/settings/billing/index.tsxindex 37674e01cc6..1018bf2d7e8 100644--- a/apps/desktop/src/app/settings/billing/index.tsx+++ b/apps/desktop/src/app/settings/billing/index.tsx@@ -7,6 +7,7 @@ import { Progress } from '@/components/ui/progress'import { SegmentedControl } from '@/components/ui/segmented-control'import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select'import { Skeleton } from '@/components/ui/skeleton'+import { useI18n } from '@/i18n'import { BarChart3, CreditCard, ExternalLink, Package, Wrench } from '@/lib/icons'import { cn } from '@/lib/utils'@@ -44,8 +45,8 @@ import { useStepUpFlow } from './use-step-up'// `bview` mirrors the settings pview/kview sub-view pattern (deep-linkable, replace// navigation). `overview` is the default landing; `plans` is the in-app catalog.-const BILLING_VIEWS = ['overview', 'plans'] as const-type BillingSubView = (typeof BILLING_VIEWS)[number]+export const BILLING_VIEWS = ['overview', 'plans'] as const+export type BillingSubView = (typeof BILLING_VIEWS)[number]const FEATURE_BILLING_INVOICES = false@@ -414,16 +415,17 @@ function BillingHeader({fixtureName?: BillingFixtureSelectiononFixtureChange?: (value: BillingFixtureSelection) => void}) {+ const { t } = useI18n()+return (- <div className="mb-2.5 flex items-center justify-between gap-3 pt-2 text-[length:var(--conversation-text-font-size)] font-medium">- <div className="flex min-w-0 items-center gap-2">- <BarChart3 className="size-4 shrink-0 text-muted-foreground" />- <span>Billing</span>- </div>- {import.meta.env.DEV && fixtureName && onFixtureChange ? (+ <SectionHeading+ aside={import.meta.env.DEV && fixtureName && onFixtureChange ? (<BillingFixtureSelect onValueChange={onFixtureChange} value={fixtureName} />- ) : null}- </div>+ ) : undefined}+ icon={BarChart3}+ page+ title={t.settings.nav.billing}+ />)}diff --git a/apps/desktop/src/app/settings/config-settings.tsx b/apps/desktop/src/app/settings/config-settings.tsxindex ae095564b25..1a9eee2ae1b 100644--- a/apps/desktop/src/app/settings/config-settings.tsx+++ b/apps/desktop/src/app/settings/config-settings.tsx@@ -1,6 +1,6 @@import { useStore } from '@nanostores/react'import { useQuery } from '@tanstack/react-query'-import type { ChangeEvent } from 'react'+import type { ChangeEvent, ReactNode } from 'react'import { useEffect, useMemo, useRef, useState } from 'react'import { useSearchParams } from 'react-router'@@ -33,6 +33,7 @@ import { useOnProfileSwitch } from '../hooks/use-on-profile-switch'import { PanelEmpty } from '../overlays/panel'import { ConfigField } from './config-field'+import { configSubpageForField } from './config-subpages'import {clearsEnabledToolsets,diffConfig,@@ -53,6 +54,7 @@ import { QuickEntrySettings } from './quick-entry-settings'export function ConfigSettings({activeSectionId,+ subpage,onConfigSaved,onMainModelChanged,importInputRef@@ -71,12 +73,15 @@ export function ConfigSettings({onConfigSaved={onConfigSaved}onMainModelChanged={onMainModelChanged}scopeProfile={scopeProfile}+ subpage={subpage}/>)}interface ConfigSettingsProps {activeSectionId: string+ /** Undefined preserves the full section for existing embedded consumers. */+ subpage?: stringonConfigSaved?: () => voidonMainModelChanged?: (provider: string, model: string) => voidimportInputRef: React.RefObject<HTMLInputElement | null>@@ -84,6 +89,7 @@ interface ConfigSettingsProps {function ConfigSettingsInner({activeSectionId,+ subpage,onConfigSaved,onMainModelChanged,importInputRef,@@ -274,7 +280,15 @@ function ConfigSettingsInner({return sectionFieldEntries(schema, config)}, [schema, config])- const fields = sectionFields.get(activeSectionId) ?? []+ const fields = (sectionFields.get(activeSectionId) ?? []).filter(+ ([key]) => subpage === undefined || configSubpageForField(activeSectionId, key) === subpage+ )++ const showModelSettings =+ activeSectionId === 'model' && (subpage === undefined || ['main', 'auxiliary', 'moa'].includes(subpage))++ const showDesktopSettings = activeSectionId === 'advanced' && (subpage === undefined || subpage === 'desktop')+ const showAttachments = activeSectionId === 'chat' && (subpage === undefined || subpage === 'attachments')// Deep-link target from the command palette (?field=<key>): scroll the row// into view and flash it, then drop the param so it doesn't re-fire.@@ -314,7 +328,7 @@ function ConfigSettingsInner({)return () => window.clearTimeout(timeout)- }, [config, schema, setSearchParams, targetField])+ }, [activeSectionId, config, schema, setSearchParams, subpage, targetField])function handleImport(e: ChangeEvent<HTMLInputElement>) {const file = e.target.files?.[0]@@ -338,6 +352,31 @@ function ConfigSettingsInner({e.target.value = ''}+ // Keep the model controller and pending MoA saves at a stable position when+ // selecting siblings or returning to the first page through the parent.+ const renderPage = (children: ReactNode) => (+ <SettingsContent>+ <SettingsProfileScope className="mb-5" />+ {activeSectionId === 'model' && (+ <div className={showModelSettings ? 'mb-6' : undefined}>+ <ModelSettings+ onMainModelChanged={onMainModelChanged}+ scopeProfile={scopeProfile}+ subpage={subpage}+ />+ </div>+ )}+ {children}+ <input+ accept=".json,application/json"+ className="hidden"+ onChange={handleImport}+ ref={importInputRef}+ type="file"+ />+ </SettingsContent>+ )+if (!config || !schema) {// A failed config/schema fetch must surface a retry, not spin forever.if ((configLoadFailed && !config) || (schemaFailed && !schema)) {@@ -364,12 +403,12 @@ function ConfigSettingsInner({// Every section keeps its shape via a skeleton; model gets its bespoke one// (its catalog fetch is the slow part), the rest the shared field rhythm.- if (activeSectionId === 'model') {+ if (showModelSettings) {return (<SettingsContent><SettingsProfileScope className="mb-5" /><div className="mb-6">- <ModelSettingsSkeleton />+ <ModelSettingsSkeleton subpage={subpage} /></div></SettingsContent>)@@ -380,20 +419,16 @@ function ConfigSettingsInner({const visibleFields = activeSectionId === 'voice' ? fields.filter(([key]) => voiceFieldVisible(key, config)) : fields- return (- <SettingsContent>- {/* Which profile's config.yaml this page edits — shared across every- config-backed settings page (and hidden for single-profile users). */}- <SettingsProfileScope className="mb-5" />- {activeSectionId === 'model' && (- <div className="mb-6">- <ModelSettings onMainModelChanged={onMainModelChanged} scopeProfile={scopeProfile} />- </div>- )}+ const showEmptyState =+ visibleFields.length === 0 &&+ (subpage === undefined ? activeSectionId !== 'chat' : !showModelSettings && !showDesktopSettings && !showAttachments)++ return renderPage(+ <>{/* Device-local desktop prefs (not config.yaml) — they live here sincekeeping the machine awake and the global Quick Entry chord are bothpower-user, this-computer-only knobs. */}- {activeSectionId === 'advanced' && (+ {showDesktopSettings && (<><ToggleRowchecked={keepAwake}@@ -414,8 +449,8 @@ function ConfigSettingsInner({{/* Device-local attach/preview byte cap (main-process IPC guard). Chat iswhere image-attachment behavior already lives, so this sits above theschema fields for that section. */}- {activeSectionId === 'chat' ? <AttachmentSizeSetting /> : null}- {visibleFields.length === 0 && activeSectionId !== 'chat' ? (+ {showAttachments ? <AttachmentSizeSetting /> : null}+ {showEmptyState ? (<EmptyState description={c.emptyDesc} title={c.emptyTitle} />) : visibleFields.length === 0 ? null : (<div className="grid gap-1">@@ -449,14 +484,7 @@ function ConfigSettingsInner({))}</div>)}- <input- accept=".json,application/json"- className="hidden"- onChange={handleImport}- ref={importInputRef}- type="file"- />- </SettingsContent>+ </>)}diff --git a/apps/desktop/src/app/settings/config-subpages.ts b/apps/desktop/src/app/settings/config-subpages.tsnew file mode 100644index 00000000000..d3bc519aea1--- /dev/null+++ b/apps/desktop/src/app/settings/config-subpages.ts@@ -0,0 +1,108 @@+interface ConfigSubpageDefinition {+ id: string+ labelKey: string+ fields?: string[]+ prefixes?: string[]+}++// Shared by the page filter and search routing. Match field names, not the+// backend schema: sectionFieldEntries also exposes config-present fields whose+// schema is inferred at runtime. Embedded model and device-local controls use+// these same page ids in ConfigSettings.+const CONFIG_SUBPAGE_DEFINITIONS: Record<string, ConfigSubpageDefinition[]> = {+ model: [+ {+ id: 'main',+ labelKey: 'modelMain',+ fields: ['model', 'model_context_length', 'agent.reasoning_effort', 'agent.service_tier'],+ prefixes: ['model.']+ },+ { id: 'fallbacks', labelKey: 'modelFallbacks', fields: ['fallback_providers'] },+ { id: 'auxiliary', labelKey: 'modelAuxiliary', prefixes: ['auxiliary.'] },+ { id: 'moa', labelKey: 'modelMoa', prefixes: ['moa.'] }+ ],+ chat: [+ {+ id: 'behavior',+ labelKey: 'chatBehavior',+ fields: ['display.personality', 'timezone', 'display.show_reasoning']+ },+ { id: 'attachments', labelKey: 'chatAttachments', fields: ['agent.image_input_mode'] }+ ],+ workspace: [+ {+ id: 'projects',+ labelKey: 'workspaceProjects',+ fields: ['terminal.cwd'],+ prefixes: ['desktop.repo_scan_']+ },+ {+ id: 'shell',+ labelKey: 'workspaceShell',+ fields: ['terminal.persistent_shell', 'terminal.env_passthrough']+ },+ {+ id: 'files',+ labelKey: 'workspaceFiles',+ fields: ['code_execution.mode', 'file_read_max_chars']+ }+ ],+ safety: [+ { id: 'approvals', labelKey: 'safetyApprovals', fields: ['command_allowlist'], prefixes: ['approvals.'] },+ { id: 'privacy', labelKey: 'safetyPrivacy', prefixes: ['security.'] },+ { id: 'checkpoints', labelKey: 'safetyCheckpoints', prefixes: ['checkpoints.'] }+ ],+ browser: [+ { id: 'profile', labelKey: 'browserProfile', fields: ['browser.use_real_profile'] },+ {+ id: 'network',+ labelKey: 'browserNetwork',+ fields: ['browser.allow_private_urls', 'browser.auto_local_for_private_urls']+ }+ ],+ memory: [+ { id: 'persistent', labelKey: 'memoryPersistent', prefixes: ['memory.'] },+ {+ id: 'context',+ labelKey: 'memoryContext',+ prefixes: ['context.', 'compression.', 'auxiliary.compression.']+ }+ ],+ voice: [+ {+ id: 'conversation',+ labelKey: 'voiceConversation',+ fields: ['voice.voice_chat_mode', 'voice.record_key', 'voice.max_recording_seconds', 'voice.client_direct'],+ prefixes: ['voice.gpt_live.']+ },+ { id: 'transcription', labelKey: 'voiceTranscription', prefixes: ['stt.'] },+ { id: 'speech', labelKey: 'voiceSpeech', fields: ['voice.auto_tts'], prefixes: ['tts.'] }+ ],+ advanced: [+ { id: 'desktop', labelKey: 'advancedDesktop', prefixes: ['updates.'] },+ {+ id: 'runtime',+ labelKey: 'advancedRuntime',+ fields: ['agent.max_turns', 'agent.api_max_retries', 'agent.service_tier']+ },+ { id: 'tools', labelKey: 'advancedTools', fields: ['toolsets', 'agent.tool_use_enforcement'] },+ { id: 'terminal', labelKey: 'advancedTerminal', prefixes: ['terminal.'] },+ { id: 'delegation', labelKey: 'advancedDelegation', prefixes: ['delegation.'] },+ { id: 'output', labelKey: 'advancedOutput', prefixes: ['tool_output.', 'checkpoints.'] }+ ]+}++/** Ordered child pages; labelKey indexes t.settings.subpages. */+export const CONFIG_SUBPAGES: Record<string, { id: string; labelKey: string }[]> = Object.fromEntries(+ Object.entries(CONFIG_SUBPAGE_DEFINITIONS).map(([sectionId, pages]) => [+ sectionId,+ pages.map(({ id, labelKey }) => ({ id, labelKey }))+ ])+)++/** Resolve a schema/config field to the same child page that renders it. */+export function configSubpageForField(sectionId: string, field: string): string | undefined {+ return CONFIG_SUBPAGE_DEFINITIONS[sectionId]?.find(+ page => page.fields?.includes(field) || page.prefixes?.some(prefix => field.startsWith(prefix))+ )?.id+}diff --git a/apps/desktop/src/app/settings/connections-registry.tsx b/apps/desktop/src/app/settings/connections-registry.tsxindex b6a32ff8fd2..29660a02f5d 100644--- a/apps/desktop/src/app/settings/connections-registry.tsx+++ b/apps/desktop/src/app/settings/connections-registry.tsx@@ -1,5 +1,5 @@import { useStore } from '@nanostores/react'-import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'+import { useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'import { Button } from '@/components/ui/button'import { ConfirmDialog } from '@/components/ui/confirm-dialog'@@ -38,7 +38,7 @@ import { $activeConnectionId, setConnectionsRegistry } from '@/store/connectionsimport { refreshFleetRoster } from '@/store/fleet-roster'import { notify, notifyError } from '@/store/notifications'-import { EmptyState, ListRow, Pill, SectionHeading, ToggleRow } from './primitives'+import { EmptyState, ListRow, Pill, SectionHeading, SettingsBreadcrumbContext, ToggleRow } from './primitives'const KIND_ICONS: Record<DesktopConnectionKind, typeof Globe> = {cloud: Cloud,@@ -239,6 +239,7 @@ function scrollableAncestor(element: HTMLElement): HTMLElement | null {* switchover UX is the connection-mode controls above this section.*/export function ConnectionsRegistrySection() {+ const hasBreadcrumb = useContext(SettingsBreadcrumbContext)const { t } = useI18n()const s = t.settings.connectionsconst activeConnectionId = useStore($activeConnectionId)@@ -652,8 +653,8 @@ export function ConnectionsRegistrySection() {}return (- <div className="mt-8 border-t border-border/60 pt-6">- <SectionHeading icon={Globe} title={s.title} />+ <div className={hasBreadcrumb ? undefined : 'mt-8 border-t border-border/60 pt-6'}>+ <SectionHeading icon={Globe} page title={s.title} /><p className="mb-1 text-[length:var(--conversation-caption-font-size)] text-(--ui-text-tertiary)">{s.intro}</p>{/* Source selection lives in Sessions. Primary is the registry fallback,not an immediate workspace switch. */}diff --git a/apps/desktop/src/app/settings/custom-endpoints-settings.tsx b/apps/desktop/src/app/settings/custom-endpoints-settings.tsxindex 8aef994b96b..0ee4a247fc2 100644--- a/apps/desktop/src/app/settings/custom-endpoints-settings.tsx+++ b/apps/desktop/src/app/settings/custom-endpoints-settings.tsx@@ -323,7 +323,7 @@ export function CustomEndpointsSettings({ onConfigSaved, onMainModelChanged }: C<ActiveProfileNote className="mb-5" /><div className="space-y-6"><section>- <SectionHeading icon={Globe} meta={`${endpoints.length}`} title={t.settings.customEndpoints.title} />+ <SectionHeading icon={Globe} meta={`${endpoints.length}`} page title={t.settings.customEndpoints.title} /><div className="divide-y divide-border/40 rounded-md border border-border/50">{endpoints.length ? (endpoints.map(endpoint => (diff --git a/apps/desktop/src/app/settings/gateway-settings.tsx b/apps/desktop/src/app/settings/gateway-settings.tsxindex 90155bd6596..5bbb76a39d3 100644--- a/apps/desktop/src/app/settings/gateway-settings.tsx+++ b/apps/desktop/src/app/settings/gateway-settings.tsx@@ -37,6 +37,7 @@ import {refreshConnectionsRegistry,selectConnection} from '@/store/connections'+import { managedUpdatesSupported } from '@/store/managed-updates'import { notify, notifyError, readableError } from '@/store/notifications'import { cloudTeamChanged, reconnectMovedCloudAgent } from './cloud-team-change'@@ -161,11 +162,90 @@ function ModeCard({)}+interface GatewaySettingsProps {+ embedded?: boolean+ subpage?: string+}++export function GatewaySettings({ embedded = false, subpage }: GatewaySettingsProps = {}) {+ // Recovery always keeps the complete connection form, regardless of a+ // settings destination. Other tasks never mount that form or its probes.+ if (!embedded && subpage === 'devices') {+ return (+ <SettingsContent>+ <ConnectionsRegistrySection />+ </SettingsContent>+ )+ }++ if (!embedded && subpage === 'managed-updates') {+ return <GatewayManagedUpdates />+ }++ return <GatewayConnectionSettings embedded={embedded} standalone={subpage !== undefined} />+}++function GatewayManagedUpdates() {+ const { t } = useI18n()+ const registry = useStore($connectionsRegistry)+ const [loading, setLoading] = useState(true)+ const [failed, setFailed] = useState(false)+ const supported = managedUpdatesSupported()++ useEffect(() => {+ if (!supported) {+ return+ }++ let active = true+ void refreshConnectionsRegistry()+ .catch(() => {+ if (active) {+ setFailed(true)+ }+ })+ .finally(() => {+ if (active) {+ setLoading(false)+ }+ })++ return () => {+ active = false+ }+ }, [supported])++ if (supported && loading) {+ return <SettingsSkeleton sections={[{ heading: true, rows: 3 }]} />+ }++ const hasSsh = registry?.connections.some(connection => connection.kind === 'ssh')++ return (+ <SettingsContent>+ {supported && !failed && hasSsh ? (+ <ManagedUpdatesSection />+ ) : (+ <EmptyState+ description={+ !supported+ ? t.settings.subpages.gatewayManagedUpdatesUnavailable+ : failed+ ? t.settings.gateway.failedLoad+ : t.settings.subpages.gatewayManagedUpdatesEmpty+ }+ title={t.settings.managedUpdates.title}+ />+ )}+ </SettingsContent>+ )+}+// `embedded` trims the page chrome for reuse inside the boot-failure recovery// card: the outer title/intro, the "Save for next restart" action, and the// Diagnostics row are redundant there (the card owns its header + a single// reconnect action), so only the connection controls render.-export function GatewaySettings({ embedded = false }: { embedded?: boolean } = {}) {+function GatewayConnectionSettings({ embedded, standalone }: { embedded: boolean; standalone: boolean }) {const { t } = useI18n()const g = t.settings.gatewayconst [loading, setLoading] = useState(true)@@ -1148,7 +1228,7 @@ export function GatewaySettings({ embedded = false }: { embedded?: boolean } = {return (<SettingsContent bare={embedded}>- {embedded ? null : (+ {embedded || standalone ? null : (<div className="mb-5"><div className="flex items-center gap-2 text-[length:var(--conversation-text-font-size)] font-medium"><Globe className="size-4 text-muted-foreground" />@@ -1669,10 +1749,9 @@ export function GatewaySettings({ embedded = false }: { embedded?: boolean } = {</div>)}- {/* Unified Gateways page: the full connections registry (add/edit/delete- named agent sources) lives on this page now, below the window- connection controls. Hidden in the embedded (boot-recovery) form. */}- {embedded ? null : (+ {/* Preserve the full legacy page outside subpage navigation, without+ mounting registry editors in connection-only or recovery views. */}+ {embedded || standalone ? null : (<><ConnectionsRegistrySection />{/* Per-connection driver for the transactional managed SSH updatediff --git a/apps/desktop/src/app/settings/index.tsx b/apps/desktop/src/app/settings/index.tsxindex 3d2eb0b21c0..7a6a74c2fea 100644--- a/apps/desktop/src/app/settings/index.tsx+++ b/apps/desktop/src/app/settings/index.tsx@@ -1,6 +1,6 @@import { useStore } from '@nanostores/react'import { useCallback, useEffect, useMemo, useRef } from 'react'-import { useLocation, useNavigate } from 'react-router'+import { Navigate, useLocation, useNavigate } from 'react-router'import { codiconIcon } from '@/components/ui/codicon'import { KbdCombo } from '@/components/ui/kbd'@@ -44,7 +44,8 @@ import { OverlayView } from '../overlays/overlay-view'import { AboutSettings } from './about-settings'import { AppearanceSettings } from './appearance-settings'-import { BillingSettings } from './billing'+import { BILLING_VIEWS, BillingSettings, type BillingSubView } from './billing'+import { deriveBillingView, useBillingState, useSubscriptionState } from './billing/use-billing-state'import { ConfigSettings } from './config-settings'import { SECTIONS } from './constants'import { GatewaySettings } from './gateway-settings'@@ -52,8 +53,11 @@ import { KeybindSettings } from './keybind-settings'import { KEYS_VIEWS, KeysSettings, type KeysView } from './keys-settings'import { movedSettingsTabRedirect } from './moved-tabs'import { NotificationsSettings } from './notifications-settings'+import { SettingsBreadcrumbContext } from './primitives'import { PROVIDER_VIEWS, ProvidersSettings, type ProviderView } from './providers-settings'import { SessionsSettings } from './sessions-settings'+import { SettingsSubpageHeader } from './subpage-navigation'+import { resolveSettingsSubpage, settingsSubpageIcon, settingsSubpages } from './subpages'import type { SettingsPageProps, SettingsView as SettingsViewId } from './types'import { vaultOwnerKey, VaultSettings } from './vault-settings'@@ -91,7 +95,35 @@ export function SettingsView({ onClose, onConfigSaved, onMainModelChanged }: Set}}, [navigate, search])- const [activeView, setActiveView] = useRouteEnumParam('tab', SETTINGS_VIEWS, 'config:model' as SettingsViewId)+ const [activeView] = useRouteEnumParam('tab', SETTINGS_VIEWS, 'config:model' as SettingsViewId)+ const params = new URLSearchParams(search)+ const requestedSubpage = params.get('page')+ const subpage = resolveSettingsSubpage(activeView, params)+ const needsSubpageRedirect = Boolean(subpage && subpage !== requestedSubpage)+ const subpageSearch = new URLSearchParams(search)++ if (subpage) {+ subpageSearch.set('page', subpage)+ }++ const openSettingsPage = useCallback((view: SettingsViewId, page?: string) => {+ const next = new URLSearchParams(search)++ for (const key of ['page', 'field', 'setting', 'key', 'aux', 'session', 'kind', 'label', 'origin', 'pview', 'kview', 'bview']) {+ next.delete(key)+ }++ next.set('tab', view)+ const destination = page ?? settingsSubpages(view)[0]?.id++ if (destination) {+ next.set('page', destination)+ }++ navigate({ hash, pathname, search: `?${next}` }, { replace: true })+ }, [hash, navigate, pathname, search])++ const setActiveView = useCallback((view: SettingsViewId) => openSettingsPage(view), [openSettingsPage])// Connections merged into the unified Gateways page: land old// `?tab=connections` routes/bookmarks there instead of a dead entry.@@ -104,6 +136,11 @@ export function SettingsView({ onClose, onConfigSaved, onMainModelChanged }: Set// sub-view is deep-linkable and survives a refresh.const [providerView, setProviderView] = useRouteEnumParam<ProviderView>('pview', PROVIDER_VIEWS, 'accounts')const [keysView] = useRouteEnumParam<KeysView>('kview', KEYS_VIEWS, 'tools')+ const [billingView] = useRouteEnumParam<BillingSubView>('bview', BILLING_VIEWS, 'overview')+ const billingState = useBillingState()+ const subscriptionState = useSubscriptionState()+ const billingPresentation = deriveBillingView(billingState.data, subscriptionState.data)+ const canViewPlans = billingPresentation.status === 'normal' && Boolean(billingPresentation.plan?.action)// Jump to a section + its sub-view in one navigate. Two sequential setters// would each read the same stale `search` and the second would clobber the@@ -111,6 +148,11 @@ export function SettingsView({ onClose, onConfigSaved, onMainModelChanged }: Setconst openSubView = useCallback((tab: SettingsViewId, param: string, value: string, fallback: string) => {const params = new URLSearchParams(search)++ for (const key of ['page', 'field', 'setting', 'key', 'aux', 'session', 'kind', 'label', 'origin']) {+ params.delete(key)+ }+params.set('tab', tab)if (value === fallback) {@@ -171,7 +213,7 @@ export function SettingsView({ onClose, onConfigSaved, onMainModelChanged }: Set}const navGroups: OverlayNavGroup[] = useMemo(- () => [+ () => ([...SECTIONS.flatMap(s => {const view = `config:${s.id}` as SettingsViewId@@ -209,6 +251,22 @@ export function SettingsView({ onClose, onConfigSaved, onMainModelChanged }: Set},{active: activeView === 'billing',+ children: [+ {+ active: activeView === 'billing' && (billingView === 'overview' || !canViewPlans),+ icon: BarChart3,+ id: 'bview:overview',+ label: t.settings.subpages.billingOverview,+ onSelect: () => openSubView('billing', 'bview', 'overview', 'overview')+ },+ ...(canViewPlans ? [{+ active: activeView === 'billing' && billingView === 'plans',+ icon: BarChart3,+ id: 'bview:plans',+ label: t.settings.subpages.billingPlans,+ onSelect: () => openSubView('billing', 'bview', 'plans', 'overview')+ }] : [])+ ],icon: BarChart3,id: 'billing',label: t.settings.nav.billing,@@ -312,10 +370,27 @@ export function SettingsView({ onClose, onConfigSaved, onMainModelChanged }: Setlabel: t.settings.nav.about,onSelect: () => setActiveView('about')}- ],- [activeView, keysView, providerView, t, setActiveView, openProviderView, openKeysView]+ ] as OverlayNavGroup[]).map(group => {+ const view = group.id as SettingsViewId+ const children = settingsSubpages(view)++ return children.length ? {+ ...group,+ children: children.map(page => ({+ active: group.active && subpage === page.id,+ icon: settingsSubpageIcon(page, group.icon),+ id: `${view}:${page.id}`,+ label: t.settings.subpages[page.labelKey],+ onSelect: () => openSettingsPage(view, page.id)+ }))+ } : group+ }),+ [activeView, billingView, canViewPlans, keysView, providerView, subpage, t, setActiveView, openProviderView, openKeysView, openSettingsPage, openSubView])+ const activeGroup = navGroups.find(group => group.active)+ const activeChild = activeGroup?.children?.find(child => child.active)+// Type-to-search: printable keystrokes on the Settings surface (outside any// field) open the settings-scoped palette, seeded with the character — same// reflex as the chat surface's type-to-focus, pointed at search instead.@@ -401,21 +476,22 @@ export function SettingsView({ onClose, onConfigSaved, onMainModelChanged }: Setconst activeSettingsContent =activeView === 'config:appearance' ? (- <AppearanceSettings />+ <AppearanceSettings subpage={subpage} />) : activeView === 'about' ? (- <AboutSettings />+ <AboutSettings subpage={subpage} />) : activeView === 'gateway' || activeView === 'connections' ? (// 'connections' renders the unified page too so the frame before// the alias redirect lands doesn't flash the fallback view.- <GatewaySettings />+ <GatewaySettings subpage={subpage} />) : activeView === 'keybinds' ? (- <KeybindSettings />+ <KeybindSettings subpage={subpage} />) : activeView.startsWith('config:') ? (<ConfigSettingsactiveSectionId={activeView.slice('config:'.length)}importInputRef={importInputRef}onConfigSaved={onConfigSaved}onMainModelChanged={onMainModelChanged}+ subpage={subpage}/>) : activeView === 'providers' ? (<ProvidersSettings@@ -429,13 +505,13 @@ export function SettingsView({ onClose, onConfigSaved, onMainModelChanged }: Set) : activeView === 'keys' ? (<KeysSettings view={keysView} />) : activeView === 'notifications' ? (- <NotificationsSettings />+ <NotificationsSettings subpage={subpage} />) : activeView === 'billing' ? (<BillingSettings />) : activeView === 'vault' ? (- <VaultSettings key={vaultOwnerKey(activeConnectionId, scopeProfile)} />+ <VaultSettings key={vaultOwnerKey(activeConnectionId, scopeProfile)} subpage={subpage} />) : (- <SessionsSettings />+ <SessionsSettings subpage={subpage} />)return (@@ -443,7 +519,14 @@ export function SettingsView({ onClose, onConfigSaved, onMainModelChanged }: Set<OverlaySplitLayout><OverlayNav footer={navFooter} groups={navGroups} />- <OverlayMain className="px-0 pb-0">{activeSettingsContent}</OverlayMain>+ <OverlayMain className="px-0 pb-0">+ <SettingsBreadcrumbContext.Provider value>+ {activeGroup && <SettingsSubpageHeader child={activeChild} group={activeGroup} />}+ {needsSubpageRedirect ? (+ <Navigate replace to={{ hash, pathname, search: `?${subpageSearch}` }} />+ ) : activeSettingsContent}+ </SettingsBreadcrumbContext.Provider>+ </OverlayMain></OverlaySplitLayout></OverlayView>)diff --git a/apps/desktop/src/app/settings/keybind-settings.tsx b/apps/desktop/src/app/settings/keybind-settings.tsxindex 91e91a62aed..5e8ec84fbb8 100644--- a/apps/desktop/src/app/settings/keybind-settings.tsx+++ b/apps/desktop/src/app/settings/keybind-settings.tsx@@ -1,5 +1,5 @@import { useStore } from '@nanostores/react'-import { useMemo, useState } from 'react'+import { useContext, useMemo, useState } from 'react'import { Codicon } from '@/components/ui/codicon'import { DisclosureCaret } from '@/components/ui/disclosure-caret'@@ -30,11 +30,28 @@ import {resetBinding} from '@/store/keybinds'-import { SettingsContent } from './primitives'+import { SettingsBreadcrumbContext, SettingsContent } from './primitives'import { ScreenshotSettings } from './screenshot-settings'-export function KeybindSettings() {+interface KeybindSettingsProps {+ subpage?: string+}++export function KeybindSettings({ subpage }: KeybindSettingsProps = {}) {+ if (subpage === 'screen-capture') {+ return (+ <SettingsContent>+ <ScreenshotSettings />+ </SettingsContent>+ )+ }++ return <ShortcutSettings includeScreenshot={subpage === undefined} />+}++function ShortcutSettings({ includeScreenshot }: { includeScreenshot: boolean }) {const { t } = useI18n()+ const hasBreadcrumb = useContext(SettingsBreadcrumbContext)const bindings = useStore($bindings)const k = t.keybindsconst [collapsed, setCollapsed] = useState<ReadonlySet<string>>(new Set())@@ -100,7 +117,7 @@ export function KeybindSettings() {<SettingsContent><div className="flex items-center justify-between gap-3 pb-3"><div className="min-w-0">- <h2 className="text-sm font-semibold text-foreground">{k.title}</h2>+ {!hasBreadcrumb && <h2 className="text-sm font-semibold text-foreground">{k.title}</h2>}<p className="mt-0.5 text-[0.72rem] text-muted-foreground">{k.subtitle(openCombo ? formatCombo(openCombo) : '')}</p>@@ -115,9 +132,10 @@ export function KeybindSettings() {</button></div>- {(!isSearching || t.settings.screenshot.enabledTitle.toLowerCase().includes(query.toLowerCase())) && (- <ScreenshotSettings />- )}+ {includeScreenshot &&+ (!isSearching || t.settings.screenshot.enabledTitle.toLowerCase().includes(query.toLowerCase())) && (+ <ScreenshotSettings />+ )}<div className="pb-3"><SearchFielddiff --git a/apps/desktop/src/app/settings/managed-updates-section.tsx b/apps/desktop/src/app/settings/managed-updates-section.tsxindex 970448ff228..cd71fc448d0 100644--- a/apps/desktop/src/app/settings/managed-updates-section.tsx+++ b/apps/desktop/src/app/settings/managed-updates-section.tsx@@ -1,4 +1,5 @@import { useStore } from '@nanostores/react'+import { useContext } from 'react'import { Button } from '@/components/ui/button'import type { DesktopRegistryConnection } from '@/global'@@ -12,7 +13,7 @@ import {runManagedUpdate} from '@/store/managed-updates'-import { ListRow, Pill, SectionHeading } from './primitives'+import { ListRow, Pill, SectionHeading, SettingsBreadcrumbContext } from './primitives'function stateTone(state: ManagedUpdateState | undefined): 'muted' | 'primary' | 'warn' {if (!state || state.status === 'idle') {@@ -39,6 +40,7 @@ function sshTarget(connection: DesktopRegistryConnection): string | null {* in-flight state (the engine exposes no streaming progress channel), and the* correlated receipt once it lands. */export function ManagedUpdatesSection() {+ const hasBreadcrumb = useContext(SettingsBreadcrumbContext)const { t } = useI18n()const m = t.settings.managedUpdatesconst registry = useStore($connectionsRegistry)@@ -92,8 +94,8 @@ export function ManagedUpdatesSection() {}return (- <section className="mt-8">- <SectionHeading icon={Download} title={m.title} />+ <section className={hasBreadcrumb ? undefined : 'mt-8'}>+ <SectionHeading icon={Download} page title={m.title} /><p className="mb-1 text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">{m.intro}</p>diff --git a/apps/desktop/src/app/settings/model-settings.tsx b/apps/desktop/src/app/settings/model-settings.tsxindex 80f841174cd..901c415d52c 100644--- a/apps/desktop/src/app/settings/model-settings.tsx+++ b/apps/desktop/src/app/settings/model-settings.tsx@@ -36,6 +36,7 @@ import { startManualLocalEndpoint, startManualOnboarding, startManualProviderOAuimport { hermesConfigCacheWriter, invalidateHermesConfig, useHermesConfigRecord } from '../hooks/use-config-record'import { useOnProfileSwitch } from '../hooks/use-on-profile-switch'+import { PanelEmpty } from '../overlays/panel'import { CONTROL_TEXT } from './constants'import { getNested, setNested } from './helpers'@@ -45,43 +46,47 @@ import { useDeepLinkHighlight } from './use-deep-link-highlight'// Skeleton mirror of the Model settings DOM so the page keeps its shape while// the provider/model catalog loads, instead of collapsing to a centered// spinner. Same containers/rhythm as the real render below.-export function ModelSettingsSkeleton() {+export function ModelSettingsSkeleton({ subpage }: Pick<ModelSettingsProps, 'subpage'> = {}) {return (<div className="grid gap-6" data-slot="model-settings-skeleton">- <section>- <Skeleton className="mb-3 h-3 w-72 max-w-full" />- <div className="flex flex-wrap items-center gap-2">- <Skeleton className="h-8 w-40" />- <Skeleton className="h-8 w-60 max-w-full" />- <Skeleton className="h-8 w-16" />- </div>- <div className="mt-3 flex flex-wrap items-center gap-x-6 gap-y-3">- <Skeleton className="h-3 w-16" />- <Skeleton className="h-8 w-28" />- <Skeleton className="h-6 w-20" />- </div>- </section>-- <section>- <div className="mb-2.5 flex items-center gap-2 pt-2">- <Skeleton className="size-4" />- <Skeleton className="h-4 w-36" />- </div>- <div className="grid gap-1">- {[0, 1, 2, 3].map(row => (- <div- className="grid gap-3 py-3 @2xl:grid-cols-[minmax(0,1fr)_minmax(15rem,22rem)] @2xl:items-center"- key={row}- >- <div className="min-w-0 space-y-1.5">- <Skeleton className="h-3.5 w-32" />- <Skeleton className="h-3 w-52 max-w-full" />+ {(subpage === undefined || subpage === 'main') && (+ <section>+ <Skeleton className="mb-3 h-3 w-72 max-w-full" />+ <div className="flex flex-wrap items-center gap-2">+ <Skeleton className="h-8 w-40" />+ <Skeleton className="h-8 w-60 max-w-full" />+ <Skeleton className="h-8 w-16" />+ </div>+ <div className="mt-3 flex flex-wrap items-center gap-x-6 gap-y-3">+ <Skeleton className="h-3 w-16" />+ <Skeleton className="h-8 w-28" />+ <Skeleton className="h-6 w-20" />+ </div>+ </section>+ )}++ {(subpage === undefined || subpage === 'auxiliary' || subpage === 'moa') && (+ <section>+ <div className="mb-2.5 flex items-center gap-2 pt-2">+ <Skeleton className="size-4" />+ <Skeleton className="h-4 w-36" />+ </div>+ <div className="grid gap-1">+ {[0, 1, 2, 3].map(row => (+ <div+ className="grid gap-3 py-3 @2xl:grid-cols-[minmax(0,1fr)_minmax(15rem,22rem)] @2xl:items-center"+ key={row}+ >+ <div className="min-w-0 space-y-1.5">+ <Skeleton className="h-3.5 w-32" />+ <Skeleton className="h-3 w-52 max-w-full" />+ </div>+ <Skeleton className="h-8 w-full @2xl:justify-self-end @2xl:w-56" /></div>- <Skeleton className="h-8 w-full @2xl:justify-self-end @2xl:w-56" />- </div>- ))}- </div>- </section>+ ))}+ </div>+ </section>+ )}</div>)}@@ -213,6 +218,8 @@ function StaleAuxWarning({ applying, onReset, slots, taskLabel }: StaleAuxWarnin}interface ModelSettingsProps {+ /** Visibility only: changing pages must not reset drafts or cancel autosave. */+ subpage?: string/** Notified after the main model is applied, so live UI stores can sync. */onMainModelChanged?: (provider: string, model: string) => void/** Shared settings "Applies to" scope: a concrete profile to edit instead of@@ -222,9 +229,12 @@ interface ModelSettingsProps {scopeProfile?: string}-export function ModelSettings({ onMainModelChanged, scopeProfile }: ModelSettingsProps) {+export function ModelSettings({ onMainModelChanged, scopeProfile, subpage }: ModelSettingsProps) {const { t } = useI18n()const m = t.settings.model+ const showMain = subpage === undefined || subpage === 'main'+ const showAuxiliary = subpage === undefined || subpage === 'auxiliary'+ const showMoa = subpage === undefined || subpage === 'moa'const [loading, setLoading] = useState(true)const [error, setError] = useState('')const [skewRestart, setSkewRestart] = useState(false)@@ -263,7 +273,7 @@ export function ModelSettings({ onMainModelChanged, scopeProfile }: ModelSettinguseDeepLinkHighlight({elementId: task => `aux-task-${task}`,param: 'aux',- ready: task => AUX_TASKS.some(meta => meta.key === task)+ ready: task => showAuxiliary && !loading && AUX_TASKS.some(meta => meta.key === task)})// Every profile-scoped async here captures this and bails before writing back,@@ -849,315 +859,328 @@ export function ModelSettings({ onMainModelChanged, scopeProfile }: ModelSetting}}, [m.restartFailed, refresh, scopeProfile, setCaughtError])+ // Fallbacks are schema-backed controls in ConfigSettings. Keep this+ // controller alive there without rendering controls from another child page.+ if (!showMain && !showAuxiliary && !showMoa) {+ return null+ }+if (loading && !mainModel) {- return <ModelSettingsSkeleton />+ return <ModelSettingsSkeleton subpage={subpage} />}+ const errorNotice = error && (+ <div className="mt-2 flex flex-wrap items-center gap-2 text-xs text-destructive">+ <span>{error}</span>+ {skewRestart && (+ <Button+ disabled={restartingBackend}+ onClick={() => void recycleStaleBackend()}+ size="sm"+ variant="textStrong"+ >+ {restartingBackend && <Loader2 className="size-3.5 animate-spin" />}+ {restartingBackend ? m.restartingBackend : m.restartBackend}+ </Button>+ )}+ </div>+ )+return (<div className="grid gap-6">- <section>- <p className="mb-3 text-xs text-muted-foreground">{m.appliesDesc}</p>- <div className="flex flex-wrap items-center gap-2">- <Select onValueChange={setSelectedProvider} value={selectedProvider}>- <SelectTrigger className={cn('min-w-40', CONTROL_TEXT)}>- <SelectValue placeholder={m.provider} />- </SelectTrigger>- <SelectContent>- {mainProviderOptions.map(provider => (- <SelectItem key={provider.slug || 'none'} value={provider.slug || 'none'}>- {provider.name}- </SelectItem>- ))}- </SelectContent>- </Select>- {needsSetup ? (- setupIsApiKey ? (- <>- <Input- autoComplete="off"- className={cn('min-w-60 flex-1', CONTROL_TEXT)}- onChange={event => setApiKeyDraft(event.target.value)}- onKeyDown={event => {- if (isSubmitEnter(event)) {- void activateApiKeyProvider()- }- }}- placeholder={`Paste ${selectedProviderRow?.key_env ?? 'API key'}`}- type="password"- value={apiKeyDraft}- />- <Button- disabled={!apiKeyDraft.trim() || activating}- onClick={() => void activateApiKeyProvider()}- size="sm"- >- {activating && <Loader2 className="size-3.5 animate-spin" />}- {activating ? 'Activating...' : 'Activate'}+ {!showMain && errorNotice}+ {showMain && (+ <section>+ <p className="mb-3 text-xs text-muted-foreground">{m.appliesDesc}</p>+ <div className="flex flex-wrap items-center gap-2">+ <Select onValueChange={setSelectedProvider} value={selectedProvider}>+ <SelectTrigger className={cn('min-w-40', CONTROL_TEXT)}>+ <SelectValue placeholder={m.provider} />+ </SelectTrigger>+ <SelectContent>+ {mainProviderOptions.map(provider => (+ <SelectItem key={provider.slug || 'none'} value={provider.slug || 'none'}>+ {provider.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ {needsSetup ? (+ setupIsApiKey ? (+ <>+ <Input+ autoComplete="off"+ className={cn('min-w-60 flex-1', CONTROL_TEXT)}+ onChange={event => setApiKeyDraft(event.target.value)}+ onKeyDown={event => {+ if (isSubmitEnter(event)) {+ void activateApiKeyProvider()+ }+ }}+ placeholder={`Paste ${selectedProviderRow?.key_env ?? 'API key'}`}+ type="password"+ value={apiKeyDraft}+ />+ <Button+ disabled={!apiKeyDraft.trim() || activating}+ onClick={() => void activateApiKeyProvider()}+ size="sm"+ >+ {activating && <Loader2 className="size-3.5 animate-spin" />}+ {activating ? 'Activating...' : 'Activate'}+ </Button>+ </>+ ) : (+ <Button onClick={startProviderSetup} size="sm" variant="textStrong">+ Set up {selectedProviderRow?.name ?? 'provider'}</Button>- </>+ )) : (- <Button onClick={startProviderSetup} size="sm" variant="textStrong">- Set up {selectedProviderRow?.name ?? 'provider'}- </Button>- )- ) : (- <>- <Select onValueChange={setSelectedModel} value={selectedModel}>- <SelectTrigger className={cn('min-w-60', CONTROL_TEXT)}>- <SelectValue placeholder={m.model} />- </SelectTrigger>- <SelectContent>- {withActive(selectedProviderModels, selectedModel).map(model => (- <SelectItem key={model} value={model}>- {model}- </SelectItem>- ))}- </SelectContent>- </Select>- <Button- disabled={!selectedProvider || !selectedModel || applying}- onClick={() => void applyMainModel()}- size="sm"- >- {applying && <Loader2 className="size-3.5 animate-spin" />}- {applying ? m.applying : t.common.apply}- </Button>- </>- )}- </div>- {needsSetup && !setupIsApiKey && selectedProviderRow && (- <p className="mt-2 text-xs text-muted-foreground">- {selectedProviderRow?.auth_type === 'api_key'- ? `${selectedProviderRow?.name} needs an API key — set it up to choose a model.`- : `${selectedProviderRow?.name} signs in through your browser — Hermes runs the flow for you.`}- </p>- )}- {config && mainModel && (reasoningSupported || fastSupported) && (- <div className="mt-3 flex flex-wrap items-center gap-x-6 gap-y-3">- <span className="text-xs text-muted-foreground">{m.defaultsLabel}</span>- {reasoningSupported && (- <div className="flex items-center gap-2 text-xs">- {m.reasoning}- <Select- onValueChange={value => void writeAgentDefault('agent.reasoning_effort', value)}- value={effortValue}- >- <SelectTrigger className={cn('min-w-28', CONTROL_TEXT)}>- <SelectValue />+ <>+ <Select onValueChange={setSelectedModel} value={selectedModel}>+ <SelectTrigger className={cn('min-w-60', CONTROL_TEXT)}>+ <SelectValue placeholder={m.model} /></SelectTrigger><SelectContent>- {REASONING_EFFORT_VALUES.map(value => (- <SelectItem key={value} value={value}>- {value === 'none' ? m.reasoningOff : t.shell.modelOptions[value]}+ {withActive(selectedProviderModels, selectedModel).map(model => (+ <SelectItem key={model} value={model}>+ {model}</SelectItem>))}</SelectContent></Select>- </div>- )}- {fastSupported && (- <label className="flex items-center gap-2 text-xs">- {t.shell.modelOptions.fast}- <Switch- checked={fastOn}- onCheckedChange={checked => void writeAgentDefault('agent.service_tier', checked ? 'fast' : 'normal')}- size="xs"- />- </label>- )}- </div>- )}- {error && (- <div className="mt-2 flex flex-wrap items-center gap-2 text-xs text-destructive">- <span>{error}</span>- {skewRestart && (- <Button- disabled={restartingBackend}- onClick={() => void recycleStaleBackend()}- size="sm"- variant="textStrong"- >- {restartingBackend && <Loader2 className="size-3.5 animate-spin" />}- {restartingBackend ? m.restartingBackend : m.restartBackend}- </Button>+ <Button+ disabled={!selectedProvider || !selectedModel || applying}+ onClick={() => void applyMainModel()}+ size="sm"+ >+ {applying && <Loader2 className="size-3.5 animate-spin" />}+ {applying ? m.applying : t.common.apply}+ </Button>+ </>)}</div>- )}- {switchStaleAux.length > 0 && (- <div className="mt-2">- <StaleAuxWarning- applying={applying}- onReset={() => void resetAuxiliaryModels()}- slots={switchStaleAux}- taskLabel={auxiliaryTaskLabel}- />- </div>- )}- </section>-- <section>- <div className="mb-2.5 flex items-center justify-between">- <SectionHeading icon={Cpu} title={m.auxiliaryTitle} />- <Button- disabled={!mainModel || applying}- onClick={() => void resetAuxiliaryModels()}- size="sm"- variant="textStrong"- >- {m.resetAllToMain}- </Button>- </div>- <p className="mb-2 text-xs text-muted-foreground">{m.auxiliaryDesc}</p>- {switchStaleAux.length === 0 && persistentStaleAux.length > 0 && (- <div className="mb-2.5">- <StaleAuxWarning- applying={applying}- onReset={() => void resetAuxiliaryModels()}- slots={persistentStaleAux}- taskLabel={auxiliaryTaskLabel}- />+ {needsSetup && !setupIsApiKey && selectedProviderRow && (+ <p className="mt-2 text-xs text-muted-foreground">+ {selectedProviderRow?.auth_type === 'api_key'+ ? `${selectedProviderRow?.name} needs an API key — set it up to choose a model.`+ : `${selectedProviderRow?.name} signs in through your browser — Hermes runs the flow for you.`}+ </p>+ )}+ {config && mainModel && (reasoningSupported || fastSupported) && (+ <div className="mt-3 flex flex-wrap items-center gap-x-6 gap-y-3">+ <span className="text-xs text-muted-foreground">{m.defaultsLabel}</span>+ {reasoningSupported && (+ <div className="flex items-center gap-2 text-xs">+ {m.reasoning}+ <Select+ onValueChange={value => void writeAgentDefault('agent.reasoning_effort', value)}+ value={effortValue}+ >+ <SelectTrigger className={cn('min-w-28', CONTROL_TEXT)}>+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {REASONING_EFFORT_VALUES.map(value => (+ <SelectItem key={value} value={value}>+ {value === 'none' ? m.reasoningOff : t.shell.modelOptions[value]}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div>+ )}+ {fastSupported && (+ <label className="flex items-center gap-2 text-xs">+ {t.shell.modelOptions.fast}+ <Switch+ checked={fastOn}+ onCheckedChange={checked => void writeAgentDefault('agent.service_tier', checked ? 'fast' : 'normal')}+ size="xs"+ />+ </label>+ )}+ </div>+ )}+ {errorNotice}+ {switchStaleAux.length > 0 && (+ <div className="mt-2">+ <StaleAuxWarning+ applying={applying}+ onReset={() => void resetAuxiliaryModels()}+ slots={switchStaleAux}+ taskLabel={auxiliaryTaskLabel}+ />+ </div>+ )}+ </section>+ )}++ {showAuxiliary && (+ <section>+ <div className={cn('mb-2.5 flex items-center', subpage === undefined ? 'justify-between' : 'justify-end')}>+ {subpage === undefined && <SectionHeading icon={Cpu} title={m.auxiliaryTitle} />}+ <Button+ disabled={!mainModel || applying}+ onClick={() => void resetAuxiliaryModels()}+ size="sm"+ variant="textStrong"+ >+ {m.resetAllToMain}+ </Button></div>- )}- <div className="grid gap-1">- {AUX_TASKS.map(meta => {- const copy = m.tasks[meta.key] ?? { label: meta.key, hint: meta.key }- const current = auxiliary?.tasks.find(entry => entry.task === meta.key)- const isAuto = !current || !current.provider || current.provider === 'auto'- const isEditing = editingAuxTask === meta.key-- return (- <div className="scroll-mt-6 rounded-lg" id={`aux-task-${meta.key}`} key={meta.key}>- <ListRow- action={- !isEditing && (- <div className="flex shrink-0 items-center gap-1.5">- <Button- disabled={!mainModel || applying}- onClick={() => void setAuxiliaryToMain(meta.key)}- size="sm"- variant="text"- >- {m.setToMain}- </Button>- <Button- disabled={!providers.length || applying}- onClick={() => beginAuxiliaryEdit(meta.key)}- size="sm"- variant="textStrong"- >- {m.change}- </Button>- </div>- )- }- below={- isEditing && (- <div className="mt-2 grid gap-2 pt-1">- <div className="flex flex-wrap items-center gap-2">- <Select- onValueChange={value => setAuxDraft(prev => ({ ...prev, provider: value, model: '' }))}- value={auxDraft.provider}- >- <SelectTrigger- aria-label={`${copy.label} provider`}- className={cn('min-w-32', CONTROL_TEXT)}- >- <SelectValue placeholder={m.provider} />- </SelectTrigger>- <SelectContent>- {providerOptions.map(provider => (- <SelectItem key={provider.slug || 'none'} value={provider.slug || 'none'}>- {provider.name}- </SelectItem>- ))}- </SelectContent>- </Select>- <Select- onValueChange={value => setAuxDraft(prev => ({ ...prev, model: value }))}- value={auxDraft.model}- >- <SelectTrigger aria-label={`${copy.label} model`} className={cn('min-w-48', CONTROL_TEXT)}>- <SelectValue placeholder={m.model} />- </SelectTrigger>- <SelectContent>- {withActive(auxDraftProviderModels, auxDraft.model).map(model => (- <SelectItem key={model} value={model}>- {model}- </SelectItem>- ))}- </SelectContent>- </Select>- </div>- <div className="flex flex-wrap items-center gap-2 text-xs">- <span className="text-muted-foreground">{m.reasoning}</span>- <Select- onValueChange={value => setAuxDraft(prev => ({ ...prev, reasoningEffort: value }))}- value={auxDraft.reasoningEffort}- >- <SelectTrigger- aria-label={`${copy.label} reasoning effort`}- className={cn('min-w-32', CONTROL_TEXT)}- >- <SelectValue />- </SelectTrigger>- <SelectContent>- <SelectItem value="__inherit__">{m.inheritMainEffort}</SelectItem>- {REASONING_EFFORT_VALUES.map(value => (- <SelectItem key={value} value={value}>- {value === 'none' ? m.reasoningOff : t.shell.modelOptions[value]}- </SelectItem>- ))}- </SelectContent>- </Select>- </div>- <div className="flex flex-wrap items-center gap-2">+ <p className="mb-2 text-xs text-muted-foreground">{m.auxiliaryDesc}</p>+ {(switchStaleAux.length === 0 || !showMain) && persistentStaleAux.length > 0 && (+ <div className="mb-2.5">+ <StaleAuxWarning+ applying={applying}+ onReset={() => void resetAuxiliaryModels()}+ slots={persistentStaleAux}+ taskLabel={auxiliaryTaskLabel}+ />+ </div>+ )}+ <div className="grid gap-1">+ {AUX_TASKS.map(meta => {+ const copy = m.tasks[meta.key] ?? { label: meta.key, hint: meta.key }+ const current = auxiliary?.tasks.find(entry => entry.task === meta.key)+ const isAuto = !current || !current.provider || current.provider === 'auto'+ const isEditing = editingAuxTask === meta.key++ return (+ <div className="scroll-mt-6 rounded-lg" id={`aux-task-${meta.key}`} key={meta.key}>+ <ListRow+ action={+ !isEditing && (+ <div className="flex shrink-0 items-center gap-1.5"><Button- disabled={!auxDraft.provider || !auxDraft.model || applying}- onClick={() => void applyAuxiliaryDraft(meta.key)}+ disabled={!mainModel || applying}+ onClick={() => void setAuxiliaryToMain(meta.key)}size="sm"+ variant="text">- {applying ? m.applying : t.common.apply}+ {m.setToMain}</Button>- <Button onClick={() => setEditingAuxTask(null)} size="sm" variant="ghost">- {t.common.cancel}+ <Button+ disabled={!providers.length || applying}+ onClick={() => beginAuxiliaryEdit(meta.key)}+ size="sm"+ variant="textStrong"+ >+ {m.change}</Button></div>- </div>- )- }- description={- <span className="font-mono text-[0.68rem]">- {isAuto ? m.autoUseMain : `${current.provider} · ${current.model || m.providerDefault}`}- {!isAuto && current.base_url && (- <span className="text-muted-foreground"> · {current.base_url}</span>- )}- {current?.reasoning_effort && (- <span className="text-muted-foreground">- {' · '}- {current.reasoning_effort === 'none'- ? `${m.reasoning} ${m.reasoningOff}`- : (isReasoningEffort(current.reasoning_effort)- ? t.shell.modelOptions[current.reasoning_effort]- : current.reasoning_effort)}- </span>- )}- </span>- }- title={- <span className="flex items-baseline gap-2">- {copy.label}- <Pill>{copy.hint}</Pill>- </span>- }- />- </div>- )- })}- </div>- </section>- {moa && currentMoaPreset && (+ )+ }+ below={+ isEditing && (+ <div className="mt-2 grid gap-2 pt-1">+ <div className="flex flex-wrap items-center gap-2">+ <Select+ onValueChange={value => setAuxDraft(prev => ({ ...prev, provider: value, model: '' }))}+ value={auxDraft.provider}+ >+ <SelectTrigger+ aria-label={`${copy.label} provider`}+ className={cn('min-w-32', CONTROL_TEXT)}+ >+ <SelectValue placeholder={m.provider} />+ </SelectTrigger>+ <SelectContent>+ {providerOptions.map(provider => (+ <SelectItem key={provider.slug || 'none'} value={provider.slug || 'none'}>+ {provider.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ <Select+ onValueChange={value => setAuxDraft(prev => ({ ...prev, model: value }))}+ value={auxDraft.model}+ >+ <SelectTrigger aria-label={`${copy.label} model`} className={cn('min-w-48', CONTROL_TEXT)}>+ <SelectValue placeholder={m.model} />+ </SelectTrigger>+ <SelectContent>+ {withActive(auxDraftProviderModels, auxDraft.model).map(model => (+ <SelectItem key={model} value={model}>+ {model}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div>+ <div className="flex flex-wrap items-center gap-2 text-xs">+ <span className="text-muted-foreground">{m.reasoning}</span>+ <Select+ onValueChange={value => setAuxDraft(prev => ({ ...prev, reasoningEffort: value }))}+ value={auxDraft.reasoningEffort}+ >+ <SelectTrigger+ aria-label={`${copy.label} reasoning effort`}+ className={cn('min-w-32', CONTROL_TEXT)}+ >+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ <SelectItem value="__inherit__">{m.inheritMainEffort}</SelectItem>+ {REASONING_EFFORT_VALUES.map(value => (+ <SelectItem key={value} value={value}>+ {value === 'none' ? m.reasoningOff : t.shell.modelOptions[value]}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div>+ <div className="flex flex-wrap items-center gap-2">+ <Button+ disabled={!auxDraft.provider || !auxDraft.model || applying}+ onClick={() => void applyAuxiliaryDraft(meta.key)}+ size="sm"+ >+ {applying ? m.applying : t.common.apply}+ </Button>+ <Button onClick={() => setEditingAuxTask(null)} size="sm" variant="ghost">+ {t.common.cancel}+ </Button>+ </div>+ </div>+ )+ }+ description={+ <span className="font-mono text-[0.68rem]">+ {isAuto ? m.autoUseMain : `${current.provider} · ${current.model || m.providerDefault}`}+ {!isAuto && current.base_url && (+ <span className="text-muted-foreground"> · {current.base_url}</span>+ )}+ {current?.reasoning_effort && (+ <span className="text-muted-foreground">+ {' · '}+ {current.reasoning_effort === 'none'+ ? `${m.reasoning} ${m.reasoningOff}`+ : (isReasoningEffort(current.reasoning_effort)+ ? t.shell.modelOptions[current.reasoning_effort]+ : current.reasoning_effort)}+ </span>+ )}+ </span>+ }+ title={+ <span className="flex items-baseline gap-2">+ {copy.label}+ <Pill>{copy.hint}</Pill>+ </span>+ }+ />+ </div>+ )+ })}+ </div>+ </section>+ )}+ {showMoa && moa && currentMoaPreset && (<section>- <SectionHeading icon={Cpu} title={m.moaTitle} />+ {subpage === undefined && <SectionHeading icon={Cpu} title={m.moaTitle} />}<p className="mb-2 text-xs text-muted-foreground">{m.moaDescription}</p><div className="mb-2 flex flex-wrap items-center gap-2"><Select onValueChange={setSelectedMoaPreset} value={selectedMoaPreset || moa.default_preset}>@@ -1438,6 +1461,17 @@ export function ModelSettings({ onMainModelChanged, scopeProfile }: ModelSetting</div></section>)}+ {subpage === 'moa' && !loading && (!moa || !currentMoaPreset) && (+ <PanelEmpty+ action={+ <Button onClick={() => void refresh()} size="sm">+ {t.skills.refresh}+ </Button>+ }+ icon="error"+ title={m.loadFailed}+ />+ )}</div>)}diff --git a/apps/desktop/src/app/settings/notifications-settings.tsx b/apps/desktop/src/app/settings/notifications-settings.tsxindex b2810f691fe..86a24d4e8b6 100644--- a/apps/desktop/src/app/settings/notifications-settings.tsx+++ b/apps/desktop/src/app/settings/notifications-settings.tsx@@ -27,11 +27,17 @@ function Caption({ children, className }: { children: ReactNode; className?: strreturn <p className={cn(CAPTION, className)}>{children}</p>}-export function NotificationsSettings() {+interface NotificationsSettingsProps {+ subpage?: string+}++export function NotificationsSettings({ subpage }: NotificationsSettingsProps = {}) {const { t } = useI18n()const prefs = useStore($nativeNotifyPrefs)const completionSoundVariantId = useStore($completionSoundVariantId)const copy = t.settings.notifications+ const showAlerts = subpage === undefined || subpage === 'alerts'+ const showSounds = subpage === undefined || subpage === 'sounds'const runTest = async () => {triggerHaptic('open')@@ -41,79 +47,87 @@ export function NotificationsSettings() {return (<SettingsContent>- <SectionHeading icon={Bell} title={copy.title} />- <Caption className="mb-2 leading-(--conversation-caption-line-height)">{copy.intro}</Caption>+ {showAlerts && (+ <>+ {subpage === undefined && <SectionHeading icon={Bell} title={copy.title} />}+ <Caption className="mb-2 leading-(--conversation-caption-line-height)">{copy.intro}</Caption>- <ToggleRow- checked={prefs.enabled}- description={copy.enableAllDesc}- label={copy.enableAll}- onChange={setNativeNotifyEnabled}- />+ <ToggleRow+ checked={prefs.enabled}+ description={copy.enableAllDesc}+ label={copy.enableAll}+ onChange={setNativeNotifyEnabled}+ />- {NATIVE_NOTIFICATION_KINDS.map(kind => (- <ToggleRow- checked={prefs.enabled && prefs.kinds[kind]}- description={copy.kinds[kind].description}- disabled={!prefs.enabled}- key={kind}- label={copy.kinds[kind].label}- onChange={on => setNativeNotifyKind(kind, on)}- />- ))}+ {NATIVE_NOTIFICATION_KINDS.map(kind => (+ <ToggleRow+ checked={prefs.enabled && prefs.kinds[kind]}+ description={copy.kinds[kind].description}+ disabled={!prefs.enabled}+ key={kind}+ label={copy.kinds[kind].label}+ onChange={on => setNativeNotifyKind(kind, on)}+ />+ ))}+ </>+ )}- <ListRow- action={- <div className="flex flex-wrap items-center justify-end gap-2">- <Select- onValueChange={value => {- const variantId = Number.parseInt(value, 10)+ {showSounds && (+ <ListRow+ action={+ <div className="flex flex-wrap items-center justify-end gap-2">+ <Select+ onValueChange={value => {+ const variantId = Number.parseInt(value, 10)- setCompletionSoundVariantId(variantId)- previewCompletionSound(variantId)- triggerHaptic('selection')- }}- value={String(completionSoundVariantId)}- >- <SelectTrigger className={cn('min-w-56', CONTROL_TEXT)}>- <SelectValue />- </SelectTrigger>+ setCompletionSoundVariantId(variantId)+ previewCompletionSound(variantId)+ triggerHaptic('selection')+ }}+ value={String(completionSoundVariantId)}+ >+ <SelectTrigger className={cn('min-w-56', CONTROL_TEXT)}>+ <SelectValue />+ </SelectTrigger>- <SelectContent>- {COMPLETION_SOUND_VARIANTS.map(variant => (- <SelectItem key={variant.id} value={String(variant.id)}>- {variant.name}- </SelectItem>- ))}- </SelectContent>- </Select>+ <SelectContent>+ {COMPLETION_SOUND_VARIANTS.map(variant => (+ <SelectItem key={variant.id} value={String(variant.id)}>+ {variant.name}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>- <Button- className="gap-1.5"- onClick={() => {- previewCompletionSound()- triggerHaptic('crisp')- }}- size="sm"- type="button"- variant="outline"- >- <Play className="size-3.5" />- {copy.completionSoundPreview}- </Button>- </div>- }- description={copy.completionSoundDesc}- title={copy.completionSoundTitle}- />+ <Button+ className="gap-1.5"+ onClick={() => {+ previewCompletionSound()+ triggerHaptic('crisp')+ }}+ size="sm"+ type="button"+ variant="outline"+ >+ <Play className="size-3.5" />+ {copy.completionSoundPreview}+ </Button>+ </div>+ }+ description={copy.completionSoundDesc}+ title={copy.completionSoundTitle}+ />+ )}- <div className="mt-4 flex flex-col gap-2">- <Button className="self-start" onClick={() => void runTest()} size="sm" type="button" variant="outline">- <Bell />- {copy.test}- </Button>- <Caption>{copy.focusedHint}</Caption>- </div>+ {showAlerts && (+ <div className="mt-4 flex flex-col gap-2">+ <Button className="self-start" onClick={() => void runTest()} size="sm" type="button" variant="outline">+ <Bell />+ {copy.test}+ </Button>+ <Caption>{copy.focusedHint}</Caption>+ </div>+ )}</SettingsContent>)}diff --git a/apps/desktop/src/app/settings/other-subpages.ts b/apps/desktop/src/app/settings/other-subpages.tsnew file mode 100644index 00000000000..6f550a9a7ce--- /dev/null+++ b/apps/desktop/src/app/settings/other-subpages.ts@@ -0,0 +1,30 @@+// Pages with separate tasks expose content-only subpages. Billing keeps its+// existing capability-gated bview=overview|plans flow rather than adding a+// second route parameter that could disagree with a pending financial action.+export const OTHER_SUBPAGES: Record<string, { id: string; labelKey: string }[]> = {+ gateway: [+ { id: 'connection', labelKey: 'gatewayConnection' },+ { id: 'devices', labelKey: 'gatewayDevices' },+ { id: 'managed-updates', labelKey: 'gatewayManagedUpdates' }+ ],+ keybinds: [+ { id: 'shortcuts', labelKey: 'keyboardShortcuts' },+ { id: 'screen-capture', labelKey: 'screenCapture' }+ ],+ notifications: [+ { id: 'alerts', labelKey: 'notificationAlerts' },+ { id: 'sounds', labelKey: 'notificationSounds' }+ ],+ sessions: [+ { id: 'archived', labelKey: 'archivedSessions' },+ { id: 'default-directory', labelKey: 'defaultDirectory' }+ ],+ vault: [+ { id: 'credentials', labelKey: 'vaultCredentials' },+ { id: 'sources', labelKey: 'vaultSources' }+ ],+ about: [+ { id: 'updates', labelKey: 'appUpdates' },+ { id: 'uninstall', labelKey: 'uninstall' }+ ]+}diff --git a/apps/desktop/src/app/settings/pet-settings.tsx b/apps/desktop/src/app/settings/pet-settings.tsxindex d73127b05ca..376af5e89fb 100644--- a/apps/desktop/src/app/settings/pet-settings.tsx+++ b/apps/desktop/src/app/settings/pet-settings.tsx@@ -116,7 +116,7 @@ export function PetSettings() {return (<div>- <SectionHeading icon={PawPrint} title={copy.title} />+ <SectionHeading icon={PawPrint} page title={copy.title} /><p className="max-w-2xl text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">{copy.intro}</p>diff --git a/apps/desktop/src/app/settings/primitives.tsx b/apps/desktop/src/app/settings/primitives.tsxindex 4ae63689130..1bbe1f03af2 100644--- a/apps/desktop/src/app/settings/primitives.tsx+++ b/apps/desktop/src/app/settings/primitives.tsx@@ -1,4 +1,5 @@import type { ComponentProps, ReactNode } from 'react'+import { createContext, useContext } from 'react'import { Badge } from '@/components/ui/badge'import { Button } from '@/components/ui/button'@@ -10,6 +11,9 @@ import { cn } from '@/lib/utils'import { PAGE_INSET_X } from '../layout-constants'+// The settings shell owns page titles; embedded callers retain their headings.+export const SettingsBreadcrumbContext = createContext(false)+// `bare` drops the page gutters + tall bottom pad for embedding in a tighter// surface (e.g. the boot-failure recovery card owns its own padding).export function SettingsContent({ children, bare = false }: { children: ReactNode; bare?: boolean }) {@@ -50,6 +54,7 @@ export function SectionHeading({aside,icon: Icon,meta,+ page = false,title}: {// Right-aligned trailing content on the heading row (e.g. a compact status +@@ -57,12 +62,24 @@ export function SectionHeading({aside?: ReactNodeicon: IconComponentmeta?: string+ page?: booleantitle: string}) {+ const hasBreadcrumb = useContext(SettingsBreadcrumbContext)+ const showTitle = !page || !hasBreadcrumb++ if (!showTitle && !aside && !meta) {+ return null+ }+return (<div className="mb-2.5 flex items-center gap-2 pt-2 text-[length:var(--conversation-text-font-size)] font-medium">- <Icon className="size-4 shrink-0 text-muted-foreground" />- <span>{title}</span>+ {showTitle && (+ <>+ <Icon className="size-4 shrink-0 text-muted-foreground" />+ <span>{title}</span>+ </>+ )}{meta && <Pill>{meta}</Pill>}{aside && <div className="ml-auto flex min-w-0 items-center">{aside}</div>}</div>diff --git a/apps/desktop/src/app/settings/sessions-settings.tsx b/apps/desktop/src/app/settings/sessions-settings.tsxindex 68587193cbb..5f4b7b6be9e 100644--- a/apps/desktop/src/app/settings/sessions-settings.tsx+++ b/apps/desktop/src/app/settings/sessions-settings.tsx@@ -30,7 +30,23 @@ const DEFAULT_AUTO_ARCHIVE_DAYS = 3const ARCHIVED_FETCH_LIMIT = 200-export function SessionsSettings() {+interface SessionsSettingsProps {+ subpage?: string+}++export function SessionsSettings({ subpage }: SessionsSettingsProps = {}) {+ if (subpage === 'default-directory') {+ return (+ <SettingsContent>+ <DefaultProjectDirSetting />+ </SettingsContent>+ )+ }++ return <ArchivedSessionsSettings includeDefaultDirectory={subpage === undefined} />+}++function ArchivedSessionsSettings({ includeDefaultDirectory }: { includeDefaultDirectory: boolean }) {const { t } = useI18n()const s = t.settings.sessionsconst [sessions, setLocalSessions] = useState<SessionInfo[]>([])@@ -118,7 +134,7 @@ export function SessionsSettings() {return (<SettingsContent>- <DefaultProjectDirSetting />+ {includeDefaultDirectory && <DefaultProjectDirSetting />}<AutoArchiveSetting />@@ -379,7 +395,7 @@ function DefaultProjectDirSetting() {return (<div className="mb-6">- <SectionHeading icon={FolderOpen} title={s.defaultDirTitle} />+ <SectionHeading icon={FolderOpen} page title={s.defaultDirTitle} /><p className="mb-2 text-[length:var(--conversation-caption-font-size)] text-(--ui-text-tertiary)">{s.defaultDirDesc}</p>diff --git a/apps/desktop/src/app/settings/settings-search.ts b/apps/desktop/src/app/settings/settings-search.tsindex 4c41b30c64b..c3b493572b4 100644--- a/apps/desktop/src/app/settings/settings-search.ts+++ b/apps/desktop/src/app/settings/settings-search.ts@@ -6,6 +6,7 @@ import { FIELD_LABELS, SECTIONS } from './constants'import { credentialRowLabel } from './credential-key-ui'import { fieldCopyForSchemaKey } from './field-copy'import { prettyName, sectionFieldEntries, voiceFieldVisible } from './helpers'+import { settingsSubpageForTarget } from './subpages'import type { DesktopConfigSection, SettingsView } from './types'export type CredentialSettingsView = 'settings' | 'tools'@@ -26,6 +27,7 @@ export const APPEARANCE_SETTING_IDS = {} as constexport interface SettingsSearchTarget {+ subpage?: stringfield?: stringkey?: stringkeysView?: CredentialSettingsView@@ -202,6 +204,11 @@ export function filterSettingsSearchEntries(entries: SettingsSearchEntry[], querexport function settingsSearchTargetQuery(target: SettingsSearchTarget): string {const params = new URLSearchParams()params.set('tab', target.view)+ const subpage = target.subpage ?? settingsSubpageForTarget(target.view, target.field, target.setting)++ if (subpage) {+ params.set('page', subpage)+ }if (target.providerView) {params.set('pview', target.providerView)diff --git a/apps/desktop/src/app/settings/subpage-navigation.tsx b/apps/desktop/src/app/settings/subpage-navigation.tsxnew file mode 100644index 00000000000..56b89b2f211--- /dev/null+++ b/apps/desktop/src/app/settings/subpage-navigation.tsx@@ -0,0 +1,30 @@+import { Button } from '@/components/ui/button'+import { useI18n } from '@/i18n'+import { ChevronRight } from '@/lib/icons'+import { cn } from '@/lib/utils'++import { PAGE_INSET_X } from '../layout-constants'+import type { OverlayNavGroup, OverlayNavLink } from '../overlays/overlay-split-layout'++export function SettingsSubpageHeader({ group, child }: { group: OverlayNavGroup; child?: OverlayNavLink }) {+ const { t } = useI18n()++ return (+ <nav+ aria-label={group.label}+ className={cn('mb-3 flex shrink-0 items-center gap-1.5 text-xs text-(--ui-text-tertiary)', PAGE_INSET_X)}+ >+ <span className="shrink-0">{t.commandCenter.settings}</span>+ <ChevronRight aria-hidden className="size-3 shrink-0" />+ {child ? (+ <>+ <Button onClick={group.onSelect} size="inline" variant="text">{group.label}</Button>+ <ChevronRight aria-hidden className="size-3 shrink-0" />+ <span aria-current="page" className="truncate text-foreground">{child.label}</span>+ </>+ ) : (+ <span aria-current="page" className="truncate text-foreground">{group.label}</span>+ )}+ </nav>+ )+}diff --git a/apps/desktop/src/app/settings/subpages.test.ts b/apps/desktop/src/app/settings/subpages.test.tsnew file mode 100644index 00000000000..97e9a1fbff9--- /dev/null+++ b/apps/desktop/src/app/settings/subpages.test.ts@@ -0,0 +1,64 @@+import { describe, expect, it } from 'vitest'++import { TRANSLATIONS } from '@/i18n'++import { CONFIG_SUBPAGES, configSubpageForField } from './config-subpages'+import { SECTIONS } from './constants'+import { OTHER_SUBPAGES } from './other-subpages'+import { settingsSearchTargetQuery } from './settings-search'+import { resolveSettingsSubpage, settingsSubpages } from './subpages'+import type { SettingsView } from './types'++const views: SettingsView[] = [+ ...SECTIONS.map(section => `config:${section.id}` as SettingsView),+ ...Object.keys(OTHER_SUBPAGES) as SettingsView[]+]++describe('settings subpage routing', () => {+ it('opens the first ordered child for parents and keeps explicit child destinations', () => {+ for (const view of views) {+ const pages = settingsSubpages(view)+ expect(pages.length).toBeGreaterThan(0)+ expect(resolveSettingsSubpage(view, new URLSearchParams())).toBe(pages[0].id)+ expect(resolveSettingsSubpage(view, new URLSearchParams({ page: 'missing' }))).toBe(pages[0].id)++ if (pages.some(page => page.id === 'general')) {+ expect(pages[0].id).toBe('general')+ }++ for (const page of pages) {+ expect(resolveSettingsSubpage(view, new URLSearchParams({ page: page.id }))).toBe(page.id)++ for (const locale of Object.values(TRANSLATIONS)) {+ expect(locale.settings.subpages[page.labelKey]).toBeTruthy()+ }+ }+ }+ })++ it('routes every curated field and legacy target to its owning child before consuming the target', () => {+ for (const section of SECTIONS.filter(section => section.keys.length)) {+ for (const field of section.keys) {+ const owner = configSubpageForField(section.id, field)+ expect(CONFIG_SUBPAGES[section.id].some(page => page.id === owner)).toBe(true)+ const view = `config:${section.id}` as SettingsView+ const params = new URLSearchParams(settingsSearchTargetQuery({ view, field }))+ expect(params.get('page')).toBe(owner)+ expect(resolveSettingsSubpage(view, params)).toBe(owner)+ }+ }++ const cases: [SettingsView, string, string][] = [+ ['config:model', 'aux=vision', 'auxiliary'],+ ['sessions', 'session=archived-id', 'archived'],+ ['vault', 'kind=login', 'credentials'],+ ['vault', 'label=Example', 'credentials'],+ ['vault', 'origin=https%3A%2F%2Fexample.com', 'credentials'],+ ['config:appearance', 'setting=appearance.hide-thread-timeline', 'chat-display']+ ]++ for (const [view, search, expected] of cases) {+ expect(resolveSettingsSubpage(view, new URLSearchParams(search))).toBe(expected)+ }+ })+})diff --git a/apps/desktop/src/app/settings/subpages.ts b/apps/desktop/src/app/settings/subpages.tsnew file mode 100644index 00000000000..d433d2a5abe--- /dev/null+++ b/apps/desktop/src/app/settings/subpages.ts@@ -0,0 +1,110 @@+import {+ Archive,+ Bell,+ Box,+ Brain,+ CircleLetterA,+ Cpu,+ Download,+ FileImage,+ FileText,+ FolderOpen,+ Globe,+ type IconComponent,+ Keyboard,+ KeyRound,+ Lock,+ MessageCircle,+ Mic,+ Monitor,+ Network,+ Palette,+ PawPrint,+ Settings2,+ ShieldLock,+ Terminal,+ Trash2,+ Users,+ Volume2,+ Wrench+} from '@/lib/icons'++import { APPEARANCE_SUBPAGES, appearanceSubpageForSetting } from './appearance-subpages'+import { CONFIG_SUBPAGES, configSubpageForField } from './config-subpages'+import { OTHER_SUBPAGES } from './other-subpages'+import type { SettingsView } from './types'++export interface SettingsSubpage {+ id: string+ labelKey: string+}++const SUBPAGE_ICONS: Record<string, IconComponent> = {+ appearanceTheme: Palette, appearanceTypography: CircleLetterA,+ appearanceWindowLayout: Monitor, appearanceChatDisplay: MessageCircle,+ appearancePet: PawPrint, appearanceGeneral: Settings2,+ modelMain: Box, modelAuxiliary: Cpu, modelMoa: Users, modelFallbacks: Box,+ chatBehavior: MessageCircle, chatAttachments: FileImage,+ workspaceProjects: FolderOpen, workspaceShell: Terminal, workspaceFiles: FileText,+ safetyApprovals: ShieldLock, safetyPrivacy: Lock, safetyCheckpoints: Archive,+ browserProfile: Globe, browserNetwork: Network,+ memoryPersistent: Brain, memoryContext: FileText,+ voiceConversation: Mic, voiceTranscription: FileText, voiceSpeech: Volume2,+ advancedRuntime: Cpu, advancedTools: Wrench, advancedTerminal: Terminal,+ advancedOutput: FileText, advancedDelegation: Users, advancedDesktop: Monitor,+ gatewayConnection: Monitor, gatewayDevices: Network, gatewayManagedUpdates: Download,+ keyboardShortcuts: Keyboard, screenCapture: FileImage,+ notificationAlerts: Bell, notificationSounds: Volume2,+ archivedSessions: Archive, defaultDirectory: FolderOpen,+ vaultCredentials: KeyRound, vaultSources: Lock, appUpdates: Download, uninstall: Trash2+}++export function settingsSubpageIcon(page: SettingsSubpage, fallback: IconComponent): IconComponent {+ return SUBPAGE_ICONS[page.labelKey] ?? fallback+}++export function settingsSubpages(view: SettingsView): readonly SettingsSubpage[] {+ if (view === 'config:appearance') {+ return APPEARANCE_SUBPAGES+ }++ if (view.startsWith('config:')) {+ return CONFIG_SUBPAGES[view.slice('config:'.length)] ?? []+ }++ return OTHER_SUBPAGES[view] ?? []+}++/** Shared by search serialization and saved links that predate subpages. */+export function settingsSubpageForTarget(view: SettingsView, field?: string, setting?: string): string | undefined {+ if (view === 'config:appearance' && setting) {+ return appearanceSubpageForSetting(setting)+ }++ if (view.startsWith('config:') && field) {+ return configSubpageForField(view.slice('config:'.length), field)+ }++ return undefined+}++const LEGACY_SUBPAGE_TARGETS: Record<string, { params: string[]; page: string }> = {+ 'config:model': { params: ['aux'], page: 'auxiliary' },+ sessions: { params: ['session'], page: 'archived' },+ vault: { params: ['kind', 'label', 'origin'], page: 'credentials' }+}++export function settingsSubpageForLegacyLink(view: SettingsView, params: URLSearchParams): string | undefined {+ const target = LEGACY_SUBPAGE_TARGETS[view]++ return target?.params.some(param => params.get(param))+ ? target.page+ : settingsSubpageForTarget(view, params.get('field') ?? undefined, params.get('setting') ?? undefined)+}++export function resolveSettingsSubpage(view: SettingsView, params: URLSearchParams): string | undefined {+ const pages = settingsSubpages(view)+ const requested = settingsSubpageForLegacyLink(view, params) ?? params.get('page')++ return pages.find(page => page.id === requested)?.id ?? pages[0]?.id+}diff --git a/apps/desktop/src/app/settings/uninstall-section.tsx b/apps/desktop/src/app/settings/uninstall-section.tsxindex 14266a61309..dc60b3cc2cb 100644--- a/apps/desktop/src/app/settings/uninstall-section.tsx+++ b/apps/desktop/src/app/settings/uninstall-section.tsx@@ -1,4 +1,4 @@-import { useEffect, useState } from 'react'+import { useContext, useEffect, useState } from 'react'import { Button } from '@/components/ui/button'import type { DesktopUninstallMode, DesktopUninstallSummary } from '@/global'@@ -6,7 +6,7 @@ import { useI18n } from '@/i18n'import { AlertTriangle, Loader2, Trash2 } from '@/lib/icons'import { cn } from '@/lib/utils'-import { SectionHeading } from './primitives'+import { SectionHeading, SettingsBreadcrumbContext } from './primitives'interface ModeOption {mode: DesktopUninstallMode@@ -47,6 +47,7 @@ const OPTIONS: ModeOption[] = []export function UninstallSection() {+ const hasBreadcrumb = useContext(SettingsBreadcrumbContext)const { t } = useI18n()const [summary, setSummary] = useState<DesktopUninstallSummary | null>(null)const [loading, setLoading] = useState(true)@@ -123,8 +124,8 @@ export function UninstallSection() {const pendingOption = OPTIONS.find(opt => opt.mode === pending) ?? nullreturn (- <div className="mx-auto mt-8 w-full max-w-2xl">- <SectionHeading icon={AlertTriangle} title={t.settings.uninstallSection.dangerZone} />+ <div className={cn('mx-auto w-full max-w-2xl', !hasBreadcrumb && 'mt-8')}>+ <SectionHeading icon={AlertTriangle} page title={t.settings.uninstallSection.dangerZone} /><div className="rounded-xl border border-destructive/30 bg-destructive/5 px-4 py-3">{loading ? (diff --git a/apps/desktop/src/app/settings/use-settings-search.ts b/apps/desktop/src/app/settings/use-settings-search.tsindex 89f2066ad90..c538d71b6ea 100644--- a/apps/desktop/src/app/settings/use-settings-search.ts+++ b/apps/desktop/src/app/settings/use-settings-search.ts@@ -14,12 +14,16 @@ import { TRANSLUCENCY_SUPPORTED } from '@/store/translucency'import { useHermesConfigRecord } from '../hooks/use-config-record'import { useOnProfileSwitch } from '../hooks/use-on-profile-switch'+import { SECTIONS } from './constants'+import { OTHER_SUBPAGES } from './other-subpages'import {APPEARANCE_SETTING_IDS,buildConfigSearchEntries,buildCredentialSearchEntries,type SettingsSearchEntry} from './settings-search'+import { settingsSubpages } from './subpages'+import type { SettingsView } from './types'/** An installed plugin row, deep-linkable as `/capabilities?tab=plugins&plugin=<id>`. */export interface PluginSearchEntry {@@ -245,7 +249,33 @@ export function useSettingsSearchCatalog(enabled: boolean) {{ settings: Settings2, tools: Wrench })+ const pageLabels: Record<string, string> = {+ ...t.settings.nav,+ sessions: t.settings.nav.archivedChats+ }++ const subpageEntries: SettingsSearchEntry[] = [+ ...SECTIONS.map(section => ({+ view: `config:${section.id}` as SettingsView,+ label: t.settings.sections[section.id] ?? section.label,+ icon: section.icon+ })),+ ...Object.keys(OTHER_SUBPAGES).map(view => ({+ view: view as SettingsView,+ label: pageLabels[view],+ icon: Settings2+ }))+ ].flatMap(parent => settingsSubpages(parent.view).map(page => ({+ context: parent.label,+ icon: parent.icon,+ id: `settings-page:${parent.view}:${page.id}`,+ keywords: [parent.label, page.id],+ label: t.settings.subpages[page.labelKey],+ target: { view: parent.view, subpage: page.id }+ })))+return {+ subpageEntries,appearanceEntries,configEntries,credentialEntries,diff --git a/apps/desktop/src/app/settings/vault-settings.tsx b/apps/desktop/src/app/settings/vault-settings.tsxindex d0bd0c39ecc..c1d023f13b0 100644--- a/apps/desktop/src/app/settings/vault-settings.tsx+++ b/apps/desktop/src/app/settings/vault-settings.tsx@@ -150,7 +150,11 @@ function buildSecret(form: VaultForm): Record<string, string> {return secret}-export function VaultSettings() {+interface VaultSettingsProps {+ subpage?: string+}++export function VaultSettings({ subpage }: VaultSettingsProps = {}) {const { t } = useI18n()const v = t.settings.vaultconst gatewayState = useStore($gatewayState)@@ -385,148 +389,156 @@ export function VaultSettings() {return (<SettingsContent>- <SectionHeading- aside={- <Button className="gap-1.5" onClick={() => openAdd()} size="sm" type="button" variant="outline">- <Plus className="size-3.5" />- {v.add}- </Button>- }- icon={ShieldLock}- meta={items.length > 0 ? v.count(items.length) : undefined}- title={v.title}- />- <p className="mb-2 text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">- {v.blurb}- </p>-- {!isPending && items.length === 0 && <EmptyState description={v.emptyDesc} title={v.empty} />}-- {items.map(item => (- <ListRow- action={- item.backend && item.backend !== 'local' ? (- <Pill tone="muted">{sourceLabel(item.backend)}</Pill>- ) : (- <Button- aria-label={v.deleteAction}- className="text-(--ui-text-tertiary) hover:text-destructive"- onClick={() => setPendingDelete(item)}- size="icon-sm"- type="button"- variant="ghost"- >- <Trash2 className="size-3.5" />+ {(subpage === undefined || subpage === 'credentials') && (+ <>+ <SectionHeading+ aside={+ <Button className="gap-1.5" onClick={() => openAdd()} size="sm" type="button" variant="outline">+ <Plus className="size-3.5" />+ {v.add}</Button>- )- }- description={- // identifier · origin · date, separated so the row scans as three facts; the origin is- // omitted when the label already IS the host (save-on-page items are labelled by host).- <span className="flex flex-wrap items-center gap-x-2">- {item.identifier && <span className="truncate">{v.identifierShown(item.identifier)}</span>}- {item.origin && item.origin.replace(/^https?:\/\//, '') !== item.label && (- <>- {item.identifier && (- <span aria-hidden className="text-(--ui-text-tertiary)">- ·- </span>- )}- <span className="truncate">{item.origin}</span>- </>- )}- <span aria-hidden className="text-(--ui-text-tertiary)">- ·- </span>- <span>{v.createdOn(formatCreated(item.created_at))}</span>- </span>- }- key={item.id}- title={- <span className="flex items-center gap-2">- <span className="truncate">{item.label}</span>- <Pill tone={item.kind === 'login' ? 'primary' : 'muted'}>{kindLabel(item.kind)}</Pill>- {item.has_otp && <Pill tone="muted">{v.twoFactorBadge}</Pill>}- </span>- }- />- ))}-- {/* Password managers */}- <div className="mt-6">- <SectionHeading icon={KeyRound} title={v.sources.title} />- </div>- <p className="mb-2 text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">- {v.sources.blurb}- </p>- {externalSources.map(source => (- <ListRow- action={- <span className="flex items-center justify-end gap-2">- {source.enabled &&- (source.unlocked ? (- <Button- className="gap-1.5"- disabled={lockSource.isPending}- onClick={() => lockSource.mutate(source.name)}- size="sm"- type="button"- variant="ghost"- >- <Lock className="size-3.5" />- {v.sources.lock}- </Button>+ }+ icon={ShieldLock}+ meta={items.length > 0 ? v.count(items.length) : undefined}+ page+ title={v.title}+ />+ <p className="mb-2 text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">+ {v.blurb}+ </p>++ {!isPending && items.length === 0 && <EmptyState description={v.emptyDesc} title={v.empty} />}++ {items.map(item => (+ <ListRow+ action={+ item.backend && item.backend !== 'local' ? (+ <Pill tone="muted">{sourceLabel(item.backend)}</Pill>) : (<Button- className="gap-1.5"- onClick={() => setUnlockTarget(source)}- size="sm"+ aria-label={v.deleteAction}+ className="text-(--ui-text-tertiary) hover:text-destructive"+ onClick={() => setPendingDelete(item)}+ size="icon-sm"type="button"- variant="outline"+ variant="ghost">- <KeyRound className="size-3.5" />- {v.sources.unlock}+ <Trash2 className="size-3.5" /></Button>- ))}- {source.installed && (- <Switch- aria-label={source.display_name}- checked={source.enabled}- disabled={setSourceEnabled.isPending}- onCheckedChange={enabled => {- triggerHaptic('selection')- setSourceEnabled.mutate({ name: source.name, enabled })- }}- />- )}- </span>- }- description={- !source.installed- ? v.sources.notInstalled(source.display_name)- : source.enabled- ? source.unlocked- ? v.sources.unlockedDesc- : v.sources.lockedDesc- : v.sources.disabledDesc- }- key={source.name}- title={- <span className="flex items-center gap-2">- <span>{source.display_name}</span>- <Pill tone={source.enabled && source.unlocked ? 'primary' : 'muted'}>- {!source.installed- ? v.sources.statusNotDetected- : !source.enabled- ? v.sources.statusOff- : source.unlocked- ? v.sources.statusUnlocked- : v.sources.statusLocked}- </Pill>- </span>- }- />- ))}+ )+ }+ description={+ // identifier · origin · date, separated so the row scans as three facts; the origin is+ // omitted when the label already IS the host (save-on-page items are labelled by host).+ <span className="flex flex-wrap items-center gap-x-2">+ {item.identifier && <span className="truncate">{v.identifierShown(item.identifier)}</span>}+ {item.origin && item.origin.replace(/^https?:\/\//, '') !== item.label && (+ <>+ {item.identifier && (+ <span aria-hidden className="text-(--ui-text-tertiary)">+ ·+ </span>+ )}+ <span className="truncate">{item.origin}</span>+ </>+ )}+ <span aria-hidden className="text-(--ui-text-tertiary)">+ ·+ </span>+ <span>{v.createdOn(formatCreated(item.created_at))}</span>+ </span>+ }+ key={item.id}+ title={+ <span className="flex items-center gap-2">+ <span className="truncate">{item.label}</span>+ <Pill tone={item.kind === 'login' ? 'primary' : 'muted'}>{kindLabel(item.kind)}</Pill>+ {item.has_otp && <Pill tone="muted">{v.twoFactorBadge}</Pill>}+ </span>+ }+ />+ ))}+ </>+ )}++ {(subpage === undefined || subpage === 'sources') && (+ <>+ <div className={subpage === undefined ? 'mt-6' : undefined}>+ <SectionHeading icon={KeyRound} page title={v.sources.title} />+ </div>+ <p className="mb-2 text-[length:var(--conversation-caption-font-size)] leading-(--conversation-caption-line-height) text-(--ui-text-tertiary)">+ {v.sources.blurb}+ </p>+ {externalSources.map(source => (+ <ListRow+ action={+ <span className="flex items-center justify-end gap-2">+ {source.enabled &&+ (source.unlocked ? (+ <Button+ className="gap-1.5"+ disabled={lockSource.isPending}+ onClick={() => lockSource.mutate(source.name)}+ size="sm"+ type="button"+ variant="ghost"+ >+ <Lock className="size-3.5" />+ {v.sources.lock}+ </Button>+ ) : (+ <Button+ className="gap-1.5"+ onClick={() => setUnlockTarget(source)}+ size="sm"+ type="button"+ variant="outline"+ >+ <KeyRound className="size-3.5" />+ {v.sources.unlock}+ </Button>+ ))}+ {source.installed && (+ <Switch+ aria-label={source.display_name}+ checked={source.enabled}+ disabled={setSourceEnabled.isPending}+ onCheckedChange={enabled => {+ triggerHaptic('selection')+ setSourceEnabled.mutate({ name: source.name, enabled })+ }}+ />+ )}+ </span>+ }+ description={+ !source.installed+ ? v.sources.notInstalled(source.display_name)+ : source.enabled+ ? source.unlocked+ ? v.sources.unlockedDesc+ : v.sources.lockedDesc+ : v.sources.disabledDesc+ }+ key={source.name}+ title={+ <span className="flex items-center gap-2">+ <span>{source.display_name}</span>+ <Pill tone={source.enabled && source.unlocked ? 'primary' : 'muted'}>+ {!source.installed+ ? v.sources.statusNotDetected+ : !source.enabled+ ? v.sources.statusOff+ : source.unlocked+ ? v.sources.statusUnlocked+ : v.sources.statusLocked}+ </Pill>+ </span>+ }+ />+ ))}+ </>+ )}{/* Unlock dialog */}<Dialog onOpenChange={open => !open && closeUnlock()} open={unlockTarget !== null}>diff --git a/apps/desktop/src/i18n/ar.ts b/apps/desktop/src/i18n/ar.tsindex e2468fa5dc2..374187684e5 100644--- a/apps/desktop/src/i18n/ar.ts+++ b/apps/desktop/src/i18n/ar.ts@@ -367,6 +367,56 @@ export const ar = defineLocale({noResults: 'لا توجد لغة مطابقة'},settings: {+ subpages: {+ appearanceTheme: 'السمة',+ appearanceTypography: 'الخطوط والتحجيم',+ appearanceWindowLayout: 'النافذة والتخطيط',+ appearanceChatDisplay: 'عرض المحادثة',+ appearancePet: 'الحيوان الأليف',+ appearanceGeneral: 'عام',+ modelMain: 'النموذج الرئيسي',+ modelAuxiliary: 'النماذج المساعدة',+ modelMoa: 'مزيج الوكلاء',+ modelFallbacks: 'النماذج البديلة',+ chatBehavior: 'السلوك',+ chatAttachments: 'المرفقات',+ workspaceProjects: 'المشاريع والاكتشاف',+ workspaceShell: 'بيئة الصدفة',+ workspaceFiles: 'الملفات والتنفيذ',+ safetyApprovals: 'الموافقات',+ safetyPrivacy: 'الخصوصية والشبكة',+ safetyCheckpoints: 'نقاط الاستعادة',+ browserProfile: 'ملف المتصفح',+ browserNetwork: 'العناوين المحلية والخاصة',+ memoryPersistent: 'الذاكرة الدائمة',+ memoryContext: 'السياق والضغط',+ voiceConversation: 'المحادثة الصوتية',+ voiceTranscription: 'تحويل الكلام إلى نص',+ voiceSpeech: 'تحويل النص إلى كلام',+ advancedRuntime: 'حدود الوكيل',+ advancedTools: 'الوصول إلى الأدوات',+ advancedTerminal: 'خلفية الطرفية',+ advancedOutput: 'حدود المخرجات',+ advancedDelegation: 'الوكلاء الفرعيون',+ advancedDesktop: 'سطح المكتب وبدء التشغيل',+ gatewayConnection: 'هذه النافذة',+ gatewayDevices: 'الاتصالات المحفوظة',+ gatewayManagedUpdates: 'التحديثات البعيدة',+ gatewayManagedUpdatesUnavailable: 'تتطلب التحديثات البعيدة إصدار سطح مكتب يدعم تحديثات SSH المُدارة.',+ gatewayManagedUpdatesEmpty: 'أضف اتصال SSH في الاتصالات المحفوظة لإدارة تحديثاته هنا.',+ keyboardShortcuts: 'تعيينات المفاتيح',+ screenCapture: 'التقاط الشاشة',+ notificationAlerts: 'تنبيهات سطح المكتب',+ notificationSounds: 'الأصوات',+ archivedSessions: 'الأرشفة والاحتفاظ',+ defaultDirectory: 'مجلد المشروع الافتراضي',+ vaultCredentials: 'بيانات الاعتماد المحفوظة',+ vaultSources: 'مديرو كلمات المرور',+ appUpdates: 'الإصدار والتحديثات',+ uninstall: 'إلغاء التثبيت',+ billingOverview: 'نظرة عامة',+ billingPlans: 'الخطط'+ },closeSettings: 'إغلاق الإعدادات',exportConfig: 'تصدير الإعدادات',importConfig: 'استيراد الإعدادات',diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.tsindex 7d06005e472..6fce75d0748 100644--- a/apps/desktop/src/i18n/en.ts+++ b/apps/desktop/src/i18n/en.ts@@ -487,6 +487,56 @@ export const en: Translations = {},settings: {+ subpages: {+ appearanceTheme: 'Theme',+ appearanceTypography: 'Typography',+ appearanceWindowLayout: 'Window & layout',+ appearanceChatDisplay: 'Chat display',+ appearancePet: 'Pet',+ appearanceGeneral: 'General',+ modelMain: 'Main model',+ modelAuxiliary: 'Auxiliary models',+ modelMoa: 'Mixture of Agents',+ modelFallbacks: 'Fallback models',+ chatBehavior: 'Behavior',+ chatAttachments: 'Attachments',+ workspaceProjects: 'Projects & discovery',+ workspaceShell: 'Shell environment',+ workspaceFiles: 'Files & execution',+ safetyApprovals: 'Approvals',+ safetyPrivacy: 'Privacy & network',+ safetyCheckpoints: 'Checkpoints',+ browserProfile: 'Browser profile',+ browserNetwork: 'Local & private URLs',+ memoryPersistent: 'Persistent memory',+ memoryContext: 'Context & compression',+ voiceConversation: 'Voice conversation',+ voiceTranscription: 'Speech to text',+ voiceSpeech: 'Text to speech',+ advancedRuntime: 'Agent limits',+ advancedTools: 'Tool access',+ advancedTerminal: 'Terminal backend',+ advancedOutput: 'Output limits',+ advancedDelegation: 'Subagents',+ advancedDesktop: 'Desktop & startup',+ gatewayConnection: 'This window',+ gatewayDevices: 'Saved connections',+ gatewayManagedUpdates: 'Remote updates',+ gatewayManagedUpdatesUnavailable: 'Remote updates need a desktop version with managed SSH update support.',+ gatewayManagedUpdatesEmpty: 'Add an SSH connection in Saved connections to manage its updates here.',+ keyboardShortcuts: 'Key bindings',+ screenCapture: 'Screen capture',+ notificationAlerts: 'Desktop alerts',+ notificationSounds: 'Sounds',+ archivedSessions: 'Archive & retention',+ defaultDirectory: 'Default project folder',+ vaultCredentials: 'Saved credentials',+ vaultSources: 'Password managers',+ appUpdates: 'Version & updates',+ uninstall: 'Uninstall',+ billingOverview: 'Overview',+ billingPlans: 'Plans'+ },closeSettings: 'Close settings',exportConfig: 'Export config',importConfig: 'Import config',diff --git a/apps/desktop/src/i18n/ja.ts b/apps/desktop/src/i18n/ja.tsindex e324c6f9bb4..6c22b9a13e9 100644--- a/apps/desktop/src/i18n/ja.ts+++ b/apps/desktop/src/i18n/ja.ts@@ -303,6 +303,56 @@ export const ja = defineLocale({},settings: {+ subpages: {+ appearanceTheme: 'テーマ',+ appearanceTypography: 'フォントと表示倍率',+ appearanceWindowLayout: 'ウィンドウとレイアウト',+ appearanceChatDisplay: 'チャット表示',+ appearancePet: 'ペット',+ appearanceGeneral: '一般',+ modelMain: 'メインモデル',+ modelAuxiliary: '補助モデル',+ modelMoa: 'エージェントの協調',+ modelFallbacks: '代替モデル',+ chatBehavior: '動作',+ chatAttachments: '添付ファイル',+ workspaceProjects: 'プロジェクトと検出',+ workspaceShell: 'シェル環境',+ workspaceFiles: 'ファイルと実行',+ safetyApprovals: '承認',+ safetyPrivacy: 'プライバシーとネットワーク',+ safetyCheckpoints: 'チェックポイント',+ browserProfile: 'ブラウザープロファイル',+ browserNetwork: 'ローカル・プライベート URL',+ memoryPersistent: '永続メモリ',+ memoryContext: 'コンテキストと圧縮',+ voiceConversation: '音声会話',+ voiceTranscription: '音声認識',+ voiceSpeech: '音声合成',+ advancedRuntime: 'エージェントの制限',+ advancedTools: 'ツールへのアクセス',+ advancedTerminal: 'ターミナルのバックエンド',+ advancedOutput: '出力の制限',+ advancedDelegation: 'サブエージェント',+ advancedDesktop: 'デスクトップと起動',+ gatewayConnection: 'このウィンドウ',+ gatewayDevices: '保存済みの接続',+ gatewayManagedUpdates: 'リモート更新',+ gatewayManagedUpdatesUnavailable: 'リモート更新には、管理対象 SSH の更新に対応したデスクトップ版が必要です。',+ gatewayManagedUpdatesEmpty: '保存済みの接続に SSH 接続を追加すると、ここで更新を管理できます。',+ keyboardShortcuts: 'キー割り当て',+ screenCapture: '画面キャプチャ',+ notificationAlerts: 'デスクトップ通知',+ notificationSounds: 'サウンド',+ archivedSessions: 'アーカイブと保持',+ defaultDirectory: '既定のプロジェクトフォルダー',+ vaultCredentials: '保存済みの認証情報',+ vaultSources: 'パスワードマネージャー',+ appUpdates: 'バージョンと更新',+ uninstall: 'アンインストール',+ billingOverview: '概要',+ billingPlans: 'プラン'+ },plugins: {installModal: {installFromGit: 'Git からインストール',diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.tsindex 5e0d66b9665..3e05d8cbdb5 100644--- a/apps/desktop/src/i18n/ru.ts+++ b/apps/desktop/src/i18n/ru.ts@@ -406,6 +406,56 @@ export const ru = defineLocale({noResults: 'Языки не найдены'},settings: {+ subpages: {+ appearanceTheme: 'Тема',+ appearanceTypography: 'Шрифты и масштаб',+ appearanceWindowLayout: 'Окно и расположение',+ appearanceChatDisplay: 'Отображение чата',+ appearancePet: 'Питомец',+ appearanceGeneral: 'Общие',+ modelMain: 'Основная модель',+ modelAuxiliary: 'Вспомогательные модели',+ modelMoa: 'Совместная работа агентов',+ modelFallbacks: 'Резервные модели',+ chatBehavior: 'Поведение',+ chatAttachments: 'Вложения',+ workspaceProjects: 'Проекты и поиск',+ workspaceShell: 'Среда оболочки',+ workspaceFiles: 'Файлы и выполнение',+ safetyApprovals: 'Подтверждения',+ safetyPrivacy: 'Приватность и сеть',+ safetyCheckpoints: 'Контрольные точки',+ browserProfile: 'Профиль браузера',+ browserNetwork: 'Локальные и частные URL',+ memoryPersistent: 'Постоянная память',+ memoryContext: 'Контекст и сжатие',+ voiceConversation: 'Голосовой разговор',+ voiceTranscription: 'Речь в текст',+ voiceSpeech: 'Текст в речь',+ advancedRuntime: 'Ограничения агента',+ advancedTools: 'Доступ к инструментам',+ advancedTerminal: 'Сервер терминала',+ advancedOutput: 'Ограничения вывода',+ advancedDelegation: 'Субагенты',+ advancedDesktop: 'Приложение и запуск',+ gatewayConnection: 'Это окно',+ gatewayDevices: 'Сохранённые подключения',+ gatewayManagedUpdates: 'Удалённые обновления',+ gatewayManagedUpdatesUnavailable: 'Нужна версия приложения с поддержкой управляемых обновлений SSH.',+ gatewayManagedUpdatesEmpty: 'Добавьте SSH в сохранённые подключения, чтобы управлять его обновлениями здесь.',+ keyboardShortcuts: 'Назначения клавиш',+ screenCapture: 'Захват экрана',+ notificationAlerts: 'Системные уведомления',+ notificationSounds: 'Звуки',+ archivedSessions: 'Архив и хранение',+ defaultDirectory: 'Папка проекта по умолчанию',+ vaultCredentials: 'Сохранённые учётные данные',+ vaultSources: 'Менеджеры паролей',+ appUpdates: 'Версия и обновления',+ uninstall: 'Удаление',+ billingOverview: 'Обзор',+ billingPlans: 'Тарифы'+ },closeSettings: 'Закрыть настройки',exportConfig: 'Экспорт конфигурации',importConfig: 'Импорт конфигурации',diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.tsindex fcaa17887c1..16c70e05c8a 100644--- a/apps/desktop/src/i18n/types.ts+++ b/apps/desktop/src/i18n/types.ts@@ -432,6 +432,7 @@ export interface Translations {}settings: {+ subpages: Record<string, string>closeSettings: stringexportConfig: stringimportConfig: stringdiff --git a/apps/desktop/src/i18n/zh-hant.ts b/apps/desktop/src/i18n/zh-hant.tsindex f0d056f0435..1b44dfceb80 100644--- a/apps/desktop/src/i18n/zh-hant.ts+++ b/apps/desktop/src/i18n/zh-hant.ts@@ -294,6 +294,56 @@ export const zhHant = defineLocale({},settings: {+ subpages: {+ appearanceTheme: '主題',+ appearanceTypography: '字體與縮放',+ appearanceWindowLayout: '視窗與佈局',+ appearanceChatDisplay: '聊天顯示',+ appearancePet: '寵物',+ appearanceGeneral: '一般',+ modelMain: '主要模型',+ modelAuxiliary: '輔助模型',+ modelMoa: '多代理協作',+ modelFallbacks: '備用模型',+ chatBehavior: '行為',+ chatAttachments: '附件',+ workspaceProjects: '專案與探索',+ workspaceShell: 'Shell 環境',+ workspaceFiles: '檔案與執行',+ safetyApprovals: '核准',+ safetyPrivacy: '隱私與網路',+ safetyCheckpoints: '檢查點',+ browserProfile: '瀏覽器設定檔',+ browserNetwork: '本機與私人網址',+ memoryPersistent: '持久記憶',+ memoryContext: '上下文與壓縮',+ voiceConversation: '語音對話',+ voiceTranscription: '語音轉文字',+ voiceSpeech: '文字轉語音',+ advancedRuntime: '代理限制',+ advancedTools: '工具存取',+ advancedTerminal: '終端後端',+ advancedOutput: '輸出限制',+ advancedDelegation: '子代理',+ advancedDesktop: '桌面與啟動',+ gatewayConnection: '目前視窗',+ gatewayDevices: '已儲存的連線',+ gatewayManagedUpdates: '遠端更新',+ gatewayManagedUpdatesUnavailable: '遠端更新需要支援受管理 SSH 更新的桌面版本。',+ gatewayManagedUpdatesEmpty: '請在已儲存的連線中新增 SSH 連線,即可在此管理更新。',+ keyboardShortcuts: '按鍵繫結',+ screenCapture: '螢幕擷取',+ notificationAlerts: '桌面通知',+ notificationSounds: '聲音',+ archivedSessions: '封存與保留',+ defaultDirectory: '預設專案資料夾',+ vaultCredentials: '已儲存的憑證',+ vaultSources: '密碼管理員',+ appUpdates: '版本與更新',+ uninstall: '解除安裝',+ billingOverview: '概覽',+ billingPlans: '方案'+ },plugins: {installModal: {installFromGit: '從 Git 安裝',diff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.tsindex 708738c8ed4..14fc8fedaae 100644--- a/apps/desktop/src/i18n/zh.ts+++ b/apps/desktop/src/i18n/zh.ts@@ -442,6 +442,56 @@ export const zh = defineLocale({},settings: {+ subpages: {+ appearanceTheme: '主题',+ appearanceTypography: '字体与缩放',+ appearanceWindowLayout: '窗口与布局',+ appearanceChatDisplay: '聊天显示',+ appearancePet: '宠物',+ appearanceGeneral: '常规',+ modelMain: '主模型',+ modelAuxiliary: '辅助模型',+ modelMoa: '多智能体协作',+ modelFallbacks: '备用模型',+ chatBehavior: '行为',+ chatAttachments: '附件',+ workspaceProjects: '项目与发现',+ workspaceShell: 'Shell 环境',+ workspaceFiles: '文件与执行',+ safetyApprovals: '审批',+ safetyPrivacy: '隐私与网络',+ safetyCheckpoints: '检查点',+ browserProfile: '浏览器配置',+ browserNetwork: '本地与私有网址',+ memoryPersistent: '持久记忆',+ memoryContext: '上下文与压缩',+ voiceConversation: '语音对话',+ voiceTranscription: '语音转文字',+ voiceSpeech: '文字转语音',+ advancedRuntime: '智能体限制',+ advancedTools: '工具访问',+ advancedTerminal: '终端后端',+ advancedOutput: '输出限制',+ advancedDelegation: '子智能体',+ advancedDesktop: '桌面与启动',+ gatewayConnection: '当前窗口',+ gatewayDevices: '已保存的连接',+ gatewayManagedUpdates: '远程更新',+ gatewayManagedUpdatesUnavailable: '远程更新需要支持托管 SSH 更新的桌面版本。',+ gatewayManagedUpdatesEmpty: '请在已保存的连接中添加 SSH 连接,即可在此管理更新。',+ keyboardShortcuts: '按键绑定',+ screenCapture: '屏幕捕获',+ notificationAlerts: '桌面通知',+ notificationSounds: '声音',+ archivedSessions: '归档与保留',+ defaultDirectory: '默认项目文件夹',+ vaultCredentials: '已保存的凭据',+ vaultSources: '密码管理器',+ appUpdates: '版本与更新',+ uninstall: '卸载',+ billingOverview: '概览',+ billingPlans: '套餐'+ },closeSettings: '关闭设置',exportConfig: '导出配置',importConfig: '导入配置',