| ... | @@ -15,6 +15,7 @@ import { | ... | @@ -15,6 +15,7 @@ import { |
| 15 | } from "~/sidebarProjectGrouping"; | 15 | } from "~/sidebarProjectGrouping"; |
| 16 | import { useProjects, useThreadShells } from "~/state/entities"; | 16 | import { useProjects, useThreadShells } from "~/state/entities"; |
| 17 | import { useEnvironments, usePrimaryEnvironmentId } from "~/state/environments"; | 17 | import { useEnvironments, usePrimaryEnvironmentId } from "~/state/environments"; |
| | 18 | import { ProjectFavicon } from "../ProjectFavicon"; |
| 18 | import { sortLogicalProjectsForSidebar } from "../Sidebar.logic"; | 19 | import { sortLogicalProjectsForSidebar } from "../Sidebar.logic"; |
| 19 | import { | 20 | import { |
| 20 | Menu, | 21 | Menu, |
| ... | @@ -114,11 +115,14 @@ export function DraftHeroHeadline({ | ... | @@ -114,11 +115,14 @@ export function DraftHeroHeadline({ |
| 114 | render={ | 115 | render={ |
| 115 | <MenuTrigger | 116 | <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} |