authorgravatar for gianmarcosimone89@gmail.comGianmarco <gianmarcosimone89@gmail.com> 2026-09-08 18:52:46+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-09-08 09:52:46-07:00
log12391bd0d38eef6655b7a9f8945d0cb5febadc2b
treeeaf28f7e986985980eaa5c2fa978d2594cf4e748
parent4664c572a78231611491f63f677f0e007ebaab03
signature Signed by PGP key B5690EEEBB952194

feat(web): show project favicon in new-thread project picker (#10790)

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>

1 files changed, 13 insertions(+), 3 deletions(-)

apps/web/src/components/chat/DraftHeroHeadline.tsx+13-3
...@@ -15,6 +15,7 @@ import {...@@ -15,6 +15,7 @@ import {
15} from "~/sidebarProjectGrouping";15} from "~/sidebarProjectGrouping";
16import { useProjects, useThreadShells } from "~/state/entities";16import { useProjects, useThreadShells } from "~/state/entities";
17import { useEnvironments, usePrimaryEnvironmentId } from "~/state/environments";17import { useEnvironments, usePrimaryEnvironmentId } from "~/state/environments";
18import { ProjectFavicon } from "../ProjectFavicon";
18import { sortLogicalProjectsForSidebar } from "../Sidebar.logic";19import { sortLogicalProjectsForSidebar } from "../Sidebar.logic";
19import {20import {
20 Menu,21 Menu,
...@@ -114,11 +115,14 @@ export function DraftHeroHeadline({...@@ -114,11 +115,14 @@ export function DraftHeroHeadline({
114 render={115 render={
115 <MenuTrigger116 <MenuTrigger
116 aria-label={hasResolvedProject ? "Change project" : "Choose a project"}117 aria-label={hasResolvedProject ? "Change project" : "Choose a project"}
117 className="pointer-events-auto inline-block max-w-64 truncate border-foreground/60 border-b border-dotted align-baseline text-foreground transition-colors hover:border-foreground/80 focus-visible:rounded-sm focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring"118 className="pointer-events-auto inline-flex max-w-64 items-center gap-2 border-foreground/60 border-b border-dotted align-baseline text-foreground transition-colors hover:border-foreground/80 focus-visible:rounded-sm focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring"
118 />119 />
119 }120 }
120 >121 >
121 {activeProjectDisplayName ?? "Choose a project"}122 {activeProjectGroup ? (
123 <ProjectFavicon project={activeProjectGroup} className="size-6 shrink-0 sm:size-7" />
124 ) : null}
125 <span className="min-w-0 truncate">{activeProjectDisplayName ?? "Choose a project"}</span>
122 </TooltipTrigger>126 </TooltipTrigger>
123 {activeProjectDisplayName ? (127 {activeProjectDisplayName ? (
124 <TooltipPopup side="top" className="max-w-80">128 <TooltipPopup side="top" className="max-w-80">
...@@ -164,7 +168,13 @@ export function DraftHeroHeadline({...@@ -164,7 +168,13 @@ export function DraftHeroHeadline({
164 >168 >
165 {projectPickerEntries.map(({ group }) => {169 {projectPickerEntries.map(({ group }) => {
166 return (170 return (
167 <MenuRadioItem key={group.projectKey} value={group.projectKey} closeOnClick>171 <MenuRadioItem
172 key={group.projectKey}
173 value={group.projectKey}
174 closeOnClick
175 className="[&>span:last-child]:flex [&>span:last-child]:min-w-0 [&>span:last-child]:items-center [&>span:last-child]:gap-2"
176 >
177 <ProjectFavicon project={group} className="size-4 shrink-0" />
168 <Tooltip>178 <Tooltip>
169 <TooltipTrigger render={<span className="block min-w-0 truncate" />}>179 <TooltipTrigger render={<span className="block min-w-0 truncate" />}>
170 {group.displayName}180 {group.displayName}