Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
feat(ui): restore v3.1.0 Workbench sidebar presentation
Max4de519cce2f7
diff --git a/docs/plans/2026-09-20-sidebar-31-alignment.md b/docs/plans/2026-09-20-sidebar-31-alignment.mdnew file mode 100644index 000000000..66740d096--- /dev/null+++ b/docs/plans/2026-09-20-sidebar-31-alignment.md@@ -0,0 +1,36 @@+# Sidebar v3.1.0 alignment++## Background++The desktop Workbench sidebar was redesigned after the published v3.1.0 UI. The owner wants a focused new PR that restores the v3.1.0 presentation for the sidebar areas shown in the approved screenshot, while keeping the current Settings suspension and navigation/data lifecycle fixes.++The published reference is the remote `v3.1.0` tag at commit `0e5a672ad183ac56f5ee8df7bcb770754840b3d9`. The current base is `master` after PR #2051 (`66fc91dbef41b387e3b55152fbe9b5c1b35b9396`).++## Contract++- Restore a collapsible desktop Capabilities section containing the currently authorized Agents, Skills, Harness, and Vaults rows.+- Restore the v3.1.0 visual states for those four rows: indentation, spacing, radius, icon sizing, default, hover, and selected treatment. Keep current capability filtering and route guards.+- Restore the v3.1.0 desktop brand treatment inside the retained Workbench sidebar owner. Keep the current Settings activity boundary and adjustable sidebar width.+- Restore the v3.1.0 Inbox row treatment while retaining the current real unread counter, hover popover, mark-read behavior, route navigation, and inactive-surface feed withdrawal.+- Put the Search icon button in the Projects header immediately before the add-project button. Preserve the current search callback and access behavior; do not copy the old permission restriction.+- Keep project loading, expansion, reorder, session actions, resize behavior, Apps/Settings footer, VersionBadge, and mobile header/global logo assets unchanged.++## Scope++Expected implementation paths:++- `ui/src/components/workbench/WorkbenchSidebar.tsx`+- existing focused sidebar tests and adjacent browser coverage only when required by the presentation contract+- this plan document++`ui/src/components/AppShell.tsx`, translations, shared primitives, backend files, dependency files, Composer, ChatPage, and global/mobile logo assets are out of scope unless an evidence-backed compile or accessibility issue requires a narrowly documented adjacent change.++## Acceptance invariants++- A user can collapse and expand Capabilities, and the choice survives remount through the existing local-storage convention.+- Every capability row that the current authorization admits remains reachable and receives the correct active state on its route; unauthorized rows remain absent.+- Search is a keyboard/focusable icon control in the Projects header and invokes the existing search callback.+- Inbox styling reflects active, inactive, and unread states without changing the counter or lifecycle behavior.+- Settings opening withdraws sidebar data consumers and interactions exactly as before.+- Focused tests pass, the UI typecheck/build passes, and repository lint introduces no new violations.+- The diff contains no unrelated product, backend, dependency, or PR #2058 changes.diff --git a/ui/src/components/workbench/WorkbenchSidebar.inbox.test.tsx b/ui/src/components/workbench/WorkbenchSidebar.inbox.test.tsxindex 49c6782e1..ce36d4690 100644--- a/ui/src/components/workbench/WorkbenchSidebar.inbox.test.tsx+++ b/ui/src/components/workbench/WorkbenchSidebar.inbox.test.tsx@@ -1,12 +1,11 @@/* @vitest-environment jsdom */import { createInstance } from 'i18next';-import { cleanup, render, screen } from '@testing-library/react';+import { cleanup, fireEvent, render, screen } from '@testing-library/react';import { I18nextProvider, initReactI18next } from 'react-i18next';import { MemoryRouter } from 'react-router-dom';import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { RouteSurfaceActivityBoundary } from '../RouteSurfaceActivityBoundary';-import { tabModifierLabel } from '../../apps/appLaunch';const inbox = vi.hoisted(() => ({totalUnread: 0,@@ -15,6 +14,16 @@ const inbox = vi.hoisted(() => ({unreadBySession: {} as Record<string, number>,markRead: vi.fn(),}));+const auth = vi.hoisted(() => ({+ capabilities: {+ can_chat: true,+ can_manage_projects: true,+ can_use_files: true,+ can_use_agents: true,+ can_use_skills: true,+ can_use_vault_secrets: true,+ } as Record<string, boolean>,+}));const hookCalls = vi.hoisted(() => ({inbox: vi.fn(),tree: vi.fn(),@@ -27,15 +36,7 @@ vi.mock('../../context/WorkbenchInboxContext', () => ({},}));vi.mock('../../context/InstanceAuthorizationContext', () => ({- useInstanceAuthorization: () => ({- capabilities: {- can_chat: true,- can_manage_projects: true,- can_use_agents: true,- can_use_skills: true,- can_use_vault_secrets: true,- },- }),+ useInstanceAuthorization: () => auth,}));vi.mock('../../context/WorkbenchProjectsContext', () => ({useWorkbenchProjectsTree: (options?: { active?: boolean }) => {@@ -73,23 +74,38 @@ void i18n.use(initReactI18next).init({interpolation: { escapeValue: false },});-const renderSidebar = (active = true) => render(+const renderSidebar = (+ { active = true, onOpenSearch }: { active?: boolean; onOpenSearch?: () => void } = {},+) => render(<I18nextProvider i18n={i18n}><MemoryRouter initialEntries={['/']}><RouteSurfaceActivityBoundary active={active}>- <WorkbenchSidebar />+ <WorkbenchSidebar onOpenSearch={onOpenSearch} /></RouteSurfaceActivityBoundary></MemoryRouter></I18nextProvider>,);const inboxIcon = () => screen.getByRole('link', { name: en.workbench.nav.inbox }).querySelector('svg')!;+const capabilityToggle = () => screen.getByRole('button', { name: en.nav.capabilities });+const capabilityHrefs = () =>+ [en.workbench.nav.agents, en.workbench.nav.skills, en.workbench.nav.harness, en.workbench.nav.vaults]+ .map((name) => screen.queryByRole('link', { name })?.getAttribute('href') ?? null);beforeEach(() => {inbox.totalUnread = 0;inbox.unreadSessions = 0;inbox.inboxSessions = [];inbox.unreadBySession = {};+ auth.capabilities = {+ can_chat: true,+ can_manage_projects: true,+ can_use_files: true,+ can_use_agents: true,+ can_use_skills: true,+ can_use_vault_secrets: true,+ };+ window.localStorage.clear();hookCalls.inbox.mockClear();hookCalls.tree.mockClear();});@@ -106,7 +122,8 @@ describe('Workbench sidebar inbox counter', () => {const link = screen.getByRole('link', { name: en.workbench.nav.inbox });// A zero badge is still a badge — an empty inbox draws no attention at all.expect(link.textContent).toBe(en.workbench.nav.inbox);- expect(inboxIcon().getAttribute('class')).toContain('text-muted');+ // Cyan is the unread read; the resting row is plain foreground ink.+ expect(inboxIcon().getAttribute('class')).toContain('text-foreground');expect(inboxIcon().getAttribute('class')).not.toContain('text-cyan-ink');});@@ -127,16 +144,99 @@ describe('Workbench sidebar inbox counter', () => {expect(screen.getByRole('link', { name: en.workbench.nav.inbox }).textContent).toBe(`${en.workbench.nav.inbox}99+`);});- it('shows the platform-appropriate search shortcut', () => {+ it('withdraws feed and tree activation while the retained sidebar is hidden', () => {+ renderSidebar({ active: false });++ expect(hookCalls.inbox).toHaveBeenCalledWith({ feed: false });+ expect(hookCalls.tree).toHaveBeenCalledWith({ active: false });+ });+});++describe('Workbench sidebar capabilities section', () => {+ it('lists every capability row the authorization admits', () => {renderSidebar();- expect(screen.getByText(`${tabModifierLabel()}K`)).toBeTruthy();+ expect(capabilityHrefs()).toEqual(['/agents', '/skills', '/harness', '/vaults']);});- it('withdraws feed and tree activation while the retained sidebar is hidden', () => {- renderSidebar(false);+ it('leaves out a capability the authorization withholds', () => {+ auth.capabilities.can_use_skills = false;+ auth.capabilities.can_use_vault_secrets = false;+ renderSidebar();- expect(hookCalls.inbox).toHaveBeenCalledWith({ feed: false });- expect(hookCalls.tree).toHaveBeenCalledWith({ active: false });+ expect(capabilityHrefs()).toEqual(['/agents', null, '/harness', null]);+ });++ it('drops the whole section when no capability is admitted', () => {+ auth.capabilities.can_chat = false;+ auth.capabilities.can_use_agents = false;+ auth.capabilities.can_use_skills = false;+ auth.capabilities.can_use_vault_secrets = false;+ renderSidebar();++ expect(screen.queryByRole('button', { name: en.nav.capabilities })).toBeNull();+ expect(capabilityHrefs()).toEqual([null, null, null, null]);+ });++ it('collapses on demand and remembers the choice across a remount', () => {+ renderSidebar();+ expect(capabilityToggle().getAttribute('aria-expanded')).toBe('true');++ fireEvent.click(capabilityToggle());++ expect(capabilityToggle().getAttribute('aria-expanded')).toBe('false');+ expect(capabilityHrefs()).toEqual([null, null, null, null]);+ expect(window.localStorage.getItem('vibe-remote:caps-collapsed')).toBe('1');++ cleanup();+ renderSidebar();++ // The rows stay away after the remount, and expanding again writes the+ // choice back rather than merely dropping the key.+ expect(capabilityToggle().getAttribute('aria-expanded')).toBe('false');+ fireEvent.click(capabilityToggle());+ expect(capabilityHrefs()).toEqual(['/agents', '/skills', '/harness', '/vaults']);+ expect(window.localStorage.getItem('vibe-remote:caps-collapsed')).toBe('0');+ });++ it('stays expanded when local storage cannot be read', () => {+ const getItem = vi.spyOn(Storage.prototype, 'getItem').mockImplementation(() => {+ throw new Error('denied');+ });+ try {+ renderSidebar();+ expect(capabilityToggle().getAttribute('aria-expanded')).toBe('true');+ } finally {+ getItem.mockRestore();+ }+ });+});++describe('Workbench sidebar search entry', () => {+ it('sits in the Projects header immediately before the add-project button', () => {+ renderSidebar();++ const search = screen.getByRole('button', { name: en.workbench.search.entry });+ const addProject = screen.getByRole('button', { name: en.workbench.addProject });+ expect(search.parentElement).toBe(addProject.parentElement);+ expect(search.nextElementSibling).toBe(addProject);+ });++ it('opens the palette through the callback the shell owns', () => {+ const onOpenSearch = vi.fn();+ renderSidebar({ onOpenSearch });++ fireEvent.click(screen.getByRole('button', { name: en.workbench.search.entry }));++ expect(onOpenSearch).toHaveBeenCalledTimes(1);+ });++ it('stays available to a member who cannot create projects', () => {+ auth.capabilities.can_manage_projects = false;+ auth.capabilities.can_use_files = false;+ renderSidebar();++ expect(screen.getByRole('button', { name: en.workbench.search.entry })).toBeTruthy();+ expect(screen.queryByRole('button', { name: en.workbench.addProject })).toBeNull();});});diff --git a/ui/src/components/workbench/WorkbenchSidebar.tsx b/ui/src/components/workbench/WorkbenchSidebar.tsxindex c82744159..c80fa2b96 100644--- a/ui/src/components/workbench/WorkbenchSidebar.tsx+++ b/ui/src/components/workbench/WorkbenchSidebar.tsx@@ -29,7 +29,6 @@ import type { LucideIcon } from 'lucide-react';import { useRouteSurfaceActive } from '../../lib/routeSurfaceActivity';import { useLatestRef } from '../../lib/useLatestRef';-import { tabModifierLabel } from '../../apps/appLaunch';import { useWorkbenchInbox } from '../../context/WorkbenchInboxContext';import { useWorkbenchProjectsActions, useWorkbenchProjectsTree } from '../../context/WorkbenchProjectsContext';@@ -70,9 +69,12 @@ const CAPABILITY_NAV: CapabilityNavItem[] = [{ to: '/vaults', i18nKey: 'workbench.nav.vaults', icon: KeyRound },];-// One navigation row (design m8K59, 216 x 40). Selected / hover / default are the-// three states the approved source draws, each on its own token so Light and Dark-// follow the table instead of a hard-coded neon.+const CAPS_COLLAPSED_KEY = 'vibe-remote:caps-collapsed';++// One capability row, in the published v3.1.0 treatment: a 13px medium label+// behind a 16px icon on a rounded-lg row, with mint reserved for the selected+// state. The mint wash, hairline, and glow all resolve from theme tokens, so+// Light and Dark each get their own value.const SidebarNavRow: React.FC<{to: string;end?: boolean;@@ -84,10 +86,10 @@ const SidebarNavRow: React.FC<{end={end}className={({ isActive }) =>clsx(- 'group flex h-10 items-center gap-2.5 rounded-xl border px-3 text-[13px] transition-colors',+ 'group flex items-center gap-2.5 rounded-lg border px-3 py-2 text-[13px] font-medium transition-colors',isActive- ? 'border-[var(--nav-selected-border)] bg-[var(--nav-selected-bg)] font-semibold text-foreground shadow-[var(--shadow-glow-nav-mint)]'- : 'border-transparent font-medium text-muted hover:bg-[var(--nav-hover-bg)] hover:text-foreground',+ ? 'border-mint/30 bg-mint/[0.08] text-foreground shadow-glow-sm-mint'+ : 'border-transparent text-muted hover:bg-foreground/[0.04] hover:text-foreground',)}>@@ -95,7 +97,7 @@ const SidebarNavRow: React.FC<{<><IconclassName={clsx(- 'size-[17px] shrink-0',+ 'size-4 shrink-0',isActive ? 'text-mint-ink' : 'text-muted group-hover:text-foreground',)}/>@@ -757,6 +759,25 @@ export const WorkbenchSidebar: React.FC<{ onOpenSearch?: () => void }> = ({ onOpconst [popoverOpen, setPopoverOpen] = useState(false);const closeTimer = useRef<number | null>(null);const [showNewProject, setShowNewProject] = useState(false);+ // Capabilities section is collapsible to free room for Projects; the choice is+ // remembered (best-effort localStorage, same convention as the other toggles).+ const [capsCollapsed, setCapsCollapsed] = useState<boolean>(() => {+ try {+ return window.localStorage.getItem(CAPS_COLLAPSED_KEY) === '1';+ } catch {+ return false;+ }+ });+ const toggleCaps = () =>+ setCapsCollapsed((prev) => {+ const next = !prev;+ try {+ window.localStorage.setItem(CAPS_COLLAPSED_KEY, next ? '1' : '0');+ } catch {+ /* best-effort */+ }+ return next;+ });// Small open/close delays so the popover doesn't flicker as the cursor// brushes through the inbox row on its way somewhere else, and survives@@ -803,13 +824,14 @@ export const WorkbenchSidebar: React.FC<{ onOpenSearch?: () => void }> = ({ onOp}, [totalUnread]);// Fill the sidebar column and cap its height so the project list (and only the- // project list) scrolls; the brand row and navigation stay pinned. The Inbox- // hover popover stays OUT of any overflow box below, so it is never clipped.+ // project list) scrolls; the brand row, Inbox and Capabilities stay pinned. The+ // Inbox hover popover stays OUT of any overflow box below, so it is never clipped.return (- <div className="flex min-h-0 flex-1 flex-col gap-4">- {/* Brand row tLDP1 — the whole brand opens the new-conversation home.- Search and Inbox live in full-width rows below it so the shell keeps one- clear reading order at every supported sidebar width. */}+ <div className="flex min-h-0 flex-1 flex-col gap-2.5">+ {/* Brand row — the whole brand opens the new-conversation home. The mark+ keeps the published v3.1.0 chip treatment (32px, mint hairline over a+ mint wash, resting glow that strengthens on hover) inside this sidebar's+ own padding, so the adjustable width still governs the column. */}<div className="flex shrink-0 items-center py-2"><Linkto="/"@@ -821,7 +843,7 @@ export const WorkbenchSidebar: React.FC<{ onOpenSearch?: () => void }> = ({ onOpsrc={logoImg}alt=""aria-hidden="true"- className="h-9 w-[38px] shrink-0 rounded-[7px] border border-mint/35 bg-[var(--logo-well-background)] object-cover transition-shadow group-hover:shadow-glow-sm-mint"+ className="size-8 shrink-0 rounded-lg border border-mint/35 bg-mint/[0.08] object-cover shadow-glow-sm-mint transition-shadow group-hover:shadow-glow-md-mint"/><div className="min-w-0 leading-tight"><div className="truncate text-[13px] font-semibold text-foreground">{t('appShell.title')}</div>@@ -830,43 +852,40 @@ export const WorkbenchSidebar: React.FC<{ onOpenSearch?: () => void }> = ({ onOp</Link></div>- <Button- type="button"- variant="ghost"- className="h-9 w-full justify-start rounded-lg px-2.5 text-[13px] text-muted hover:text-foreground"- aria-label={t('workbench.search.entry')}- onClick={onOpenSearch}- >- <Search className="size-[17px]" />- <span>{t('workbench.search.entry')}</span>- <kbd className="ml-auto rounded border border-border-strong px-1.5 py-0.5 font-mono text-[10px] font-medium text-muted">{tabModifierLabel()}K</kbd>- </Button>-{/* Inbox entry — hover opens the floating popover (portaled above the chat).- At zero unread there is no badge node at all and the icon stays muted;- both reads come from the same real counter. */}+ Search is a compact icon in the Projects header below, so this row keeps+ the full width the published design gives it. At zero unread there is no+ badge node at all and the icon stays uncoloured; both reads come from the+ same real counter. */}<Popover open={popoverOpen} onOpenChange={(open) => { if (!open) setPopoverOpen(false); }}><PopoverAnchor asChild><div className="w-full" onMouseEnter={openPopover} onMouseLeave={queueClose}><NavLinkto="/inbox"aria-label={t('workbench.nav.inbox')}- className="relative flex h-9 w-full items-center gap-2.5 rounded-lg px-2.5 text-[13px] transition-colors hover:bg-[var(--nav-hover-bg)]"+ className={({ isActive }) =>+ clsx(+ 'group flex w-full items-center gap-2.5 rounded-lg border px-3 py-2.5 text-[13px] font-semibold transition-colors',+ // Cyan active state per design.pen ze15A — mint is reserved+ // for sessions / projects so the two reads stay distinct.+ isActive+ ? 'border-cyan/40 bg-cyan-soft text-foreground shadow-glow-sm-cyan'+ : 'border-border-strong text-foreground hover:bg-foreground/[0.04]',+ )+ }>{({ isActive }) => (<>- <Inbox- className={clsx(- 'size-[17px]',- badge ? 'text-cyan-ink' : isActive ? 'text-foreground' : 'text-muted',- )}- />- <span className={clsx(isActive ? 'font-semibold text-foreground' : 'font-medium text-muted')}>{t('workbench.nav.inbox')}</span>+ {/* Cyan is what unread means here, so the counter colours the+ icon on any route — not only while Inbox is the open one. */}+ <Inbox className={clsx('size-4', badge || isActive ? 'text-cyan-ink' : 'text-foreground')} />+ <span className="flex-1">{t('workbench.nav.inbox')}</span>{badge && (- <span className="ml-auto inline-flex min-w-[18px] items-center justify-center rounded-full border border-surface bg-cyan px-[4px] font-mono text-[9px] font-bold leading-[14px] text-primary-foreground">+ <span className="inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-cyan px-1.5 py-0.5 font-mono text-[9px] font-bold text-accent-foreground shadow-glow-xs-cyan">{badge}</span>)}+ <ChevronRight className="size-3.5 text-muted opacity-0 transition-opacity group-hover:opacity-100" /></>)}</NavLink>@@ -885,31 +904,59 @@ export const WorkbenchSidebar: React.FC<{ onOpenSearch?: () => void }> = ({ onOp/></Popover>- {/* Navigation m8K59 — the home brand is the new-conversation entry, so- capability destinations are the only rows in this group. */}- <nav className="flex shrink-0 flex-col gap-0.5">- {capabilityNav.map(({ to, i18nKey, icon }) => (- <SidebarNavRow key={to} to={to} icon={icon} label={t(i18nKey)} />- ))}- </nav>+ {/* Capabilities — a collapsible group, so a long project list can reclaim+ the rows. Only the destinations the current authorization admits are+ rendered, and the header disappears with them. */}+ {capabilityNav.length > 0 && <div className="flex shrink-0 flex-col gap-1.5">+ <button+ type="button"+ onClick={toggleCaps}+ aria-expanded={!capsCollapsed}+ className="group flex items-center gap-1 px-1 font-mono text-[10px] font-bold uppercase tracking-[0.18em] text-muted transition-colors hover:text-foreground"+ >+ <span className="flex-1 text-left">{t('nav.capabilities')}</span>+ <ChevronDown className={clsx('size-3.5 shrink-0 transition-transform', capsCollapsed && '-rotate-90')} />+ </button>+ {!capsCollapsed && (+ <nav className="flex flex-col gap-0.5">+ {capabilityNav.map(({ to, i18nKey, icon }) => (+ <SidebarNavRow key={to} to={to} icon={icon} label={t(i18nKey)} />+ ))}+ </nav>+ )}+ </div>}- {/* Projects section t7o96 — the label on the left and the create- affordance on the right; Search now lives in the brand row. */}+ {/* Projects section — the label on the left (matching the Capabilities+ label style) and the borderless search + add icons grouped on the+ right. Search sits immediately before add; ⌘K still opens the same+ palette from anywhere. */}<div className="flex min-h-0 flex-1 flex-col gap-1.5"><div className="flex items-center justify-between px-1">- <span className="font-mono text-[10px] font-bold uppercase tracking-[0.16em] text-muted">+ <span className="font-mono text-[10px] font-bold uppercase tracking-[0.18em] text-muted">{t('workbench.projectsLabel')}</span>- {canCreateProject && <Button- type="button"- variant="ghost"- size="icon"- className="size-[22px] shrink-0 text-muted hover:text-foreground"- aria-label={t('workbench.addProject')}- onClick={() => setShowNewProject(true)}- >- <FolderPlus className="size-[15px]" />- </Button>}+ <div className="flex items-center gap-0.5">+ <Button+ type="button"+ variant="ghost"+ size="icon"+ className="size-7 shrink-0 text-muted hover:text-foreground"+ aria-label={t('workbench.search.entry')}+ onClick={onOpenSearch}+ >+ <Search className="size-4" />+ </Button>+ {canCreateProject && <Button+ type="button"+ variant="ghost"+ size="icon"+ className="size-7 shrink-0 text-muted hover:text-foreground"+ aria-label={t('workbench.addProject')}+ onClick={() => setShowNewProject(true)}+ >+ <FolderPlus className="size-4" />+ </Button>}+ </div></div><div className="flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto pr-0.5">