The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
feat(desktop): hideable profile rail with a statusbar profile dropdown stand-in
teknium1043632e28369
diff --git a/apps/desktop/src/app/chat/sidebar/filter-menu.tsx b/apps/desktop/src/app/chat/sidebar/filter-menu.tsxindex e593ebec6f8..657db9997de 100644--- a/apps/desktop/src/app/chat/sidebar/filter-menu.tsx+++ b/apps/desktop/src/app/chat/sidebar/filter-menu.tsx@@ -59,6 +59,7 @@ import {requestProfileCreate,toggleShowAllProfiles} from '@/store/profile'+import { $profileRailVisible, toggleProfileRailVisible } from '@/store/profile-rail-prefs'import { runImportProfileFlow } from '@/store/profile-share'import { $projectTree } from '@/store/projects'import type { PullRequestBucket } from '@/store/pull-requests'@@ -157,6 +158,7 @@ export function SidebarFilterMenu({ className }: { className?: string }) {const ordering = useStore($sidebarOrdering)const rowMeta = useStore($sidebarRowMeta)const cardRows = useStore($sidebarCardRows)+ const profileRailVisible = useStore($profileRailVisible)const showAllSessions = useStore($sidebarShowAllSessions)const statusFilter = useStore($sidebarStatusFilter)const projectFilter = useStore($sidebarProjectFilter)@@ -306,6 +308,15 @@ export function SidebarFilterMenu({ className }: { className?: string }) {onCheck={() => setSidebarCardRows(!cardRows)}option={{ icon: 'inbox', id: 'card-rows', label: 'Inbox style' }}/>++ {/* The colored strip at the sidebar foot. Off, the statusbar grows a+ profile dropdown beside the gateway switcher, so nobody loses the+ door — this is for people whose profiles are bots, not workspaces. */}+ <OptionCheckbox+ checked={profileRailVisible}+ onCheck={toggleProfileRailVisible}+ option={{ icon: 'organization', id: 'profile-rail', label: t.sidebar.profileRail }}+ /></DropdownMenuGroup><DropdownMenuSeparator />diff --git a/apps/desktop/src/app/chat/sidebar/index.tsx b/apps/desktop/src/app/chat/sidebar/index.tsxindex f5b7ed2cb60..3268772faa5 100644--- a/apps/desktop/src/app/chat/sidebar/index.tsx+++ b/apps/desktop/src/app/chat/sidebar/index.tsx@@ -82,6 +82,7 @@ import {normalizeProfileKey,sidebarProfileForScope} from '@/store/profile'+import { $profileRailVisible } from '@/store/profile-rail-prefs'import {$activeProjectId,$newProjectDropPlacement,@@ -497,6 +498,7 @@ export function ChatSidebar({}, [])const activeSidebarSessionId = currentView === 'chat' ? selectedSessionId : null+ const profileRailVisible = useStore($profileRailVisible)const dndSensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 6 } }),@@ -1930,9 +1932,13 @@ export function ChatSidebar({{!showSessionSections && <SidebarBlankState onNewProject={openProjectCreate} />}- <div className="shrink-0 px-0.5 pb-1 pt-0.5">- <ProfileRail />- </div>+ {/* Off, the statusbar's profile dropdown (beside the gateway switcher)+ takes over — the rail is a duplicate door for bot-only setups. */}+ {profileRailVisible && (+ <div className="shrink-0 px-0.5 pb-1 pt-0.5">+ <ProfileRail />+ </div>+ )}</SidebarContent><ProjectDialog />{/* One mount for the whole app. The header of WorktreeDialog tells why. */}diff --git a/apps/desktop/src/app/chat/sidebar/profile-dropdown-switcher.test.tsx b/apps/desktop/src/app/chat/sidebar/profile-dropdown-switcher.test.tsxnew file mode 100644index 00000000000..89937fc0ae9--- /dev/null+++ b/apps/desktop/src/app/chat/sidebar/profile-dropdown-switcher.test.tsx@@ -0,0 +1,90 @@+// @vitest-environment jsdom+import { act, cleanup, fireEvent, render, screen } from '@testing-library/react'+import { atom } from 'nanostores'+import { afterEach, expect, it, vi } from 'vitest'++import { $profileRailVisible } from '@/store/profile-rail-prefs'++import { ProfileSwitcher } from './profile-dropdown-switcher'++// With the colored rail hidden, the statusbar's profile dropdown is the ONLY+// door to switching profiles — it must list every profile of the active+// gateway and select through the same store action the rail uses.++const selectProfile = vi.fn()+const setShowAllProfiles = vi.fn()++vi.mock('react-router', () => ({ useNavigate: () => vi.fn() }))++vi.mock('@/i18n', () => ({+ useI18n: () => ({+ t: {+ profiles: {+ allProfiles: 'All profiles',+ fleet: { onGateway: (name: string, gateway: string) => `${name} · ${gateway}` },+ importProfile: 'Import profile…',+ manageProfiles: 'Manage profiles…',+ newProfile: 'New profile',+ switchConnectionFailed: (name: string) => `Could not connect to ${name}`,+ title: 'Profiles'+ }+ }+ })+}))++vi.mock('@/store/profile', () => ({+ $activeGatewayProfile: atom('default'),+ $profileColors: atom({}),+ $profileCreateRequest: atom(0),+ $profileOrder: atom([]),+ $profiles: atom([+ { is_default: true, name: 'default' },+ { is_default: false, name: 'clippy' }+ ]),+ $showAllProfiles: atom(false),+ ALL_PROFILES: '__all__',+ normalizeProfileKey: (name: string) => name,+ profileLabel: (profile: { name: string }) => profile.name,+ refreshActiveProfile: vi.fn().mockResolvedValue(undefined),+ selectProfile: (name: string) => selectProfile(name),+ setShowAllProfiles: (value: boolean) => setShowAllProfiles(value),+ sortByProfileOrder: (profiles: Array<{ name: string }>) => profiles+}))++vi.mock('@/store/connections', () => ({+ $activeConnectionId: atom<null | string>(null),+ $connectionsRegistry: atom(null),+ $hasMultipleConnections: atom(false),+ selectConnection: vi.fn()+}))++vi.mock('@/store/profile-share', () => ({ runImportProfileFlow: vi.fn() }))+vi.mock('./use-profile-prewarm', () => ({ useProfilePrewarm: () => ({ cancelPrewarm: vi.fn(), startPrewarm: vi.fn() }) }))+vi.mock('./use-fleet-roster', () => ({ useFleetRoster: () => undefined }))+vi.mock('../../profiles/create-profile-dialog', () => ({ CreateProfileDialog: () => null }))++afterEach(() => {+ cleanup()+ $profileRailVisible.set(true)+ vi.clearAllMocks()+})++it('switches profiles from the statusbar dropdown while the rail is hidden', async () => {+ act(() => $profileRailVisible.set(false))+ render(<ProfileSwitcher compact />)++ const trigger = screen.getByRole('button', { name: 'Profiles: default' })+ await act(async () => {+ fireEvent.pointerDown(trigger, { button: 0, ctrlKey: false, pointerType: 'mouse' })+ await Promise.resolve()+ })++ const clippy = await screen.findByRole('menuitemradio', { name: /clippy/ })+ await act(async () => {+ fireEvent.click(clippy)+ await Promise.resolve()+ })++ expect(selectProfile).toHaveBeenCalledWith('clippy')+ expect(setShowAllProfiles).not.toHaveBeenCalled()+})diff --git a/apps/desktop/src/app/chat/sidebar/profile-dropdown-switcher.tsx b/apps/desktop/src/app/chat/sidebar/profile-dropdown-switcher.tsxnew file mode 100644index 00000000000..85caf0063f3--- /dev/null+++ b/apps/desktop/src/app/chat/sidebar/profile-dropdown-switcher.tsx@@ -0,0 +1,275 @@+import { useStore } from '@nanostores/react'+import { useEffect, useMemo, useRef, useState } from 'react'+import { useNavigate } from 'react-router'++import { Button } from '@/components/ui/button'+import { Codicon } from '@/components/ui/codicon'+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuLabel,+ DropdownMenuRadioGroup,+ DropdownMenuRadioItem,+ dropdownMenuSectionLabel,+ DropdownMenuSeparator,+ DropdownMenuTrigger+} from '@/components/ui/dropdown-menu'+import { ProfileGlyph } from '@/components/ui/profile-glyph'+import { useI18n } from '@/i18n'+import { triggerHaptic } from '@/lib/haptics'+import { Loader2 } from '@/lib/icons'+import { resolveProfileColor } from '@/lib/profile-color'+import { cn } from '@/lib/utils'+import { $activeConnectionId, $connectionsRegistry, $hasMultipleConnections, selectConnection } from '@/store/connections'+import { $fleetRoster } from '@/store/fleet-roster'+import { notifyError } from '@/store/notifications'+import {+ $activeGatewayProfile,+ $profileColors,+ $profileCreateRequest,+ $profileOrder,+ $profiles,+ $showAllProfiles,+ ALL_PROFILES,+ normalizeProfileKey,+ profileLabel,+ refreshActiveProfile,+ selectProfile,+ setShowAllProfiles,+ sortByProfileOrder+} from '@/store/profile'+import { runImportProfileFlow } from '@/store/profile-share'++import { CreateProfileDialog } from '../../profiles/create-profile-dialog'+import { PROFILES_ROUTE } from '../../routes'++import { ConnectionGlyph } from './connection-glyph'+import { buildRestGroups, type FleetAgent, fleetRouteKey } from './fleet-rail'+import { useFleetRoster } from './use-fleet-roster'+import { useProfilePrewarm } from './use-profile-prewarm'++/**+ * The profile picker that sits beside the gateway switcher in the statusbar+ * while the colored rail is hidden — the same choices the rail offers (this+ * gateway's profiles, every other gateway's agents in fleet mode, new / import+ * / manage) in a dropdown that reads like its neighbour. The rail keeps the+ * gestures that need squares (drag-order, hold-to-recolor); this is the+ * plain-dropdown door for people who run profiles as bots and don't want a+ * strip of them.+ */+export function ProfileSwitcher({ compact = false }: { compact?: boolean }) {+ const { t } = useI18n()+ const p = t.profiles+ const navigate = useNavigate()+ const profiles = useStore($profiles)+ const order = useStore($profileOrder)+ const colors = useStore($profileColors)+ const gatewayProfile = useStore($activeGatewayProfile)+ const showAll = useStore($showAllProfiles)+ const multipleConnections = useStore($hasMultipleConnections)+ const registry = useStore($connectionsRegistry)+ const activeConnectionId = useStore($activeConnectionId)+ const roster = useStore($fleetRoster)+ const [createOpen, setCreateOpen] = useState(false)+ const [pendingRoute, setPendingRoute] = useState<null | string>(null)++ useFleetRoster(multipleConnections)++ // The `profile.create` hotkey bumps this request atom; the rail answers it+ // while mounted, so with the rail hidden this picker owns the dialog instead.+ const createRequest = useStore($profileCreateRequest)+ const lastCreateRef = useRef(createRequest)++ // eslint-disable-next-line no-restricted-syntax -- legitimate non-atom ref write (see eslint rule comment)+ useEffect(() => {+ if (createRequest === lastCreateRef.current) {+ return+ }++ lastCreateRef.current = createRequest+ setCreateOpen(true)+ }, [createRequest])++ const connections = registry?.connections++ const restGroups = useMemo(+ () =>+ multipleConnections ? buildRestGroups({ activeConnectionId, connections: connections ?? [], order, roster }) : [],+ [activeConnectionId, connections, multipleConnections, order, roster]+ )++ const activeKey = normalizeProfileKey(gatewayProfile)+ const defaultProfile = profiles.find(profile => profile.is_default)++ const named = sortByProfileOrder(+ profiles.filter(profile => !profile.is_default),+ order+ )++ const ordered = defaultProfile ? [defaultProfile, ...named] : named+ const active = showAll ? undefined : profiles.find(profile => normalizeProfileKey(profile.name) === activeKey)+ const value = showAll ? ALL_PROFILES : (active?.name ?? '')++ const choose = (name: string) => {+ triggerHaptic('selection')++ if (name === ALL_PROFILES) {+ setShowAllProfiles(true)+ } else {+ selectProfile(name)+ }+ }++ const switchToRest = (agent: FleetAgent) => {+ const key = fleetRouteKey(agent.connectionId, agent.profile)+ triggerHaptic('selection')+ setPendingRoute(key)++ void selectConnection(agent.connectionId, { profile: agent.profile })+ .catch((error: unknown) => notifyError(error, p.switchConnectionFailed(agent.connectionLabel)))+ .finally(() => setPendingRoute(current => (current === key ? null : current)))+ }++ const triggerLabel = showAll ? p.allProfiles : active ? profileLabel(active) : p.title++ return (+ <div+ aria-busy={pendingRoute !== null}+ aria-label={p.title}+ className={cn('min-w-16 shrink overflow-hidden', compact ? 'h-full max-w-40' : 'max-w-72')}+ data-slot="profile-switcher"+ role="group"+ >+ <DropdownMenu>+ <DropdownMenuTrigger asChild>+ <Button+ aria-label={`${p.title}: ${triggerLabel}`}+ className={cn(+ 'w-full min-w-0 justify-between overflow-hidden px-1 text-(--ui-text-secondary) data-[state=open]:bg-(--ui-control-active-background) data-[state=open]:text-foreground',+ compact && 'h-full min-h-0 rounded-none px-1.5 text-[0.6875rem] font-normal'+ )}+ size="xs"+ type="button"+ variant="ghost"+ >+ <span className="flex min-w-0 flex-1 items-center gap-1 overflow-hidden">+ {pendingRoute !== null ? (+ <Loader2 aria-hidden="true" className="size-3 shrink-0 animate-spin" />+ ) : showAll || !active ? (+ <Codicon aria-hidden="true" className="shrink-0" name="layers" size="0.75rem" />+ ) : (+ <ProfileGlyph+ aria-hidden="true"+ className="size-3 text-[0.4375rem]"+ color={resolveProfileColor(active.name, colors)}+ isDefault={active.is_default}+ name={active.name}+ />+ )}+ <span className="truncate">{triggerLabel}</span>+ </span>+ <Codicon aria-hidden="true" className="shrink-0 opacity-60" name="chevron-down" size="0.875rem" />+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="start" className="min-w-48 max-w-72" collisionPadding={8} side="top">+ <DropdownMenuRadioGroup onValueChange={choose} value={value}>+ {ordered.map(profile => (+ <ProfileItem+ color={resolveProfileColor(profile.name, colors)}+ isDefault={profile.is_default}+ key={profile.name}+ label={profileLabel(profile)}+ name={profile.name}+ />+ ))}+ {/* Nothing to widen to with one profile: the ALL view only exists+ once a second profile does (the rail hides its toggle then too). */}+ {profiles.length > 1 && (+ <DropdownMenuRadioItem className="min-w-0" value={ALL_PROFILES}>+ <span className="flex min-w-0 items-center gap-1.5">+ <Codicon aria-hidden="true" className="text-(--ui-text-tertiary)" name="layers" size="0.875rem" />+ <span className="truncate">{p.allProfiles}</span>+ </span>+ </DropdownMenuRadioItem>+ )}+ </DropdownMenuRadioGroup>+ {restGroups.map(group => (+ <div data-connection-id={group.connectionId} data-slot="profile-switcher-gateway" key={group.connectionId}>+ <DropdownMenuSeparator />+ <DropdownMenuLabel className={cn(dropdownMenuSectionLabel, 'flex items-center gap-1.5')}>+ <ConnectionGlyph connection={group} />+ <span className="truncate">{group.label}</span>+ {!group.reachable && <span aria-hidden="true" className="size-1.5 shrink-0 rounded-full bg-amber-500" />}+ </DropdownMenuLabel>+ {[group.defaultAgent, ...group.named].map(agent => (+ <DropdownMenuItem+ aria-label={p.fleet.onGateway(agent.profile, group.label)}+ className="min-w-0"+ key={agent.profile}+ onSelect={() => switchToRest(agent)}+ >+ <span className="flex min-w-0 items-center gap-1.5">+ <ProfileGlyph+ aria-hidden="true"+ color={resolveProfileColor(agent.profile, colors)}+ isDefault={agent.isDefault}+ name={agent.profile}+ />+ <span className="truncate">{agent.profile}</span>+ </span>+ </DropdownMenuItem>+ ))}+ </div>+ ))}+ <DropdownMenuSeparator />+ <DropdownMenuItem onSelect={() => setCreateOpen(true)}>+ <Codicon aria-hidden="true" name="add" size="0.875rem" />+ <span className="truncate">{p.newProfile}</span>+ </DropdownMenuItem>+ <DropdownMenuItem onSelect={() => void runImportProfileFlow()}>+ <Codicon aria-hidden="true" name="cloud-download" size="0.875rem" />+ <span className="truncate">{p.importProfile}</span>+ </DropdownMenuItem>+ <DropdownMenuItem onSelect={() => navigate(PROFILES_ROUTE)}>+ <Codicon aria-hidden="true" name="settings-gear" size="0.875rem" />+ <span className="truncate">{p.manageProfiles}</span>+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu>++ <CreateProfileDialog+ onClose={() => setCreateOpen(false)}+ onCreated={async name => {+ await refreshActiveProfile()+ selectProfile(name)+ }}+ open={createOpen}+ profiles={profiles}+ />+ </div>+ )+}++function ProfileItem({+ color,+ isDefault,+ label,+ name+}: {+ color: null | string+ isDefault: boolean+ label: string+ name: string+}) {+ const { cancelPrewarm, startPrewarm } = useProfilePrewarm(name)++ return (+ <DropdownMenuRadioItem className="min-w-0" onPointerEnter={startPrewarm} onPointerLeave={cancelPrewarm} value={name}>+ <span className="flex min-w-0 items-center gap-1.5">+ <ProfileGlyph aria-hidden="true" color={color} isDefault={isDefault} name={name} />+ <span className="truncate">{label}</span>+ </span>+ </DropdownMenuRadioItem>+ )+}diff --git a/apps/desktop/src/app/context-menu/app-context-menu.tsx b/apps/desktop/src/app/context-menu/app-context-menu.tsxindex b49397e283f..8c4162b816c 100644--- a/apps/desktop/src/app/context-menu/app-context-menu.tsx+++ b/apps/desktop/src/app/context-menu/app-context-menu.tsx@@ -23,6 +23,7 @@ import { isRemoteGateway } from '@/lib/media'import { reachablePreviewUrl } from '@/lib/preview-reach'import { openCommandPalette } from '@/store/command-palette'import { openPreview } from '@/store/preview'+import { toggleProfileRailVisible } from '@/store/profile-rail-prefs'import { toggleStatusbarVisible } from '@/store/statusbar-prefs'import { requestActiveUpdate } from '@/store/updates'import { canOpenNewWindow, openNewWindow } from '@/store/windows'@@ -573,6 +574,12 @@ function shellSections({ navigate, t }: ShellVerbs): ReactNode[][] {label={t.keybinds.actions['view.toggleStatusbar']}onSelect={toggleStatusbarVisible}/>,+ <Item+ icon="organization"+ key="shell-profile-rail"+ label={t.keybinds.actions['view.toggleProfileRail']}+ onSelect={toggleProfileRailVisible}+ />,// The pointer-only way back to a hidden tab strip: right-clicking the// shell reaches this menu from anywhere, including a zone that has no// chrome left to right-click.diff --git a/apps/desktop/src/app/contrib/controller.tsx b/apps/desktop/src/app/contrib/controller.tsxindex 31cab861826..86b90375077 100644--- a/apps/desktop/src/app/contrib/controller.tsx+++ b/apps/desktop/src/app/contrib/controller.tsx@@ -43,7 +43,7 @@ import { registry } from '@/contrib/registry'import { discoverRuntimePlugins } from '@/contrib/runtime-loader'import { translateNow } from '@/i18n'import { NEW_SESSION_TITLE, sessionTitle as storedSessionTitle } from '@/lib/chat-runtime'-import { Download, FileText, LayoutDashboard, PanelBottom, PanelTop, Terminal, Upload, Zap } from '@/lib/icons'+import { Download, FileText, LayoutDashboard, PanelBottom, PanelTop, Terminal, Upload, Users, Zap } from '@/lib/icons'import { type KeybindContribution, KEYBINDS_AREA } from '@/lib/keybinds/actions'import { isOnboardingEnabled } from '@/lib/onboarding-enabled'import { TRANSCRIPT_DIRECTIVE_AREA, type TranscriptDirectiveContribution } from '@/lib/transcript-directives'@@ -61,6 +61,7 @@ import {SIDEBAR_DEFAULT_WIDTH,SIDEBAR_MAX_WIDTH} from '@/store/layout'+import { $profileRailVisible } from '@/store/profile-rail-prefs'import { runExportProfileFlow, runImportProfileFlow } from '@/store/profile-share'import {$reviewOpen,@@ -352,6 +353,15 @@ registry.registerMany([get: () => $statusbarVisible.get(),set: enabled => $statusbarVisible.set(enabled)}),+ paletteToggle({+ id: 'view.toggleProfileRail',+ label: 'Toggle profile rail',+ action: 'view.toggleProfileRail',+ icon: Users,+ keywords: ['profile rail', 'profile bar', 'profile strip', 'profiles', 'sidebar', 'hide', 'show', 'chrome'],+ get: () => $profileRailVisible.get(),+ set: enabled => $profileRailVisible.set(enabled)+ }),paletteToggle({id: 'view.toggleTabStrip',label: 'Toggle tabs',diff --git a/apps/desktop/src/app/hooks/use-keybinds.ts b/apps/desktop/src/app/hooks/use-keybinds.tsindex 3dec2933c78..37673b05de0 100644--- a/apps/desktop/src/app/hooks/use-keybinds.ts+++ b/apps/desktop/src/app/hooks/use-keybinds.ts@@ -46,6 +46,7 @@ import {switchToDefaultProfile,toggleShowAllProfiles} from '@/store/profile'+import { toggleProfileRailVisible } from '@/store/profile-rail-prefs'import { openFolderAsProject } from '@/store/projects'import { toggleReview } from '@/store/review'import { $selectedStoredSessionId, setModelPickerOpen } from '@/store/session'@@ -249,6 +250,7 @@ export function useKeybinds(deps: KeybindRuntimeDeps): void {layoutHasRootSide('right') ? toggleFileBrowserOpen() : togglePaneVisible('terminal'),'view.toggleReview': toggleReview,'view.toggleStatusbar': toggleStatusbarVisible,+ 'view.toggleProfileRail': toggleProfileRailVisible,'view.toggleTabStrip': () => void toggleTargetZoneTabStrip(),'view.showFiles': showFiles,'view.showBrowser': openBrowserTab,diff --git a/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx b/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsxindex fd6ab705051..f128f2d64ea 100644--- a/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx+++ b/apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx@@ -3,6 +3,7 @@ import { useMemo } from 'react'import { useNavigate } from 'react-router'import { ConnectionSwitcher } from '@/app/chat/sidebar/connection-switcher'+import { ProfileSwitcher } from '@/app/chat/sidebar/profile-dropdown-switcher'import type { CommandCenterSection } from '@/app/command-center'import { useApprovalModeStatusbarItem } from '@/app/shell/approval-mode-menu'import { ContextUsagePanel } from '@/app/shell/context-usage-panel'@@ -39,6 +40,7 @@ import { openFreeTierSignIn } from '@/store/free-tier-sign-in'import { revealFileInTree } from '@/store/layout'import { $onboardingGate, guidedOnboardingActive } from '@/store/onboarding-gate'import { $activeGatewayProfile } from '@/store/profile'+import { $profileRailVisible } from '@/store/profile-rail-prefs'import { $projectTree, projectNameForCwd } from '@/store/projects'import {$activeSessionId,@@ -113,6 +115,7 @@ export function useStatusbarItems({// minimized zone, which lit the button for a pane the user couldn't see.const terminalShowing = useStore($paneVisible('terminal'))const sessionsShowing = useStore($paneVisible('sessions'))+ const profileRailVisible = useStore($profileRailVisible)const botsShowing = useStore($paneVisible('hermes-bots:pane'))const primaryBusy = useStore($busy)// Draft / primary composer atom — used only while the focused surface is the@@ -446,6 +449,14 @@ export function useStatusbarItems({lockedVisible: true,render: () => <StatusbarGatewaySwitcher />},+ {+ // The rail's stand-in: the profile picker moves down here while the+ // colored strip is hidden, so switching profiles always has a door.+ hidden: !sessionsShowing || profileRailVisible,+ id: 'profile-switcher',+ lockedVisible: true,+ render: () => <ProfileSwitcher compact />+ },{className: gatewayRestarting ? undefined : gatewayClassName,detail: gatewayRestarting ? copy.gatewayRestarting : gatewayDetail,@@ -591,6 +602,7 @@ export function useStatusbarItems({inferenceReady,inferenceStatus?.reason,openAgents,+ profileRailVisible,projectName,sessionsShowing,subagentsFailed,diff --git a/apps/desktop/src/i18n/en.ts b/apps/desktop/src/i18n/en.tsindex 1698f0b4d08..9f17d269004 100644--- a/apps/desktop/src/i18n/en.ts+++ b/apps/desktop/src/i18n/en.ts@@ -410,6 +410,7 @@ export const en: Translations = {'view.toggleReview': 'Toggle review pane','view.toggleStatusbar': 'Toggle status bar','view.toggleTabStrip': 'Toggle tabs',+ 'view.toggleProfileRail': 'Toggle profile rail','view.showFiles': 'Show file browser','view.showBrowser': 'Open browser','view.toggleHud': 'Toggle HUD mode',@@ -2681,6 +2682,7 @@ export const en: Translations = {reorder: 'Reorder group',actions: 'Group actions'},+ profileRail: 'Profile rail',nav: {'new-session': 'New session',skills: 'Capabilities',diff --git a/apps/desktop/src/i18n/ru.ts b/apps/desktop/src/i18n/ru.tsindex 1a9d1626c3d..f10a84b820d 100644--- a/apps/desktop/src/i18n/ru.ts+++ b/apps/desktop/src/i18n/ru.ts@@ -334,6 +334,7 @@ export const ru = defineLocale({'view.toggleReview': 'Показать / скрыть панель ревью','view.toggleStatusbar': 'Показать / скрыть строку состояния','view.toggleTabStrip': 'Показать / скрыть вкладки',+ 'view.toggleProfileRail': 'Показать / скрыть панель профилей','view.showFiles': 'Показать браузер файлов','view.showBrowser': 'Открыть браузер','view.toggleHud': 'Включить / выключить режим HUD',diff --git a/apps/desktop/src/i18n/types.ts b/apps/desktop/src/i18n/types.tsindex 29ccdeecdfc..b36257e660d 100644--- a/apps/desktop/src/i18n/types.ts+++ b/apps/desktop/src/i18n/types.ts@@ -2313,6 +2313,7 @@ export interface Translations {reorder: stringactions: string}+ profileRail: stringnav: Record<string, string>searchAria: stringsearchPlaceholder: stringdiff --git a/apps/desktop/src/i18n/zh.ts b/apps/desktop/src/i18n/zh.tsindex 769795e19bb..dcab3e3d995 100644--- a/apps/desktop/src/i18n/zh.ts+++ b/apps/desktop/src/i18n/zh.ts@@ -372,6 +372,7 @@ export const zh = defineLocale({'view.toggleReview': '切换审查面板','view.toggleStatusbar': '切换状态栏','view.toggleTabStrip': '切换标签',+ 'view.toggleProfileRail': '切换配置档案栏','view.showFiles': '显示文件浏览器','view.showBrowser': '打开浏览器','view.showTerminal': '显示终端',@@ -2814,6 +2815,7 @@ export const zh = defineLocale({},sidebar: {+ profileRail: '配置档案栏',gatewayGroups: {grouping: '网关与配置',rename: '重命名分组',diff --git a/apps/desktop/src/lib/keybinds/actions.ts b/apps/desktop/src/lib/keybinds/actions.tsindex a6c3b6a228e..607021d4c68 100644--- a/apps/desktop/src/lib/keybinds/actions.ts+++ b/apps/desktop/src/lib/keybinds/actions.ts@@ -128,6 +128,8 @@ export const KEYBIND_ACTIONS: readonly KeybindActionMeta[] = [// way back has to already exist. (⌥+letter emits a symbol on macOS; the// binding resolves through KeyT via comboFromEvent's `event.code` fallback.){ id: 'view.toggleTabStrip', category: 'view', defaults: ['mod+alt+t'] },+ // Unbound: the rail is a one-time preference, not something to flip mid-chat.+ { id: 'view.toggleProfileRail', category: 'view', defaults: [] },// ⌘G — "g" for git; the review pane is the source-control view.{ id: 'view.toggleReview', category: 'view', defaults: ['mod+g'] },{ id: 'view.showFiles', category: 'view', defaults: [] },diff --git a/apps/desktop/src/store/profile-rail-prefs.ts b/apps/desktop/src/store/profile-rail-prefs.tsnew file mode 100644index 00000000000..97ba769bb79--- /dev/null+++ b/apps/desktop/src/store/profile-rail-prefs.ts@@ -0,0 +1,11 @@+import { Codecs, persistentAtom } from '@/lib/persisted'++// The colored profile strip at the sidebar foot. For someone who runs profiles+// as bots it duplicates the footer's gateway selector, so it can be switched+// off; while it is off the statusbar grows a profile dropdown beside the+// gateway switcher so switching profiles never loses its door. On by default.+export const $profileRailVisible = persistentAtom('hermes.desktop.profileRailVisible', true, Codecs.bool)++export function toggleProfileRailVisible() {+ $profileRailVisible.set(!$profileRailVisible.get())+}diff --git a/website/docs/user-guide/desktop.md b/website/docs/user-guide/desktop.mdindex d360173c669..d43cb51cd70 100644--- a/website/docs/user-guide/desktop.md+++ b/website/docs/user-guide/desktop.md@@ -368,6 +368,7 @@ Further down the same **Settings → Gateways** page, **Registered gateways** ma- **Every connection needs a unique name** (a device name such as "Homelab" or "Work laptop"). When the same profile name exists on several registered gateways, surfaces disambiguate it as `@profile-device` (e.g. `@research-homelab`).- **Switch gateways from the Sessions sidebar.** A named gateway selector appears when more than one gateway is registered and handles any registry size without making gateways look like profiles. The adjacent profile rail then shows only that gateway's agents and remembers the last profile used there; large profile sets condense independently.+- **Hide the profile rail.** If your profiles are bots rather than workspaces, the colored strip of profile squares at the foot of the sidebar duplicates the sessions list. Turn it off from the Sessions view menu (**Profile rail**), the shell's right-click menu, or **⌘K → Toggle profile rail**. While it is hidden, a **Profiles** dropdown appears in the status bar next to the gateway selector with the same choices — this gateway's profiles, other gateways' agents, **New profile**, **Import profile…**, **Manage profiles…** — so switching profiles always has a door.- **Choose what opens after a restart.** **Open on launch** keeps the backward-compatible **Primary gateway** default, or can resume the **Last used** gateway after it connects successfully. This preference is stored outside the application bundle and survives Desktop updates.- **Add / edit / remove / test** connections from the panel. The **Add** flow offers all four kinds — **Local**, **Hermes Cloud**, **Remote gateway**, and **SSH** (the Local button is disabled while the app-managed local entry exists, and a hint points cloud adds at the sign-in/discovery flow above). The local entry is managed by the app and cannot be removed. **Test** probes the connection's own HTTP and WebSocket legs directly.- **Duplicates are rejected at save time**: only one **local** entry ever; remote and cloud entries are deduplicated on the normalized URL (trimmed, trailing slashes stripped, lowercased — across both kinds); SSH entries on the normalized `user@host:port` plus remote profile.