diff --git a/apps/desktop/src/app/chat/sidebar/index.tsx b/apps/desktop/src/app/chat/sidebar/index.tsx index c1f00e5777c9..8652ade4e2f3 100644 --- a/apps/desktop/src/app/chat/sidebar/index.tsx +++ b/apps/desktop/src/app/chat/sidebar/index.tsx @@ -615,7 +615,13 @@ export function ChatSidebar({ const sorted = sortProjectsForOverview( projectTree .filter(node => !(node.isAuto && dismissed.has(node.id))) - .map(project => ({ ...project, repos: orderRepos(project.repos) })), + .map(project => ({ + ...project, + // Home is synthetic, so its name is ours to translate — every other + // label is a repo basename or a name the user typed. + label: project.isNoProject ? s.projects.home : project.label, + repos: orderRepos(project.repos) + })), activeProjectId ) @@ -623,7 +629,7 @@ export function ChatSidebar({ // (default) returns `sorted` untouched; projects the user hasn't ordered yet // keep their sorted position rather than jumping the hand-picked list. return orderProjectsByIds(sorted, projectOrderIds) - }, [showAllProfiles, projectTree, dismissedAutoProjects, orderRepos, activeProjectId, projectOrderIds]) + }, [showAllProfiles, projectTree, dismissedAutoProjects, orderRepos, activeProjectId, projectOrderIds, s]) // The overview only renders in grouped mode; the model stays live regardless // so scoping is consistent across views. @@ -685,7 +691,9 @@ export function ChatSidebar({ // The live-session overlay (creates/evictions) is applied per-repo in // RepoFlatSection, AFTER the visual git-worktree lanes are merged in (so // out-of-tree worktrees can be placed). Here we just order the snapshot. - return { ...hydrated, repos: orderRepos(hydrated.repos) } + // The label comes from the overview node either way — that's the model's + // presentation copy (Home is translated there), not the raw payload's. + return { ...hydrated, label: overviewEnteredProject.label, repos: orderRepos(hydrated.repos) } }, [overviewEnteredProject, enteredProjectTree, orderRepos]) // Overlay live `$sessions` onto the entered project so a just-created session @@ -785,7 +793,7 @@ export function ChatSidebar({ // Preview rows come from the backend tree (each project carries its // most-recent sessions), overlaid with live $sessions so a just-created // session shows under its project instantly (and with its working arc), - // matching the flat Recents list. Keyed by project path for the rows. + // matching the flat Recents list. Keyed by project id for the rows. const overviewPreviews = useMemo>( () => overlayLivePreviews(projectOverview ?? [], agentSessions, projects, PROJECT_PREVIEW_COUNT, removedSessionIds), [projectOverview, agentSessions, projects, removedSessionIds] @@ -1304,12 +1312,15 @@ export function ChatSidebar({ {enteredProject.path && ( )} - + {/* Home has no folder and no record to rename, theme, or delete. */} + {!enteredProject.isNoProject && ( + + )}