From 2d8fe15ccbbfb0b6addbdf269238eeaffccd9d21 Mon Sep 17 00:00:00 2001
From: Shivam Sharma <91240327+shivamhwp@users.noreply.github.com>
Date: Sun, 29 Mar 2026 00:41:37 +0530
Subject: [PATCH 1/2] Fix sidebar thread panel collapsed state
- Remove Collapsible wrapper around project thread list
- Hide thread rows and overflow cleanly when the panel is not shown
---
apps/web/src/components/Sidebar.tsx | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx
index af60ce7d29..e20b411f5f 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 {
@@ -1220,7 +1219,7 @@ export default function Sidebar() {
};
return (
-
+ <>
-
-
- {renderedThreads.map((thread) => renderThreadRow(thread))}
+
+ {shouldShowThreadPanel && renderedThreads.map((thread) => renderThreadRow(thread))}
- {project.expanded && hasHiddenThreads && !isThreadListExpanded && (
+ {shouldShowThreadPanel &&
+ project.expanded &&
+ hasHiddenThreads &&
+ !isThreadListExpanded && (
}
@@ -1323,7 +1324,10 @@ export default function Sidebar() {
)}
- {project.expanded && hasHiddenThreads && isThreadListExpanded && (
+ {shouldShowThreadPanel &&
+ project.expanded &&
+ hasHiddenThreads &&
+ isThreadListExpanded && (
}
@@ -1338,9 +1342,8 @@ export default function Sidebar() {
)}
-
-
-
+
+ >
);
}
From 9f19848ed6e2499107614c5e89df51bfd252aa14 Mon Sep 17 00:00:00 2001
From: Shivam Sharma <91240327+shivamhwp@users.noreply.github.com>
Date: Sun, 29 Mar 2026 01:06:08 +0530
Subject: [PATCH 2/2] Fix sidebar thread toggle rendering
- Remove redundant thread panel guard from show more/less controls
- Keep thread list expansion state tied to project expansion only
---
apps/web/src/components/Sidebar.tsx | 66 +++++++++++++----------------
1 file changed, 30 insertions(+), 36 deletions(-)
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx
index e20b411f5f..79e445ffa1 100644
--- a/apps/web/src/components/Sidebar.tsx
+++ b/apps/web/src/components/Sidebar.tsx
@@ -1306,42 +1306,36 @@ export default function Sidebar() {
>
{shouldShowThreadPanel && renderedThreads.map((thread) => renderThreadRow(thread))}
- {shouldShowThreadPanel &&
- project.expanded &&
- hasHiddenThreads &&
- !isThreadListExpanded && (
-
- }
- 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);
- }}
- >
- Show more
-
-
- )}
- {shouldShowThreadPanel &&
- project.expanded &&
- hasHiddenThreads &&
- isThreadListExpanded && (
-
- }
- 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);
- }}
- >
- Show less
-
-
- )}
+ {project.expanded && hasHiddenThreads && !isThreadListExpanded && (
+
+ }
+ 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);
+ }}
+ >
+ Show more
+
+
+ )}
+ {project.expanded && hasHiddenThreads && isThreadListExpanded && (
+
+ }
+ 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);
+ }}
+ >
+ Show less
+
+
+ )}
>
);