The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): render pinned session rows in the Inbox-style card variant
tobenwarrior93940214ea13
diff --git a/apps/desktop/src/app/chat/sidebar/chat-sidebar.integration.test.tsx b/apps/desktop/src/app/chat/sidebar/chat-sidebar.integration.test.tsxindex b3d23686cc2..117a7f1fbb2 100644--- a/apps/desktop/src/app/chat/sidebar/chat-sidebar.integration.test.tsx+++ b/apps/desktop/src/app/chat/sidebar/chat-sidebar.integration.test.tsx@@ -7,12 +7,15 @@ import { group, split } from '@/components/pane-shell/tree/model'import { $layoutTree, noteActiveTreeGroup } from '@/components/pane-shell/tree/store'import { SidebarProvider } from '@/components/ui/sidebar'import { registry } from '@/contrib/registry'+import { $pinnedSessionIds, $sidebarCardRows } from '@/store/layout'import { $selectedStoredSessionId, $sessions } from '@/store/session'import { $removedSessionIds } from '@/store/session-removal'import { makeSessionInfo } from '@/test/session-info'import { type AppView, ROUTES_AREA, SIDEBAR_NAV_AREA } from '../../routes'+import { SIDEBAR_ROW_CARD_MIN_H } from './row-geometry'+import { ChatSidebar } from './index'const noop = () => {}@@ -162,3 +165,46 @@ describe('ChatSidebar navigation activity', () => {expectOnlySelectedSession(null)})})++// Inbox style is a render variant, not a grouping — it rides whichever view is+// active. The pinned section sits in the same flat column as recents, so both+// must render the same row geometry: a section boundary is not a geometry+// boundary (#116325).+describe('ChatSidebar inbox style geometry', () => {+ let disposeContributions: () => void++ beforeEach(() => {+ disposeContributions = registry.registerMany([])+ $selectedStoredSessionId.set('tile-one')+ $sessions.set(sessionRows)+ $removedSessionIds.set(new Set())+ $pinnedSessionIds.set(['tile-two'])+ })++ afterEach(() => {+ cleanup()+ disposeContributions()+ $selectedStoredSessionId.set(null)+ $sessions.set([])+ $removedSessionIds.set(new Set())+ $pinnedSessionIds.set([])+ $sidebarCardRows.set(false)+ })++ const row = (title: string) => screen.getByText(title).closest('.group.row-hover') as HTMLElement++ it('renders the pinned row with the recents card geometry when Inbox style is on', () => {+ $sidebarCardRows.set(true)+ renderSidebar('/', 'chat')++ expect(row('Tile two').className).toContain(SIDEBAR_ROW_CARD_MIN_H)+ expect(row('Tile one').className).toContain(SIDEBAR_ROW_CARD_MIN_H)+ })++ it('leaves both sections inline when Inbox style is off', () => {+ renderSidebar('/', 'chat')++ expect(row('Tile two').className).not.toContain(SIDEBAR_ROW_CARD_MIN_H)+ expect(row('Tile one').className).not.toContain(SIDEBAR_ROW_CARD_MIN_H)+ })+})diff --git a/apps/desktop/src/app/chat/sidebar/index.tsx b/apps/desktop/src/app/chat/sidebar/index.tsxindex 3941007c4ea..aa191c24561 100644--- a/apps/desktop/src/app/chat/sidebar/index.tsx+++ b/apps/desktop/src/app/chat/sidebar/index.tsx@@ -1691,6 +1691,10 @@ export function ChatSidebar({{!trimmedQuery && (<SidebarSessionsSectionactiveSessionId={activeSidebarSessionId}+ // Inbox style rides whichever view is active — pinned rows+ // included, so one column never mixes card and inline+ // geometry at the section boundary.+ card={cardRows}contentClassName="flex flex-col gap-px rounded-lg pb-2 pt-1"dndSensors={dndSensors}emptyState={<SidebarPinnedEmptyState />}