From 8ae172496a2f7d86f8fee330e80ef59e2d17c996 Mon Sep 17 00:00:00 2001 From: T3 Code PR Stack <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 28 Jul 2026 22:32:04 +0200 Subject: [PATCH] fix(web): show Add project in classic Recency/None chrome Project grouping kept the FolderPlus control on the Projects header; flat recency/none had no equivalent. Surface the same trigger next to View & filters so projects can still be added without switching grouping. --- apps/web/src/components/Sidebar.tsx | 318 +++++++++++++++------------- 1 file changed, 170 insertions(+), 148 deletions(-) diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 62f40211b07..6565a9e4d93 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -4282,181 +4282,203 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent( ))} {showThreadListChrome ? ( - - - - } - > - - {listOptionsActive ? ( - - ) : null} - - View & filters - - - -
- Group threads -
- { - if (isWebThreadGrouping(value)) { - onThreadGroupingChange(value); - } - }} + <> + + + + } > - {WEB_THREAD_GROUPINGS.map((grouping) => ( - - - {grouping === "recency" ? ( - - ) : grouping === "project" ? ( - - ) : ( - - )} - {WEB_THREAD_GROUPING_LABELS[grouping]} - - - ))} - - - - {projectFilterOptions.length > 0 ? ( - <> - - -
- Project -
- { - onSelectedProjectFilterKeyChange( - value === LIST_PROJECT_FILTER_ALL ? null : (value as string), - ); - }} - > + + {listOptionsActive ? ( + + ) : null} +
+ View & filters +
+ + +
+ Group threads +
+ { + if (isWebThreadGrouping(value)) { + onThreadGroupingChange(value); + } + }} + > + {WEB_THREAD_GROUPINGS.map((grouping) => ( - - All projects + {grouping === "recency" ? ( + + ) : grouping === "project" ? ( + + ) : ( + + )} + {WEB_THREAD_GROUPING_LABELS[grouping]} - {projectFilterOptions.map((project) => ( + ))} + +
+ + {projectFilterOptions.length > 0 ? ( + <> + + +
+ Project +
+ { + onSelectedProjectFilterKeyChange( + value === LIST_PROJECT_FILTER_ALL ? null : (value as string), + ); + }} + > - - {project.displayName} + + All projects - ))} - -
- - ) : null} + {projectFilterOptions.map((project) => ( + + + + {project.displayName} + + + ))} + + + + ) : null} - {environmentFilterOptions.length > 1 ? ( - <> - - -
- Environment -
- onSelectedEnvironmentIdsChange([])} - > - All environments - - {environmentFilterOptions.map((environment) => ( + {environmentFilterOptions.length > 1 ? ( + <> + + +
+ Environment +
{ - onSelectedEnvironmentIdsChange( - toggleEnvironmentId( - selectedEnvironmentIds, - environment.environmentId, - ), - ); - }} + data-testid="sidebar-environment-filter-all" + onCheckedChange={() => onSelectedEnvironmentIdsChange([])} > - {environment.label} + All environments - ))} -
- - ) : null} + {environmentFilterOptions.map((environment) => ( + { + onSelectedEnvironmentIdsChange( + toggleEnvironmentId( + selectedEnvironmentIds, + environment.environmentId, + ), + ); + }} + > + {environment.label} + + ))} +
+ + ) : null} - - onHideSettledThreadsChange(checked === true)} - > - Hide settled - - {showFlatOrRecencyList && hideSettledThreads ? ( + setSettledRecencyHeadersEnabled(checked === true)} + data-testid="sidebar-hide-settled-toggle" + onCheckedChange={(checked) => onHideSettledThreadsChange(checked === true)} > - Date headers on settled + Hide settled - ) : null} -
-
+ {showFlatOrRecencyList && hideSettledThreads ? ( + + setSettledRecencyHeadersEnabled(checked === true) + } + > + Date headers on settled + + ) : null} +
+
+ {showFlatOrRecencyList ? ( + + + } + > + + + Add project + + ) : null} + ) : null}