Skip to content

Commit 5211acf

Browse files
t3dotggclaude
andauthored
feat(web): boring sidebar can show folder threads on two lines (#26463)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 6bc87b9 commit 5211acf

6 files changed

Lines changed: 239 additions & 192 deletions

File tree

‎apps/desktop/src/settings/DesktopClientSettings.test.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ const clientSettings: ClientSettings = {
6363
sidebarProjectSortOrder: "manual",
6464
sidebarThreadSortOrder: "created_at",
6565
boringSidebarEnabled: false,
66+
boringSidebarMultilineRows: false,
6667
legacySidebarEnabled: false,
6768
sidebarWorkingShelfEnabled: false,
6869
loadBalancingEnabled: false,

‎apps/web/src/components/Sidebar.tsx‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,6 +962,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
962962
},
963963
});
964964
const boringSidebarEnabled = useBoringSidebarEnabled();
965+
const folderRowsMultiline = useClientSettings((settings) => settings.boringSidebarMultilineRows);
965966
const newThreadContext = useHandleNewThread();
966967
// Row callbacks capture only the handler; the rest of the context changes with the route.
967968
const { handleNewThread } = newThreadContext;
@@ -3168,7 +3169,13 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
31683169
);
31693170
const isCard =
31703171
section === "active" || section === "pinned" || section === "working";
3171-
const rowVariant = folderRow ? "folder" : isCard ? "card" : "slim";
3172+
const rowVariant = folderRow
3173+
? folderRowsMultiline
3174+
? "folder-multiline"
3175+
: "folder"
3176+
: isCard
3177+
? "card"
3178+
: "slim";
31723179
return (
31733180
<SortableThreadRow
31743181
key={threadKey}

‎apps/web/src/components/settings/LabsSettingsPanel.tsx‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export function LabsSettingsPanel() {
1717
<SettingsPageContainer>
1818
<SettingsSection id="beta" title="Beta">
1919
<BoringSidebarRow />
20+
<BoringSidebarMultilineRow />
2021
{/* Clerk is only mounted when this build has T3 Connect. */}
2122
{hasCloudPublicConfig() ? <GuestLinksRowWithSignIn /> : <GuestLinksRow />}
2223
<LinkedEnvironmentsRow />
@@ -47,6 +48,26 @@ function BoringSidebarRow() {
4748
);
4849
}
4950

51+
function BoringSidebarMultilineRow() {
52+
const settings = useScopedSettings();
53+
const updateSettings = useUpdateScopedSettings();
54+
return (
55+
<SettingsRow
56+
{...searchableSetting("boring-sidebar-multiline")}
57+
description="In the boring sidebar, show folder threads on two lines: the title, then the branch, pull request, and agent."
58+
control={
59+
<Switch
60+
checked={settings.boringSidebarMultilineRows}
61+
onCheckedChange={(checked) =>
62+
updateSettings({ boringSidebarMultilineRows: Boolean(checked) })
63+
}
64+
aria-label="Two-line folder rows"
65+
/>
66+
}
67+
/>
68+
);
69+
}
70+
5071
/** Signed out of T3 Connect, the row offers to sign in instead of its switch. */
5172
function GuestLinksRowWithSignIn() {
5273
const { isSignedIn } = useAuth();

‎apps/web/src/components/settings/settingsSearch.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,12 @@ export const SETTINGS_SEARCH_ITEMS = [
431431
to: "/settings/labs",
432432
searchTerms: ["beta folders project tree legacy old classic sidebar"],
433433
},
434+
{
435+
id: "boring-sidebar-multiline",
436+
title: "Two-line folder rows",
437+
to: "/settings/labs",
438+
searchTerms: ["beta boring sidebar folder rows multiline branch pull request details"],
439+
},
434440
{
435441
id: "guest-links",
436442
title: "Guest links",

0 commit comments

Comments
 (0)