Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
Fix sidebar thread panel weird states. (#1497)
shivam5210a833a58d
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsxindex 2d974be3e..299948c86 100644--- a/apps/web/src/components/Sidebar.tsx+++ b/apps/web/src/components/Sidebar.tsx@@ -72,7 +72,6 @@ import {} from "./desktopUpdate.logic";import { Alert, AlertAction, AlertDescription, AlertTitle } from "./ui/alert";import { Button } from "./ui/button";-import { Collapsible, CollapsibleContent } from "./ui/collapsible";import { Menu, MenuGroup, MenuPopup, MenuRadioGroup, MenuRadioItem, MenuTrigger } from "./ui/menu";import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip";import {@@ -1228,7 +1227,7 @@ export default function Sidebar() {};return (- <Collapsible className="group/collapsible" open={shouldShowThreadPanel}>+ <><div className="group/project-header relative"><SidebarMenuButtonref={isManualProjectSorting ? dragHandleProps?.setActivatorNodeRef : undefined}@@ -1309,46 +1308,44 @@ export default function Sidebar() {</Tooltip></div>- <CollapsibleContent>- <SidebarMenuSub- ref={attachThreadListAutoAnimateRef}- className="mx-1 my-0 w-full translate-x-0 gap-0.5 px-1.5 py-0"- >- {renderedThreads.map((thread) => renderThreadRow(thread))}-- {project.expanded && hasHiddenThreads && !isThreadListExpanded && (- <SidebarMenuSubItem className="w-full">- <SidebarMenuSubButton- render={<button type="button" />}- data-thread-selection-safe- size="sm"- className="h-6 w-full translate-x-0 justify-start px-2 text-left text-[10px] text-muted-foreground/60 hover:bg-accent hover:text-muted-foreground/80"- onClick={() => {- expandThreadListForProject(project.id);- }}- >- <span>Show more</span>- </SidebarMenuSubButton>- </SidebarMenuSubItem>- )}- {project.expanded && hasHiddenThreads && isThreadListExpanded && (- <SidebarMenuSubItem className="w-full">- <SidebarMenuSubButton- render={<button type="button" />}- data-thread-selection-safe- size="sm"- className="h-6 w-full translate-x-0 justify-start px-2 text-left text-[10px] text-muted-foreground/60 hover:bg-accent hover:text-muted-foreground/80"- onClick={() => {- collapseThreadListForProject(project.id);- }}- >- <span>Show less</span>- </SidebarMenuSubButton>- </SidebarMenuSubItem>- )}- </SidebarMenuSub>- </CollapsibleContent>- </Collapsible>+ <SidebarMenuSub+ ref={attachThreadListAutoAnimateRef}+ className="mx-1 my-0 w-full translate-x-0 gap-0.5 overflow-hidden px-1.5 py-0"+ >+ {shouldShowThreadPanel && renderedThreads.map((thread) => renderThreadRow(thread))}++ {project.expanded && hasHiddenThreads && !isThreadListExpanded && (+ <SidebarMenuSubItem className="w-full">+ <SidebarMenuSubButton+ render={<button type="button" />}+ data-thread-selection-safe+ size="sm"+ className="h-6 w-full translate-x-0 justify-start px-2 text-left text-[10px] text-muted-foreground/60 hover:bg-accent hover:text-muted-foreground/80"+ onClick={() => {+ expandThreadListForProject(project.id);+ }}+ >+ <span>Show more</span>+ </SidebarMenuSubButton>+ </SidebarMenuSubItem>+ )}+ {project.expanded && hasHiddenThreads && isThreadListExpanded && (+ <SidebarMenuSubItem className="w-full">+ <SidebarMenuSubButton+ render={<button type="button" />}+ data-thread-selection-safe+ size="sm"+ className="h-6 w-full translate-x-0 justify-start px-2 text-left text-[10px] text-muted-foreground/60 hover:bg-accent hover:text-muted-foreground/80"+ onClick={() => {+ collapseThreadListForProject(project.id);+ }}+ >+ <span>Show less</span>+ </SidebarMenuSubButton>+ </SidebarMenuSubItem>+ )}+ </SidebarMenuSub>+ </>);}