From 033b2d4d4a0ec7b97d982f0bea78fba42251266f Mon Sep 17 00:00:00 2001 From: Badcuban <108198679+badcuban@users.noreply.github.com> Date: Fri, 20 Nov 2026 16:27:04 -0500 Subject: [PATCH 1/5] feat(web): General Chats can be a section of Threads instead of their own page Issue #1016 asked for General Chats at the bottom of the Threads list so switching between project work and chats takes no extra step. Some people like the separate page, so this is a per-device choice: Settings > Threads > Sidebar > General chats, "Own page" (default, unchanged) or "Section in Threads". In section mode the General Chats rail button goes away and its counts move onto Threads. The chats sit in a fold-out section under Wrapped with the same header line (now one shared InboxShelfHeader) and a New chat button; folded, it keeps the open chat's row and says what the hidden chats need or are doing. /chats, and so the command palette, desktop menu and place links, opens Threads with the section open, showing a floating list or the phone sheet. The inbox column leaves the section its room. The chat rows are shared with the page list (GeneralChatRows), and the palette gains "New general chat". --- .../settings/DesktopClientSettings.test.ts | 1 + apps/server/src/guide/topics.ts | 3 + apps/web/src/components/AppSidebarLayout.tsx | 8 +- .../components/ChatView.browser-harness.tsx | 1 + .../src/components/ChatView.shell.browser.tsx | 119 ++++++++++++ .../components/ChatView.sidebar.browser.tsx | 119 ++++++++++++ .../src/components/CommandPaletteDialog.tsx | 16 ++ apps/web/src/components/Sidebar.tsx | 87 +++++---- apps/web/src/components/chat/PlaceLink.tsx | 7 +- .../src/components/chats/GeneralChatRows.tsx | 181 ++++++++++++++++++ .../src/components/chats/GeneralChatsList.tsx | 172 ++--------------- .../components/chats/GeneralChatsShelf.tsx | 165 ++++++++++++++++ .../components/chats/generalChatsPlacement.ts | 42 ++++ .../components/settings/SettingsPanels.tsx | 5 + .../components/settings/ThreadsSettings.tsx | 53 ++++- .../settings/settingsRowRegistry.tsx | 2 + .../components/sidebar/InboxShelfHeader.tsx | 67 +++++++ .../src/components/sidebar/NavigationRail.tsx | 35 +++- .../sidebar/navigationRail.logic.test.ts | 19 +- .../sidebar/navigationRail.logic.ts | 12 +- apps/web/src/hooks/useInboxColumnLayout.ts | 30 ++- apps/web/src/routes/_chat.chats.tsx | 43 ++++- apps/web/src/uiStateStore.test.ts | 8 +- apps/web/src/uiStateStore.ts | 16 ++ packages/contracts/src/settings.ts | 14 ++ packages/shared/src/appPlaces.ts | 36 +++- 26 files changed, 1040 insertions(+), 221 deletions(-) create mode 100644 apps/web/src/components/chats/GeneralChatRows.tsx create mode 100644 apps/web/src/components/chats/GeneralChatsShelf.tsx create mode 100644 apps/web/src/components/chats/generalChatsPlacement.ts create mode 100644 apps/web/src/components/sidebar/InboxShelfHeader.tsx diff --git a/apps/desktop/src/settings/DesktopClientSettings.test.ts b/apps/desktop/src/settings/DesktopClientSettings.test.ts index e785543b6..a5c7acded 100644 --- a/apps/desktop/src/settings/DesktopClientSettings.test.ts +++ b/apps/desktop/src/settings/DesktopClientSettings.test.ts @@ -45,6 +45,7 @@ const clientSettings: ClientSettings = { providerModelPreferences: {}, suppressCrossProviderSwitchWarning: false, sidebarGrouping: "none", + generalChatsPlacement: "page", inboxSort: "recent", inboxCustomOrder: [], inboxGroupOrder: [], diff --git a/apps/server/src/guide/topics.ts b/apps/server/src/guide/topics.ts index abbeb68e3..aa1180b99 100644 --- a/apps/server/src/guide/topics.ts +++ b/apps/server/src/guide/topics.ts @@ -42,6 +42,7 @@ export const GUIDE_TOPICS: ReadonlyArray = [ "wrap", "archive", "restart", + "general chats", ], body: `A thread is one conversation with an agent in a project. Threads are listed in the sidebar; one that needs you, finished or failed says so there. In a narrow window the sidebar floats over the thread instead of sitting beside it: the sidebar button at the top left, or Cmd+B (Ctrl+B on Windows and Linux), opens it, and picking a thread or clicking the thread puts it away. A thread you scrolled up in opens where you left it when you come back, until Threadlines reloads; one that finished, failed or needs you since then opens at the end. @@ -63,6 +64,8 @@ When Claude or Codex asks multiple-choice questions, a card takes the place of t When a thread is done it wraps up and moves to the Wrapped shelf at the bottom of the sidebar; {place:threads.whenDone} says when that happens on its own. An agent coming back later (a check-back) doesn't keep a thread out of Wrapped: the thread returns to the list when the agent does. Old threads can be archived for you: {place:archived.cleanup}. +General Chats are chats with an agent that aren't tied to a project. By default they have their own page in the left bar, with a New chat button over the list. With {place:threads.generalChats} set to Section in Threads, that button leaves the left bar and the chats sit in a General chats section at the bottom of the thread list, under Wrapped: its header opens and closes it and has its own New chat button, and the Threads button counts what the chats need and are doing. Old General Chats links then open Threads with the section open. Each device keeps its own choice. + When Threadlines quits, updates or crashes while an agent works on something the user asked for, the agent picks it back up when Threadlines starts again: the chat gets a message marked "Sent after a restart" telling the agent to check before repeating anything. A turn waiting on an approval or a question, or one another thread, a scheduled task or an outside agent started, stops with a note instead, as does a turn restarts cut off three times in five minutes. {place:threads.continueAfterRestart} turns this off.`, }, { diff --git a/apps/web/src/components/AppSidebarLayout.tsx b/apps/web/src/components/AppSidebarLayout.tsx index 21aeda9c9..4870c42bb 100644 --- a/apps/web/src/components/AppSidebarLayout.tsx +++ b/apps/web/src/components/AppSidebarLayout.tsx @@ -26,6 +26,7 @@ import { selectThreadTerminalState, useTerminalStateStore } from "../terminalSta import { buildThreadRouteParams } from "../threadRoutes"; import { selectSidebarListShown, useUiStateStore } from "../uiStateStore"; import ThreadSidebar from "./Sidebar"; +import { consumeSidebarListReveal } from "./chats/generalChatsPlacement"; import { AppTitleBar } from "./sidebar/AppTitleBar"; import { TitleBarSlotContext } from "./sidebar/titleBarSlot"; import { destinationHasList } from "./sidebar/destinationLists"; @@ -299,14 +300,17 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) { const isMobile = useIsMobile(); const panelRef = useRef(null); useSidebarListFloats(panelRef, isMobile); - // A floating list gets out of the way of whatever page opens next. + // A floating list gets out of the way of whatever page opens next, unless + // the change was asked to show it (the old General Chats address, opening + // the chats' section in Threads). const pathname = useLocation({ select: (location) => location.pathname }); const shownPathname = useRef(pathname); useEffect(() => { if (shownPathname.current === pathname) return; shownPathname.current = pathname; const state = useUiStateStore.getState(); - if (state.sidebarListFloats) state.setSidebarListShown(false); + if (consumeSidebarListReveal(pathname)) state.setSidebarListShown(true); + else if (state.sidebarListFloats) state.setSidebarListShown(false); }, [pathname]); usePageCrossFade(panelRef, selectedDestination); // Dialogs and other window-wide layers center over the page beside the list. diff --git a/apps/web/src/components/ChatView.browser-harness.tsx b/apps/web/src/components/ChatView.browser-harness.tsx index 873b8a49c..1a3ce7310 100644 --- a/apps/web/src/components/ChatView.browser-harness.tsx +++ b/apps/web/src/components/ChatView.browser-harness.tsx @@ -3482,6 +3482,7 @@ export function registerChatViewSuiteHooks(): void { inboxProjectScopeKeys: [], collapsedInboxGroups: {}, inboxWrappedOpen: false, + inboxGeneralChatsOpen: true, sidebarListOpen: true, }); useTerminalStateStore.persist.clearStorage(); diff --git a/apps/web/src/components/ChatView.shell.browser.tsx b/apps/web/src/components/ChatView.shell.browser.tsx index 6b331c58b..0a699b4f2 100644 --- a/apps/web/src/components/ChatView.shell.browser.tsx +++ b/apps/web/src/components/ChatView.shell.browser.tsx @@ -15,6 +15,9 @@ import * as Effect from "effect/Effect"; import { page, userEvent } from "vite-plus/test/browser"; import { describe, expect, it, vi } from "vite-plus/test"; +import { DEFAULT_CLIENT_SETTINGS } from "@threadlines/contracts/settings"; + +import { CLIENT_SETTINGS_STORAGE_KEY } from "../clientPersistenceStorage"; import { useComposerDraftStore } from "../composerDraftStore"; import { isMacPlatform } from "../lib/utils"; import { useOptimisticThreadMessagesStore } from "../optimisticThreadMessages"; @@ -1091,6 +1094,52 @@ describe("ChatView (full app): app shell", () => { } }); + it("shows a floating list with the chats' section open when the old General Chats address leads to Threads", async () => { + localStorage.setItem( + CLIENT_SETTINGS_STORAGE_KEY, + JSON.stringify({ ...DEFAULT_CLIENT_SETTINGS, generalChatsPlacement: "threads" }), + ); + useUiStateStore.setState({ inboxGeneralChatsOpen: false }); + const mounted = await mountChatView({ + viewport: { ...DEFAULT_VIEWPORT, name: "list-floats-chats", width: 800 }, + snapshot: createSnapshotForTargetUser({ + targetMessageId: "msg-user-list-floats-chats" as MessageId, + targetText: "list floats chats", + }), + }); + + try { + const list = await waitForElement( + () => + document.querySelector('[data-testid="app-panel"] > [data-slot="sidebar"]'), + "Unable to find the list beside the rail.", + ); + await vi.waitFor(() => expect(list.dataset.state).toBe("collapsed")); + const threadPath = mounted.router.state.location.pathname; + // From another page, as the command palette or the desktop menu would go. + await mounted.router.navigate({ to: "/fleet" }); + await waitForURL(mounted.router, (pathname) => pathname === "/fleet", "Fleet should open."); + await mounted.router.navigate({ to: "/chats" }); + await waitForURL( + mounted.router, + (pathname) => pathname === threadPath, + "The old General Chats address should go where the Threads button does.", + ); + // Both page changes (to the old address, then on to Threads) leave it showing. + await nextFrames(5); + expect(list.dataset.state).toBe("expanded"); + await expect + .element(page.getByTestId("inbox-chats-toggle")) + .toHaveAttribute("aria-expanded", "true"); + // The next page change puts the floating list away as usual. + await mounted.router.navigate({ to: "/fleet" }); + await vi.waitFor(() => expect(list.dataset.state).toBe("collapsed")); + } finally { + localStorage.removeItem(CLIENT_SETTINGS_STORAGE_KEY); + await mounted.cleanup(); + } + }); + it("folds the app's name away, then gives the thread's header its own row, as the title row runs out of room", async () => { const root = document.documentElement; root.classList.add("electron", "wco"); @@ -1795,6 +1844,76 @@ describe("ChatView (full app): app shell", () => { } }); + it("on a phone with the chats in Threads, opens the sheet on them from the old page's address", async () => { + const chatId = "thread-phone-chat-section" as ThreadId; + const base = addThreadToSnapshot( + createSnapshotForTargetUser({ + targetMessageId: "msg-user-phone-chat-section" as MessageId, + targetText: "phone chat section", + }), + chatId, + ); + localStorage.setItem( + CLIENT_SETTINGS_STORAGE_KEY, + JSON.stringify({ ...DEFAULT_CLIENT_SETTINGS, generalChatsPlacement: "threads" }), + ); + useUiStateStore.setState({ inboxGeneralChatsOpen: false }); + const mounted = await mountChatView({ + viewport: PHONE_VIEWPORT, + snapshot: { + ...base, + projects: [ + ...base.projects, + { + id: GENERAL_CHATS_PROJECT_ID, + kind: "general-chat" as const, + title: "General Chats", + workspaceRoot: "/repo/general-chats", + defaultModelSelection: null, + scripts: [], + createdAt: NOW_ISO, + updatedAt: NOW_ISO, + deletedAt: null, + }, + ], + threads: base.threads.map((thread) => + thread.id === chatId + ? { ...thread, projectId: GENERAL_CHATS_PROJECT_ID, title: "Pocket question" } + : thread, + ), + }, + }); + + try { + await mounted.router.navigate({ to: "/chats" }); + await waitForURL( + mounted.router, + (pathname) => pathname !== "/chats", + "The old General Chats address should open Threads.", + ); + // The sheet opens on the thread list, with no Chats icon and the section open. + await expect + .element(page.getByTestId("sidebar-destination-row")) + .toMatchTextContent(/Threads.*Settings/); + expect(document.querySelector('[data-testid="rail-chats"]')).toBeNull(); + await expect + .element(page.getByTestId("inbox-chats-toggle")) + .toHaveAttribute("aria-expanded", "true"); + await expect.element(page.getByTestId(`thread-row-${THREAD_ID}`)).toBeVisible(); + + await page.getByTestId("chats-list-row").filter({ hasText: "Pocket question" }).click(); + await waitForURL( + mounted.router, + (pathname) => pathname.endsWith(`/${chatId}`), + "A chat in the sheet should open that chat.", + ); + await expect.element(page.getByTestId("sidebar-destination-row")).not.toBeInTheDocument(); + } finally { + localStorage.removeItem(CLIENT_SETTINGS_STORAGE_KEY); + await mounted.cleanup(); + } + }); + it("navigates phone settings through the full-page section index", async () => { const mounted = await mountChatView({ viewport: PHONE_VIEWPORT, diff --git a/apps/web/src/components/ChatView.sidebar.browser.tsx b/apps/web/src/components/ChatView.sidebar.browser.tsx index f6aaf4ee7..688e9be28 100644 --- a/apps/web/src/components/ChatView.sidebar.browser.tsx +++ b/apps/web/src/components/ChatView.sidebar.browser.tsx @@ -1116,6 +1116,125 @@ describe("ChatView (full app): sidebar", () => { } }); + it("lists general chats in a section of Threads when set to, opens it from the old page's address, and switching back restores the page", async () => { + const workingChatId = "thread-general-chat-section-working" as ThreadId; + const askingChatId = "thread-general-chat-section-asking" as ThreadId; + const withChats = addThreadToSnapshot( + addThreadToSnapshot( + createSnapshotForTargetUser({ + targetMessageId: "msg-user-general-chat-section" as MessageId, + targetText: "general chat section target", + }), + workingChatId, + ), + askingChatId, + ); + localStorage.setItem( + CLIENT_SETTINGS_STORAGE_KEY, + JSON.stringify({ ...DEFAULT_CLIENT_SETTINGS, generalChatsPlacement: "threads" }), + ); + const mounted = await mountChatView({ + viewport: DEFAULT_VIEWPORT, + snapshot: { + ...withChats, + projects: [ + ...withChats.projects, + { + id: GENERAL_CHATS_PROJECT_ID, + kind: "general-chat" as const, + title: "General Chats", + workspaceRoot: "/repo/general-chats", + defaultModelSelection: null, + scripts: [], + createdAt: NOW_ISO, + updatedAt: NOW_ISO, + deletedAt: null, + }, + ], + threads: withChats.threads.map((thread) => + thread.id === workingChatId + ? { + ...thread, + projectId: GENERAL_CHATS_PROJECT_ID, + title: "Best way to store passkeys", + } + : thread.id === askingChatId + ? { ...thread, projectId: GENERAL_CHATS_PROJECT_ID, title: "Draft reply" } + : thread, + ), + }, + }); + + try { + setSidebarThreadWork(LOCAL_ENVIRONMENT_ID, workingChatId, "working"); + setSidebarThreadWork(LOCAL_ENVIRONMENT_ID, askingChatId, "needs-you"); + // No General Chats button: Threads carries what the chats need. + const threadsButton = page.getByTestId("rail-threads"); + await expect + .element(threadsButton.getByTestId("rail-needs-you-badge")) + .toMatchTextContent("1"); + expect(document.querySelector('[data-testid="rail-chats"]')).toBeNull(); + + // The chats sit open at the foot of the thread list, beside the project's threads. + const toggle = page.getByTestId("inbox-chats-toggle"); + await expect.element(toggle).toHaveAttribute("aria-expanded", "true"); + await expect.element(page.getByTestId(`thread-row-${THREAD_ID}`)).toBeVisible(); + await expect + .element( + page + .getByTestId("chats-list-row") + .filter({ hasText: "Best way to store passkeys" }) + .getByTestId("chats-list-row-status"), + ) + .toMatchTextContent(/^working/); + await expect.element(page.getByTestId("inbox-chats-new-chat")).toBeVisible(); + + // Folded, the header says what the hidden chats are doing. + await toggle.click(); + await expect.element(toggle).toHaveAttribute("aria-expanded", "false"); + expect(document.querySelector('[data-testid="chats-list-row"]')).toBeNull(); + await expect + .element(page.getByTestId("inbox-chats-folded")) + .toMatchTextContent(/1 needs you.*1 working/); + // Starting a chat needs no unfolding. + await expect.element(page.getByTestId("inbox-chats-new-chat")).toBeVisible(); + + // The old page's address opens Threads with the section open. + await mounted.router.navigate({ to: "/chats" }); + await waitForURL( + mounted.router, + (pathname) => pathname !== "/chats", + "The old General Chats address should open Threads.", + ); + await expect.element(toggle).toHaveAttribute("aria-expanded", "true"); + await expect.element(threadsButton).toHaveAttribute("aria-current", "page"); + + await page.getByTestId("chats-list-row").filter({ hasText: "Draft reply" }).click(); + await waitForURL( + mounted.router, + (pathname) => pathname.endsWith(`/${askingChatId}`), + "A chat row should open its chat.", + ); + // A chat is part of Threads here. + await expect.element(threadsButton).toHaveAttribute("aria-current", "page"); + await expect + .element(page.getByTestId("chats-list-row").filter({ hasText: "Draft reply" })) + .toHaveAttribute("aria-current", "page"); + + // Back to its own page: the button returns, selected for the open chat, + // and the section leaves the thread list. + updateSettings({ generalChatsPlacement: "page" }); + await expect.element(page.getByTestId("rail-chats")).toHaveAttribute("aria-current", "page"); + await expect.element(page.getByTestId("inbox-chats-shelf")).not.toBeInTheDocument(); + await expect + .element(page.getByTestId("chats-list-row").filter({ hasText: "Draft reply" })) + .toHaveAttribute("aria-current", "page"); + } finally { + localStorage.removeItem(CLIENT_SETTINGS_STORAGE_KEY); + await mounted.cleanup(); + } + }); + it("swipes a general chat: left archives it with an undo, right pins it, and a working chat keeps it", async () => { const idleChatId = "thread-general-chat-swipe-idle" as ThreadId; const workingChatId = "thread-general-chat-swipe-working" as ThreadId; diff --git a/apps/web/src/components/CommandPaletteDialog.tsx b/apps/web/src/components/CommandPaletteDialog.tsx index 3fcfe4839..00d763bd5 100644 --- a/apps/web/src/components/CommandPaletteDialog.tsx +++ b/apps/web/src/components/CommandPaletteDialog.tsx @@ -46,6 +46,7 @@ import { LaptopIcon, LinkIcon, MessageSquareIcon, + MessageCirclePlusIcon, MessagesSquareIcon, PanelLeftCloseIcon, PanelLeftIcon, @@ -102,6 +103,7 @@ import { } from "../environments/runtime"; import { holdThreadDetailForOpen, prewarmHighlightedThread } from "../environments/runtime/service"; import { useHandleNewThread } from "../hooks/useHandleNewThread"; +import { useGeneralChats } from "./chats/useGeneralChats"; import { useInboxThreads } from "../hooks/useInboxThreads"; import { useThreadMenu } from "../hooks/useThreadMenu"; import { @@ -583,6 +585,7 @@ export function OpenCommandPaletteDialog() { ); const projects = useStore(useShallow(selectProjectsAcrossEnvironments)); const threads = useStore(useShallow(selectSidebarThreadsAcrossEnvironments)); + const { startChat: startGeneralChat } = useGeneralChats(); const keybindings = useServerKeybindings(); const isHomeRoute = useLocation({ select: (location) => location.pathname === "/" }); const onTerminalsPage = useLocation({ @@ -1824,6 +1827,19 @@ export function OpenCommandPaletteDialog() { }); } + if (startGeneralChat !== null) { + actionItems.push({ + kind: "action", + value: "action:new-general-chat", + searchTerms: ["new chat", "general chat", "chat", "conversation", "no project"], + title: "New general chat", + icon: , + run: async () => { + startGeneralChat(); + }, + }); + } + actionItems.push({ kind: "action", value: "action:general-chats", diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 4e9633292..359bb2eda 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -165,9 +165,12 @@ import { ThreadHoverCardProvider } from "./sidebar/ThreadHoverCard"; import { resolveThreadActionProjectRef, startNewGeneralChatThread } from "../lib/chatThreadActions"; import { SidebarDestinationRow, useSelectedDestination } from "./sidebar/NavigationRail"; import { AppWordmark } from "./sidebar/AppWordmark"; +import { InboxShelfHeader } from "./sidebar/InboxShelfHeader"; import { resolveShownDestinationList } from "./sidebar/destinationLists"; import { useListNewThreadStore } from "./sidebar/listNewThreadStore"; import { useGeneralChats } from "./chats/useGeneralChats"; +import { useGeneralChatsInThreads } from "./chats/generalChatsPlacement"; +import { GeneralChatsShelf } from "./chats/GeneralChatsShelf"; import { AttentionCounts } from "./sidebar/AttentionCounts"; import { ProjectFavicon } from "./ProjectFavicon"; import { isRoom } from "../rooms"; @@ -343,7 +346,8 @@ function inboxLiveGroupKey( * chat): a section's name, its count, how many wrapped today, then a hairline * running out to the chevron. The whole line is the control. Open, it rises * with its own scroll: as tall as its rows, and no taller than leaves the - * live list room for all of its rows or half the column, whichever is more. + * live list room for all of its rows or half the column, whichever is more + * (the column less the General chats section under it, when that is there). * The live list above keeps its place and scrolls in what is left. */ function InboxWrappedShelf({ @@ -351,6 +355,7 @@ function InboxWrappedShelf({ count, todayCount, liveContentHeight, + chatsShelfPx, shelfRef, onToggle, foldLine, @@ -361,6 +366,8 @@ function InboxWrappedShelf({ todayCount: number; /** See InboxColumnLayout.liveContentHeight. */ liveContentHeight: number | null; + /** See InboxColumnLayout.chatsShelfPx: the room under the shelf it doesn't share. */ + chatsShelfPx: number; shelfRef: (element: HTMLElement | null) => void; onToggle: () => void; /** The "Show N more…" line under the rows; open only. */ @@ -378,43 +385,31 @@ function InboxWrappedShelf({ ? { maxHeight: liveContentHeight === null - ? "50%" - : `max(50%, calc(100% - ${liveContentHeight}px))`, + ? `calc((100% - ${chatsShelfPx}px) / 2)` + : `max(calc((100% - ${chatsShelfPx}px) / 2), calc(100% - ${chatsShelfPx + liveContentHeight}px))`, } : undefined } > - + 0 ? ( + + · {todayCount} today + + ) : null + } + /> {open ? ( {children} @@ -427,6 +422,12 @@ function InboxWrappedShelf({ ); } +/** + * The open General chats section's cap: about a third of the column, so the + * live list keeps most of it even with Wrapped open too. + */ +const GENERAL_CHATS_SHELF_MAX_HEIGHT = "35%"; + /** A day's label over the first of its rows in the open Wrapped shelf. */ function InboxWrappedDayLabel({ group }: { group: WrappedDayGroup }) { return ( @@ -673,10 +674,13 @@ export default function Sidebar() { remoteChildRowPx, groupHeaderPx, doneRowPx, + chatsShelfPx, columnRef: inboxColumnRef, liveContentRef: inboxLiveContentRef, shelfRef: wrappedShelfRef, + chatsShelfRef, } = useInboxColumnLayout(); + const generalChatsInThreads = useGeneralChatsInThreads(); const todayStartMs = useLocalDayStartMs(); const renamingCommittedRef = useRef(false); const renamingInputRef = useRef(null); @@ -2046,7 +2050,8 @@ export default function Sidebar() { {isMobile ? : null} {PageListBody !== null ? ( - // A page with a list of its own (General chats, Computers, Settings) + // A page with a list of its own (General chats unless they are a + // section of Threads, Computers, Settings) // on a wide screen; on a phone, only one whose list is in the sheet. <> {/* Holds the list's place while its code loads, so the footer stays put. */} @@ -2396,7 +2401,7 @@ export default function Sidebar() { ) : null} - {wrappedRows.length > 0 ? ( + {wrappedRows.length > 0 || generalChatsInThreads ? (