diff --git a/apps/web/src/components/chat/ChatHeader.tsx b/apps/web/src/components/chat/ChatHeader.tsx index 49f21a1ddc829..046a5f44b6bf6 100644 --- a/apps/web/src/components/chat/ChatHeader.tsx +++ b/apps/web/src/components/chat/ChatHeader.tsx @@ -84,7 +84,7 @@ export const ChatHeader = memo(function ChatHeader({ onOpenProjectSettings, onFindInThread, }: ChatHeaderProps) { - const activeProjectName = activeProject?.isScratch ? "No project" : activeProject?.title; + const activeProjectName = activeProject?.title; const activeProjectCwd = activeProject?.workspaceRoot ?? null; const interfaceFont = useClientSettings((settings) => settings.fontFamilySans); const breadcrumbContainerRef = useRef(null); diff --git a/apps/web/src/components/chat/DraftHeroHeadline.tsx b/apps/web/src/components/chat/DraftHeroHeadline.tsx index 91bf642fcb32f..c7ec5fd1002e1 100644 --- a/apps/web/src/components/chat/DraftHeroHeadline.tsx +++ b/apps/web/src/components/chat/DraftHeroHeadline.tsx @@ -300,10 +300,7 @@ export function DraftHeroHeadline({ /> } > - + {activeProjectTitle && !isScratchDraft ? ( {activeProjectTitle} diff --git a/packages/client-runtime/src/state/projectGrouping.test.ts b/packages/client-runtime/src/state/projectGrouping.test.ts index a5957d06e1b01..8ec45bcbc33d2 100644 --- a/packages/client-runtime/src/state/projectGrouping.test.ts +++ b/packages/client-runtime/src/state/projectGrouping.test.ts @@ -246,6 +246,21 @@ describe("buildProjectGroups", () => { }, ); + it("labels a renamed scratch home with its title", () => { + const groups = buildProjectGroups({ + projects: [ + makeProject("scratch", "/scratch", { + title: "EOY reviews", + isScratch: true, + repositoryIdentity: null, + }), + ], + groupScratchProjects: true, + settings: settings("repository"), + }); + expect(groups[0]?.label).toBe("EOY reviews"); + }); + it("preserves every physical clone as a selectable member in repository modes", () => { const projects = [ makeProject("t3code", "/work/t3code"), diff --git a/packages/client-runtime/src/state/projectGrouping.ts b/packages/client-runtime/src/state/projectGrouping.ts index 46fdc4e3dd3ae..cb4c6051ade38 100644 --- a/packages/client-runtime/src/state/projectGrouping.ts +++ b/packages/client-runtime/src/state/projectGrouping.ts @@ -364,7 +364,7 @@ export function buildProjectGroups(input: { key, label: input.groupScratchProjects && representative.isScratch - ? "No project" + ? representative.title : members.length > 1 ? deriveProjectGroupLabel({ representative,