Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/web/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import {
EyeIcon,
FolderIcon,
GitBranchIcon,
ListFilterIcon,
MessageCircleQuestionIcon,
PinIcon,
PinOffIcon,
Expand Down Expand Up @@ -4421,7 +4422,7 @@ export default function Sidebar() {
<ProjectFavicon project={scopedProjectGroup} className="size-4" />
</span>
) : (
<FolderIcon className="size-4" />
<ListFilterIcon className="size-4" />
)}
</ComboboxTrigger>
<ComboboxPopup
Expand Down
22 changes: 10 additions & 12 deletions apps/web/src/components/sidebar/SidebarThreadHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
* The sidebar header: one row holding search, project scope and new thread.
*
* Search owns the row's text and spans it. Project scope collapses to an icon
* that sits with new-project and new-thread as a segmented group at the end.
* at the trailing edge of the search surface, ahead of new-project and
* new-thread.
* The scope icon swaps to the project favicon while a project is selected,
* so the header still names the scope after the row that showed it is gone.
*
Expand Down Expand Up @@ -30,7 +31,7 @@ export interface SidebarThreadHeaderProps {
searchFieldRef?: RefObject<HTMLDivElement | null>;
/** Without projects there is nothing to scope, so those controls stay out. */
hasProjects: boolean;
/** The project scope combobox, rendered as the first icon of the group. */
/** The project scope combobox, rendered inside the search surface. */
projectScope: ReactNode;
onNewProject: () => void;
/** Receives the click so Shift+click can skip the project picker. */
Expand Down Expand Up @@ -82,7 +83,7 @@ export function SidebarThreadHeader({
<div className="flex items-center gap-1">
<div
ref={searchFieldRef}
className="flex h-8 min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground"
className="flex h-8 min-w-0 flex-1 items-center gap-2 rounded-md bg-sidebar-row-hover/60 px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground focus-within:bg-sidebar-row-hover"
>
<SearchIcon className="size-4 shrink-0 text-[var(--sidebar-icon-color)]" />
<Input
Expand Down Expand Up @@ -121,18 +122,15 @@ export function SidebarThreadHeader({
<XIcon className="size-3" />
</Button>
) : null}
{hasProjects ? projectScope : null}
</div>
{/* Unfilled like the search field beside it: the buttons carry their own
hover states, and a background well reads far louder on themed
palettes than on the base light and dark ones. */}
{/* These actions stay outside the search surface and carry their own
hover states. */}
<div className="flex shrink-0 items-center">
{hasProjects ? (
<>
{projectScope}
<SidebarHeaderIconButton label="New project" onClick={onNewProject}>
<FolderPlusIcon />
</SidebarHeaderIconButton>
</>
<SidebarHeaderIconButton label="New project" onClick={onNewProject}>
<FolderPlusIcon />
</SidebarHeaderIconButton>
) : null}
<SidebarHeaderIconButton
label="New thread"
Expand Down
Loading