@devries-cameron20 / t3code-1 / commits / 5210a833a5
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Fix sidebar thread panel weird states. (#1497)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

shivam committed Mar 29, 2026 at 04:28 UTC 5210a833a58d24388611fb6a47b56a460a96422f
1 file changed +39 -42
apps/web/src/components/Sidebar.tsx
+39 -42
@@ -72,7 +72,6 @@ import {
72 } from "./desktopUpdate.logic";
73 import { Alert, AlertAction, AlertDescription, AlertTitle } from "./ui/alert";
74 import { Button } from "./ui/button";
75 -import { Collapsible, CollapsibleContent } from "./ui/collapsible";
75 import { Menu, MenuGroup, MenuPopup, MenuRadioGroup, MenuRadioItem, MenuTrigger } from "./ui/menu";
76 import { Tooltip, TooltipPopup, TooltipTrigger } from "./ui/tooltip";
77 import {
@@ -1228,7 +1227,7 @@ export default function Sidebar() {
1227 };
1228
1229 return (
1231 - <Collapsible className="group/collapsible" open={shouldShowThreadPanel}>
1230 + <>
1231 <div className="group/project-header relative">
1232 <SidebarMenuButton
1233 ref={isManualProjectSorting ? dragHandleProps?.setActivatorNodeRef : undefined}
@@ -1309,46 +1308,44 @@ export default function Sidebar() {
1308 </Tooltip>
1309 </div>
1310
1312 - <CollapsibleContent>
1313 - <SidebarMenuSub
1314 - ref={attachThreadListAutoAnimateRef}
1315 - className="mx-1 my-0 w-full translate-x-0 gap-0.5 px-1.5 py-0"
1316 - >
1317 - {renderedThreads.map((thread) => renderThreadRow(thread))}
1318 -
1319 - {project.expanded && hasHiddenThreads && !isThreadListExpanded && (
1320 - <SidebarMenuSubItem className="w-full">
1321 - <SidebarMenuSubButton
1322 - render={<button type="button" />}
1323 - data-thread-selection-safe
1324 - size="sm"
1325 - 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"
1326 - onClick={() => {
1327 - expandThreadListForProject(project.id);
1328 - }}
1329 - >
1330 - <span>Show more</span>
1331 - </SidebarMenuSubButton>
1332 - </SidebarMenuSubItem>
1333 - )}
1334 - {project.expanded && hasHiddenThreads && isThreadListExpanded && (
1335 - <SidebarMenuSubItem className="w-full">
1336 - <SidebarMenuSubButton
1337 - render={<button type="button" />}
1338 - data-thread-selection-safe
1339 - size="sm"
1340 - 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"
1341 - onClick={() => {
1342 - collapseThreadListForProject(project.id);
1343 - }}
1344 - >
1345 - <span>Show less</span>
1346 - </SidebarMenuSubButton>
1347 - </SidebarMenuSubItem>
1348 - )}
1349 - </SidebarMenuSub>
1350 - </CollapsibleContent>
1351 - </Collapsible>
1311 + <SidebarMenuSub
1312 + ref={attachThreadListAutoAnimateRef}
1313 + className="mx-1 my-0 w-full translate-x-0 gap-0.5 overflow-hidden px-1.5 py-0"
1314 + >
1315 + {shouldShowThreadPanel && renderedThreads.map((thread) => renderThreadRow(thread))}
1316 +
1317 + {project.expanded && hasHiddenThreads && !isThreadListExpanded && (
1318 + <SidebarMenuSubItem className="w-full">
1319 + <SidebarMenuSubButton
1320 + render={<button type="button" />}
1321 + data-thread-selection-safe
1322 + size="sm"
1323 + 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"
1324 + onClick={() => {
1325 + expandThreadListForProject(project.id);
1326 + }}
1327 + >
1328 + <span>Show more</span>
1329 + </SidebarMenuSubButton>
1330 + </SidebarMenuSubItem>
1331 + )}
1332 + {project.expanded && hasHiddenThreads && isThreadListExpanded && (
1333 + <SidebarMenuSubItem className="w-full">
1334 + <SidebarMenuSubButton
1335 + render={<button type="button" />}
1336 + data-thread-selection-safe
1337 + size="sm"
1338 + 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"
1339 + onClick={() => {
1340 + collapseThreadListForProject(project.id);
1341 + }}
1342 + >
1343 + <span>Show less</span>
1344 + </SidebarMenuSubButton>
1345 + </SidebarMenuSubItem>
1346 + )}
1347 + </SidebarMenuSub>
1348 + </>
1349 );
1350 }
1351