The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): show empty project repository headers
Puvaan Raajf02a128dd1c3
diff --git a/apps/desktop/src/app/chat/sidebar/sessions-section-new-session-drag.test.tsx b/apps/desktop/src/app/chat/sidebar/sessions-section-new-session-drag.test.tsxindex 8dffd94effb..4defe8a74e9 100644--- a/apps/desktop/src/app/chat/sidebar/sessions-section-new-session-drag.test.tsx+++ b/apps/desktop/src/app/chat/sidebar/sessions-section-new-session-drag.test.tsx@@ -333,6 +333,25 @@ describe('project-associated new-session drag sources', () => {})})+ it('renders declared repo headers before the project has any sessions', () => {+ const repo = (id: string, label: string) => ({ groups: [], id, label, path: id, sessionCount: 0 })++ render(+ <SidebarSessionsSection+ {...baseProps()}+ emptyState={<div>No sessions in this project</div>}+ projectContent={project({+ repos: [repo('/repo/a', 'Repo A'), repo('/repo/b', 'Repo B')],+ sessionCount: 0+ })}+ />+ )++ expect(screen.getByRole('button', { name: 'New session in Repo A' })).toBeTruthy()+ expect(screen.getByRole('button', { name: 'New session in Repo B' })).toBeTruthy()+ expect(screen.queryByText('No sessions in this project')).toBeNull()+ })+it('drags profile-group add buttons to start a session in that profile', async () => {const onNewSessionSplit = vi.fn()diff --git a/apps/desktop/src/app/chat/sidebar/sessions-section.tsx b/apps/desktop/src/app/chat/sidebar/sessions-section.tsxindex 17b91178996..7cde3552845 100644--- a/apps/desktop/src/app/chat/sidebar/sessions-section.tsx+++ b/apps/desktop/src/app/chat/sidebar/sessions-section.tsx@@ -245,12 +245,10 @@ export function SidebarSessionsSection({// render as a drill-in row so the user can see it exists).const hasProjectOverview = Boolean(projectOverview?.length)- // Lanes count as content even with no rows left in them: the backend only- // emits a lane that has sessions, so a lane surviving with zero rows means- // they were filtered out (pinned) — the branch is real and must still render.- // A genuinely empty project has no lanes at all and keeps its empty state.+ // Declared repos are content even before their first session: each repo header owns the action that starts+ // a session in that folder. Lanes likewise survive filtering and must still render.const hasProjectContent = Boolean(- projectContent && (projectContent.sessionCount > 0 || projectContent.repos.some(repo => repo.groups.length > 0))+ projectContent && (projectContent.sessionCount > 0 || projectContent.repos.length > 0))const showEmptyState =