diff --git a/apps/desktop/src/settings/DesktopClientSettings.test.ts b/apps/desktop/src/settings/DesktopClientSettings.test.ts index 90c8740f83725..e52ae7e4cd607 100644 --- a/apps/desktop/src/settings/DesktopClientSettings.test.ts +++ b/apps/desktop/src/settings/DesktopClientSettings.test.ts @@ -66,6 +66,7 @@ const clientSettings: ClientSettings = { threadDetailsUsageEnabled: false, threadDetailsItems: {}, sidebarWorkingShelfEnabled: false, + sidebarSectionTabsEnabled: true, loadBalancingEnabled: false, loadBalancingWeights: { "environment-1": 75, "environment-2": 0 }, pullRequestMergeMethodOverrides: {}, diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index 7157e7aaa75b9..93589f12c3a2e 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -258,6 +258,7 @@ import { SidebarContent, SidebarGroup, useSidebar } from "./ui/sidebar"; import { SidebarChromeFooter, SidebarChromeHeader } from "./sidebar/SidebarChrome"; import { SidebarHeaderIconButton, SidebarThreadHeader } from "./sidebar/SidebarThreadHeader"; import { TooltipProvider } from "./ui/tooltip"; +import { SidebarSwipeArea, SidebarTab, SidebarTabBar } from "./sidebar/SidebarTabs"; import { composerDraftHasUserContent, DraftId, @@ -279,6 +280,7 @@ import { import { SidebarDragBoundary, SidebarSectionHeader, + SidebarSectionBoundary, SidebarSectionPlaceholder, } from "./sidebar/SidebarListMarkers"; @@ -339,6 +341,9 @@ const SETTLED_TAIL_PAGE_COUNT = 25; const SETTLED_SHELF_EXPANDED_KEY = "t3code:sidebar:settled-expanded"; const SNOOZED_SHELF_EXPANDED_KEY = "t3code:sidebar:snoozed-expanded"; const WORKING_SHELF_EXPANDED_KEY = "t3code:sidebar:working-expanded"; +const SIDEBAR_TAB_KEY = "t3code:sidebar:tab"; +// Enough rows to fill the sidebar beside a tab swipe without mounting a whole section. +const SWIPE_PREVIEW_ROW_COUNT = 20; const inboxReturns = createInboxReturnTracker(); @@ -456,21 +461,43 @@ function useSidebarThreads(input: { const nowMinute = useNowMinute(); // Minute-quantized clocks would delay second-precise snooze wakes by up to a minute. const snoozeWakeClock = useSnoozeWakeClock(threads); - const [settledShelfExpanded, setSettledShelfExpanded] = useLocalStorage( + const [storedSettledExpanded, setSettledShelfExpanded] = useLocalStorage( SETTLED_SHELF_EXPANDED_KEY, false, Schema.Boolean, ); - const [snoozedShelfExpanded, setSnoozedShelfExpanded] = useLocalStorage( + const [storedSnoozedExpanded, setSnoozedShelfExpanded] = useLocalStorage( SNOOZED_SHELF_EXPANDED_KEY, false, Schema.Boolean, ); - const [workingShelfExpanded, setWorkingShelfExpanded] = useLocalStorage( + const [storedWorkingExpanded, setWorkingShelfExpanded] = useLocalStorage( WORKING_SHELF_EXPANDED_KEY, false, Schema.Boolean, ); + const sectionTabsEnabled = useClientSettings((s) => s.sidebarSectionTabsEnabled); + const [storedTab, setSidebarTab] = useLocalStorage( + SIDEBAR_TAB_KEY, + "active", + SidebarTab, + ); + // Null when the sidebar stacks its sections instead of showing one tab at a time. + const sidebarTab = !sectionTabsEnabled + ? null + : storedTab === "working" && !workingShelfEnabled + ? "active" + : storedTab; + const settledShelfExpanded = + sidebarTab === null ? storedSettledExpanded : sidebarTab === "settled"; + const snoozedShelfExpanded = + sidebarTab === null ? storedSnoozedExpanded : sidebarTab === "snoozed"; + const workingShelfExpanded = + sidebarTab === null ? storedWorkingExpanded : sidebarTab === "working"; + // A collapsed section still shows the open thread; a tab that is not selected shows nothing. + const collapsedRows = (list: readonly EnvironmentThreadShell[]) => + sidebarTab === null ? routeThreadOnly(list, routeRowThreadKey) : EMPTY_THREADS; + const activeSectionVisible = sidebarTab === null || sidebarTab === "active"; // Shared with the old per-project sidebar, so folders keep their open state. const projectExpandedById = useUiStateStore((store) => store.projectExpandedById); const setProjectExpanded = useUiStateStore((store) => store.setProjectExpanded); @@ -523,14 +550,15 @@ function useSidebarThreads(input: { })(); const renderedSettledThreads = settledShelfExpanded ? visibleSettledThreads - : routeThreadOnly(visibleSettledThreads, routeRowThreadKey); + : collapsedRows(visibleSettledThreads); const visibleSnoozedThreads = snoozedShelfExpanded ? snoozedThreads - : routeThreadOnly(snoozedThreads, routeRowThreadKey); + : collapsedRows(snoozedThreads); const visibleWorkingThreads = workingShelfExpanded ? workingThreads - : routeThreadOnly(workingThreads, routeRowThreadKey); - const projectFolders = + : collapsedRows(workingThreads); + const visibleActiveThreads = activeSectionVisible ? activeThreads : EMPTY_THREADS; + const allProjectFolders = folderGroups === null ? null : groupSidebarThreadsByProject(folderGroups, activeThreads, keepEmpty).map((folder) => { @@ -550,15 +578,30 @@ function useSidebarThreads(input: { : EMPTY_THREADS, }; }); + const projectFolders = + activeSectionVisible || allProjectFolders === null ? allProjectFolders : []; const orderedThreads = [ ...pinnedThreads, ...(projectFolders === null - ? activeThreads + ? visibleActiveThreads : projectFolders.flatMap((folder) => folder.threads)), ...visibleWorkingThreads, ...visibleSnoozedThreads, ...renderedSettledThreads, ]; + // Settle-and-advance reads every tab, so the open thread still advances while another tab shows. + const navigationThreads = + sidebarTab === null + ? orderedThreads + : [ + ...pinnedThreads, + ...(allProjectFolders === null + ? activeThreads + : allProjectFolders.flatMap((folder) => folder.threads)), + ...workingThreads, + ...snoozedThreads, + ...visibleSettledThreads, + ]; const sectionByThreadKey = new Map(); for (const [list, section] of [ [pinnedThreads, "pinned"], @@ -595,6 +638,10 @@ function useSidebarThreads(input: { toggleSnoozedShelf: () => setSnoozedShelfExpanded((value) => !value), workingShelfExpanded, toggleWorkingShelf: () => setWorkingShelfExpanded((value) => !value), + sidebarTab, + setSidebarTab, + visibleActiveThreads, + visibleSettledThreads, projectFolders, toggleProjectFolder: (group: SidebarProjectSnapshot) => { const keys = sidebarFolderExpansionKeys(group); @@ -605,6 +652,9 @@ function useSidebarThreads(input: { visibleWorkingThreads, orderedThreadKeys: orderedThreads.map(threadShellKey), threadByKey: new Map(orderedThreads.map((thread) => [threadShellKey(thread), thread] as const)), + navigationThreadByKey: new Map( + navigationThreads.map((thread) => [threadShellKey(thread), thread] as const), + ), settledThreadKeys: new Set(settledThreads.map(threadShellKey)), snoozedThreadKeys: new Set(snoozedThreads.map(threadShellKey)), sectionByThreadKey, @@ -1329,6 +1379,10 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve toggleSnoozedShelf, workingShelfExpanded, toggleWorkingShelf, + sidebarTab, + setSidebarTab, + visibleActiveThreads, + visibleSettledThreads, projectFolders, toggleProjectFolder, renderedSettledThreads, @@ -1336,6 +1390,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve visibleWorkingThreads, orderedThreadKeys, threadByKey, + navigationThreadByKey, settledThreadKeys, snoozedThreadKeys, sectionByThreadKey, @@ -1438,6 +1493,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve const orderedThreadKeysRef = useRef(orderedThreadKeys); // Read changing maps/sets through refs so streamed events preserve row callbacks. const threadByKeyRef = useRef(threadByKey); + const navigationThreadByKeyRef = useRef(navigationThreadByKey); const settledThreadKeysRef = useRef(settledThreadKeys); const snoozedThreadKeysRef = useRef(snoozedThreadKeys); @@ -1601,8 +1657,9 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve coParkingKeys?: ReadonlySet, ): (() => void) | null => { if (readRouteThreadKey(router) !== threadKey) return null; - const shell = threadByKeyRef.current.get(threadKey); - const orderedKeys = orderedThreadKeysRef.current; + const threadByKey = navigationThreadByKeyRef.current; + const shell = threadByKey.get(threadKey); + const orderedKeys = [...threadByKey.keys()]; const settledKeys = settledThreadKeysRef.current; const snoozedKeys = snoozedThreadKeysRef.current; const currentIndex = orderedKeys.indexOf(threadKey); @@ -1612,7 +1669,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve : ([...orderedKeys.slice(currentIndex + 1), ...orderedKeys.slice(0, currentIndex)].find( (key) => !settledKeys.has(key) && !snoozedKeys.has(key) && !coParkingKeys?.has(key), ) ?? null); - const nextThread = nextCardKey ? threadByKeyRef.current.get(nextCardKey) : null; + const nextThread = nextCardKey ? threadByKey.get(nextCardKey) : null; return nextThread ? () => navigateToThread(scopeThreadRef(nextThread.environmentId, nextThread.id)) : shell @@ -1815,6 +1872,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve projectGroupsRef.current = projectGroups; orderedThreadKeysRef.current = orderedThreadKeys; threadByKeyRef.current = threadByKey; + navigationThreadByKeyRef.current = navigationThreadByKey; settledThreadKeysRef.current = settledThreadKeys; snoozedThreadKeysRef.current = snoozedThreadKeys; sectionByThreadKeyRef.current = sectionByThreadKey; @@ -1970,7 +2028,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve const pinnedRows = rowsOf(pinnedThreads, "pinned"); items.push(...pinnedRows); items.push({ kind: "marker", marker: "pinned-divider" }); - const activeRows = rowsOf(activeThreads, "active"); + const activeRows = rowsOf(visibleActiveThreads, "active"); items.push({ kind: "marker", marker: "active-placeholder" }); items.push(...activeRows); if (workingThreads.length > 0) { @@ -2022,9 +2080,12 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve dragState === null && sidebarListItems.length + visibleDraftSessionCount > 0; // Cache on both fields so layout-key changes trigger the effect even when animate is unchanged. const listMotionPass = { layoutKey: listMotionLayoutKey, animate: listMotionAnimate }; - const shelfExpansionKey = [workingShelfExpanded, snoozedShelfExpanded, settledShelfExpanded].join( - ":", - ); + const shelfExpansionKey = [ + sidebarTab, + workingShelfExpanded, + snoozedShelfExpanded, + settledShelfExpanded, + ].join(":"); const previousShelfExpansionKeyRef = useRef(shelfExpansionKey); // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- records moved rows and updates list motion after each layout-affecting commit useLayoutEffect(() => { @@ -2975,6 +3036,118 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve ? shortcutLabelForCommand(keybindings, "chat.newLocal") : undefined); const newThreadInProjectShortcutLabel = shortcutLabelForCommand(keybindings, "chat.newLocal"); + const renderThreadRow = ( + thread: EnvironmentThreadShell, + section: SidebarSection, + // The tree row of the project folder this row sits in. + folderRow?: string, + swipePreview = false, + ) => { + const threadKey = scopedThreadKey(scopeThreadRef(thread.environmentId, thread.id)); + const isCard = section === "active" || section === "pinned" || section === "working"; + const rowVariant = folderRow + ? folderRowsMultiline + ? "folder-multiline" + : "folder" + : isCard + ? "card" + : "slim"; + return ( + + ); + }; + + // The neighbouring tab's first rows as its list draws them, shown beside a tab swipe. + const renderSwipePreview = (tab: SidebarTab) => { + const section: SidebarSection = tab; + const tabThreads = + tab === "active" + ? activeThreads + : tab === "working" + ? workingThreads + : tab === "snoozed" + ? snoozedThreads + : visibleSettledThreads; + return [ + ...pinnedThreads.map((thread) => ({ thread, section: "pinned" as const })), + ...tabThreads.map((thread) => ({ thread, section })), + ] + .slice(0, SWIPE_PREVIEW_ROW_COUNT) + .map((row) => renderThreadRow(row.thread, row.section, undefined, true)); + }; + return ( @@ -3218,6 +3391,19 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve activeSearchResultIndex={activeSearchResultIndex} onClearSearch={clearThreadSearch} /> + {sidebarTab !== null && !isSearchingThreads ? ( + + ) : null} } > @@ -3364,341 +3550,251 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve closeDelay={0} timeout={400} > - - -
    0 && "flex-1", - actionSweep !== null && "**:pointer-events-none", - // Projected rows (two boundary labels, two hints) extend the scroll range; a range that - // shrinks as the target changes clamps scrollTop and flips the target under a still pointer. - dragState !== null && - "after:pointer-events-none after:absolute after:inset-x-0 after:-bottom-30 after:h-px after:content-['']", - )} + {(() => { + const threadList = ( + - {(() => { - const renderThreadRow = ( - thread: EnvironmentThreadShell, - section: SidebarSection, - // The tree row of the project folder this row sits in. - folderRow?: string, - ) => { - const threadKey = scopedThreadKey( - scopeThreadRef(thread.environmentId, thread.id), - ); - const isCard = - section === "active" || section === "pinned" || section === "working"; - const rowVariant = folderRow - ? folderRowsMultiline - ? "folder-multiline" - : "folder" - : isCard - ? "card" - : "slim"; - return ( - +
      0 && "flex-1", + actionSweep !== null && "**:pointer-events-none", + // Projected rows (two boundary labels, two hints) extend the scroll range; a range that + // shrinks as the target changes clamps scrollTop and flips the target under a still pointer. + dragState !== null && + "after:pointer-events-none after:absolute after:inset-x-0 after:-bottom-30 after:h-px after:content-['']", + )} + > + {(() => { + const from = isContextDrag ? null : (dragState?.activeSection ?? null); + const items: ReactNode[] = [ + , + ]; + for (const item of sidebarListItems) { + if (item.kind === "thread") { + // Folders draw active rows in their own place below. + if (projectFolders !== null && item.section === "active") continue; + items.push(renderThreadRow(threadByKey.get(item.key)!, item.section)); + continue; } - variantAction={ - section === "snoozed" - ? "unsnooze" - : section === "settled" - ? "unsettle" - : "settle" - } - settlementSupported={serverConfigs.has(thread.environmentId)} - snoozeSupported={serverConfigs.has(thread.environmentId)} - pinningSupported={serverConfigs.has(thread.environmentId)} - isPinned={thread.pinnedAt != null} - dropVerb={ - dragState?.activeKey === threadKey - ? resolveSidebarDropVerb(dragState.activeSection, dragTargetSection) - : null - } - dragOverPinned={ - dragState?.activeKey === threadKey && dragTargetSection === "pinned" - } - sweepAction={ - actionSweep?.keys.has(threadKey) ? actionSweep.action : null - } - snoozeWakeLabelText={ - section === "snoozed" && thread.snoozedUntil != null - ? snoozeWakeLabel( - thread.snoozedUntil, - { now: new Date().toISOString() }, - messages, - ) - : null - } - wokeAt={threadWokeAt(thread, { now: snoozeNow })} - isActive={routeRowThreadKey === threadKey} - revealRef={ - routeRowThreadKey === threadKey ? revealActiveRow : undefined - } - isRouteThread={routeThreadKey === threadKey} - readOpensPullRequestsInRightPanel={readOpensPullRequestsInRightPanel} - jumpLabel={ - showJumpHints ? (jumpLabelByKey.get(threadKey) ?? null) : null - } - currentEnvironmentId={primaryEnvironmentId} - environmentLabel={ - environmentLabelById.get(thread.environmentId) ?? null - } - environmentMachine={ - environmentMachineById.get(thread.environmentId) ?? "server" - } - scratchMachineLabel={scratchMachineLabelFor(thread)} - project={ - projectByKey.get(`${thread.environmentId}:${thread.projectId}`) ?? - null - } - projectDisplayName={ - projectDisplayNameByKey.get( - `${thread.environmentId}:${thread.projectId}`, - ) ?? null - } - providerEntryByInstanceId={ - providerEntriesByEnvironment.get(thread.environmentId) ?? - EMPTY_PROVIDER_ENTRIES + if (projectFolders !== null && item.marker === "active-placeholder") { + for (const folder of projectFolders) { + items.push( + , + ); + for (const thread of folder.threads) { + items.push( + renderThreadRow( + thread, + "active", + sidebarFolderRowId(folder.group.projectKey), + ), + ); + } + } + continue; } - timestampFormat={timestampFormat} - onThreadClick={handleThreadClick} - onThreadActivate={navigateToThread} - onStartRename={startThreadRename} - onRenameTitleChange={setRenamingTitle} - onCommitRename={commitThreadRename} - onCancelRename={cancelThreadRename} - isRenaming={renamingThreadKey === threadKey} - renamingTitle={renamingThreadKey === threadKey ? renamingTitle : ""} - onContextMenu={handleThreadContextMenu} - onSettle={attemptSettle} - onActionSweepStart={startActionSweep} - onUnsettle={attemptUnsettle} - onSnooze={attemptSnooze} - onUnsnooze={attemptUnsnooze} - onUnpin={attemptUnpin} - onAcknowledgeWoke={acknowledgeWoke} - onFileDropThreads={handleThreadFileDrop} - /> - ); - }; - const from = isContextDrag ? null : (dragState?.activeSection ?? null); - const items: ReactNode[] = [ - , - ]; - for (const item of sidebarListItems) { - if (item.kind === "thread") { - // Folders draw active rows in their own place below. - if (projectFolders !== null && item.section === "active") continue; - items.push(renderThreadRow(threadByKey.get(item.key)!, item.section)); - continue; - } - if (projectFolders !== null && item.marker === "active-placeholder") { - for (const folder of projectFolders) { - items.push( - , - ); - for (const thread of folder.threads) { + if ( + sidebarTab !== null && + (item.marker === "working-header" || + item.marker === "snoozed-header" || + item.marker === "settled-header") + ) { items.push( - renderThreadRow( - thread, - "active", - sidebarFolderRowId(folder.group.projectKey), - ), + , ); + continue; + } + switch (item.marker) { + case "pinned-header": + items.push( + , + ); + break; + case "pinned-divider": + items.push( + , + ); + break; + case "active-placeholder": + items.push( + , + ); + break; + case "working-header": + items.push( + , + ); + break; + case "snoozed-header": + items.push( + , + ); + break; + case "settled-header": + items.push( + , + ); + break; + case "settled-placeholder": + items.push( + , + ); + break; } } - continue; - } - switch (item.marker) { - case "pinned-header": - items.push( - , - ); - break; - case "pinned-divider": - items.push( - , - ); - break; - case "active-placeholder": - items.push( - , - ); - break; - case "working-header": - items.push( - , - ); - break; - case "snoozed-header": - items.push( - , - ); - break; - case "settled-header": - items.push( - , - ); - break; - case "settled-placeholder": - items.push( - , - ); - break; - } - } - return items; - })()} - {settledShelfExpanded && hiddenSettledCount > 0 ? ( -
    • - -
    • - ) : null} -
    - -
    + return items; + })()} + {settledShelfExpanded && hiddenSettledCount > 0 ? ( +
  • + +
  • + ) : null} +
+
+
+ ); + return sidebarTab === null ? ( + threadList + ) : ( + + {threadList} + + ); + })()} ) : null} diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsx index e0a12417848fa..a7468c8c71adc 100644 --- a/apps/web/src/components/settings/SettingsPanels.tsx +++ b/apps/web/src/components/settings/SettingsPanels.tsx @@ -532,6 +532,9 @@ export function useSettingsRestore(onRestored?: () => void) { ...(settings.sidebarWorkingShelfEnabled !== DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled ? [gt("Working section")] : []), + ...(settings.sidebarSectionTabsEnabled !== DEFAULT_UNIFIED_SETTINGS.sidebarSectionTabsEnabled + ? ["Section tabs"] + : []), ...(settings.sidebarAutoSettleAfterDays !== DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays ? [gt("Auto-settle inactive threads")] : []), @@ -719,6 +722,7 @@ export function useSettingsRestore(onRestored?: () => void) { sidebarProjectGroupingMode: DEFAULT_UNIFIED_SETTINGS.sidebarProjectGroupingMode, sidebarProjectSortOrder: DEFAULT_UNIFIED_SETTINGS.sidebarProjectSortOrder, sidebarWorkingShelfEnabled: DEFAULT_UNIFIED_SETTINGS.sidebarWorkingShelfEnabled, + sidebarSectionTabsEnabled: DEFAULT_UNIFIED_SETTINGS.sidebarSectionTabsEnabled, sidebarAutoSettleAfterDays: DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays, sidebarAutoSettleKeepPullRequests: DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleKeepPullRequests, sidebarAutoSettleOnMerge: DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge, @@ -965,6 +969,37 @@ export function GeneralSettingsPanel() { /> } /> + + Show one sidebar section at a time, with tabs for Active, Working, Snoozed and + Settled. Swipe sideways with two fingers on a trackpad to switch tabs. + + } + resetAction={ + settings.sidebarSectionTabsEnabled !== + DEFAULT_UNIFIED_SETTINGS.sidebarSectionTabsEnabled ? ( + + updateSettings({ + sidebarSectionTabsEnabled: DEFAULT_UNIFIED_SETTINGS.sidebarSectionTabsEnabled, + }) + } + /> + ) : null + } + control={ + + updateSettings({ sidebarSectionTabsEnabled: Boolean(checked) }) + } + aria-label={gt("Section tabs")} + /> + } + /> diff --git a/apps/web/src/components/settings/settingsSearch.ts b/apps/web/src/components/settings/settingsSearch.ts index b02f8d2f0b0c8..95a0f30e68e29 100644 --- a/apps/web/src/components/settings/settingsSearch.ts +++ b/apps/web/src/components/settings/settingsSearch.ts @@ -487,6 +487,12 @@ export const SETTINGS_SEARCH_ITEMS = [ to: "/settings/general", searchTerms: [msg("hide fold running monitoring threads inbox sidebar shelf")], }, + { + id: "sidebar-section-tabs", + title: msg("Section tabs"), + to: "/settings/general", + searchTerms: [msg("sidebar tabs accordion swipe trackpad snoozed settled working sections")], + }, { id: "boring-sidebar", title: msg("Boring sidebar (group by project)"), diff --git a/apps/web/src/components/sidebar/SidebarListMarkers.tsx b/apps/web/src/components/sidebar/SidebarListMarkers.tsx index da9444a5c1b24..aa3f1e7f79c0c 100644 --- a/apps/web/src/components/sidebar/SidebarListMarkers.tsx +++ b/apps/web/src/components/sidebar/SidebarListMarkers.tsx @@ -145,3 +145,10 @@ export function SidebarSectionHeader(props: { ); } + +// With section tabs the tab bar replaces the headers, but they still bound the drag sections. +export function SidebarSectionBoundary(props: { + marker: "working-header" | "snoozed-header" | "settled-header"; +}) { + return ; +} diff --git a/apps/web/src/components/sidebar/SidebarTabs.browser.test.tsx b/apps/web/src/components/sidebar/SidebarTabs.browser.test.tsx new file mode 100644 index 0000000000000..d577da9670a29 --- /dev/null +++ b/apps/web/src/components/sidebar/SidebarTabs.browser.test.tsx @@ -0,0 +1,47 @@ +import { useState } from "react"; +import { describe, expect, it, vi } from "vite-plus/test"; + +import "~/index.css"; +import { act, fakeTimers, render } from "../../../test/render"; +import { SidebarSwipeArea, type SidebarTab } from "./SidebarTabs"; + +function SwipeHarness() { + const [tab, setTab] = useState("active"); + return ( +
+ {tab} + +
  • {preview}
  • } + > +
      +
    • {tab}
    • +
    +
    +
    + ); +} + +describe("SidebarSwipeArea", () => { + it("keeps a tab picked while a swipe is still landing", async () => { + // No router: the harness has no links or routes. + await using screen = await render(, { router: false }); + using _timers = fakeTimers(); + const area = screen.container.querySelector("[data-sidebar-swipe-panel]")!.parentElement!; + + await act(() => { + area.dispatchEvent(new WheelEvent("wheel", { deltaX: 200, cancelable: true })); + }); + const panel = area.querySelector("[data-sidebar-swipe-panel]")!; + expect(panel.style.transform).toBe("translateX(-300px)"); + await act(() => screen.container.querySelector("button")!.click()); + await act(() => vi.advanceTimersByTime(500)); + + expect(screen.container.querySelector("output")?.textContent).toBe("settled"); + }); +}); diff --git a/apps/web/src/components/sidebar/SidebarTabs.tsx b/apps/web/src/components/sidebar/SidebarTabs.tsx new file mode 100644 index 0000000000000..6b27fda5ff937 --- /dev/null +++ b/apps/web/src/components/sidebar/SidebarTabs.tsx @@ -0,0 +1,302 @@ +import { + AlarmClockIcon, + CheckIcon, + CircleDashedIcon, + InboxIcon, + type LucideIcon, +} from "lucide-react"; +import * as Schema from "effect/Schema"; +import { msg, useGT, useMessages } from "gt-react"; +import { Activity, type ReactNode, useRef, useState } from "react"; +import { flushSync } from "react-dom"; + +import { Toggle, ToggleGroup } from "../ui/toggle-group"; +import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip"; +import { + endTabSwipe, + stepTabSwipe, + TAB_SWIPE_GAP_MS, + TAB_SWIPE_IDLE, + type TabSwipeState, +} from "./sidebarTabSwipe.logic"; + +export const SidebarTab = Schema.Literals(["active", "working", "snoozed", "settled"]); +export type SidebarTab = typeof SidebarTab.Type; + +const SIDEBAR_TABS = [ + { value: "active", label: msg("Active", { $context: "sidebar section" }), icon: InboxIcon }, + { + value: "working", + label: msg("Working", { $context: "sidebar section" }), + icon: CircleDashedIcon, + }, + { + value: "snoozed", + label: msg("Snoozed", { $context: "sidebar section" }), + icon: AlarmClockIcon, + }, + { value: "settled", label: msg("Settled", { $context: "sidebar section" }), icon: CheckIcon }, +] as const satisfies ReadonlyArray<{ value: SidebarTab; label: string; icon: LucideIcon }>; + +function sidebarTabsFor(workingShelfEnabled: boolean) { + return workingShelfEnabled ? SIDEBAR_TABS : SIDEBAR_TABS.filter((tab) => tab.value !== "working"); +} + +// Ease-out with a fast start, so the list keeps the finger's speed for the first frames. +const SETTLE_MS = 200; +const SETTLE_EASING = "cubic-bezier(0.2, 0, 0, 1)"; + +export function SidebarTabBar(props: { + value: SidebarTab; + onValueChange: (tab: SidebarTab) => void; + counts: Record; + workingShelfEnabled: boolean; +}) { + const gt = useGT(); + const m = useMessages(); + return ( + // Wide sidebars label every tab, medium ones only the selected tab, narrow ones show icons. +
    + { + const next = SIDEBAR_TABS.find((tab) => tab.value === value[0]); + if (next !== undefined) props.onValueChange(next.value); + }} + > + {sidebarTabsFor(props.workingShelfEnabled).map((tab) => { + const label = gt("{section} ({count})", { + section: m(tab.label), + count: props.counts[tab.value], + }); + return ( + + + } + > + + + {m(tab.label)} + + + {label} + + ); + })} + +
    + ); +} + +interface SwipeSession { + state: TabSwipeState; + // The neighbour currently drawn beside the list: 1 = next, -1 = previous. + direction: 1 | -1 | null; + gapTimer: ReturnType | undefined; + settleTimer: ReturnType | undefined; + landingTab: SidebarTab | null; + // The tab a pending landing leaves; picking any other tab meanwhile drops the landing. + landingFrom: SidebarTab | null; +} + +// A two-finger horizontal swipe over the list drags it with the fingers and reveals the +// neighbouring tab beside it; crossing half the width switches tabs. Movement is written straight +// to the DOM, so a gesture never re-renders `children`. +export function SidebarSwipeArea(props: { + value: SidebarTab; + onValueChange: (tab: SidebarTab) => void; + workingShelfEnabled: boolean; + renderPreview: (tab: SidebarTab) => ReactNode; + children: ReactNode; +}) { + const { value, onValueChange, renderPreview, children } = props; + const tabs = sidebarTabsFor(props.workingShelfEnabled); + const index = tabs.findIndex((tab) => tab.value === value); + const previous = tabs[index - 1]?.value; + const next = tabs[index + 1]?.value; + const [shownDirection, setShownDirection] = useState<1 | -1 | null>(null); + const sessionRef = useRef({ + state: TAB_SWIPE_IDLE, + direction: null, + gapTimer: undefined, + settleTimer: undefined, + landingTab: null, + landingFrom: null, + }); + + const attachArea = (area: HTMLElement | null) => { + if (area === null) return; + const session = sessionRef.current; + const panel = area.querySelector(":scope > [data-sidebar-swipe-panel]")!; + const previewOf = (direction: 1 | -1) => + area.querySelector(`:scope > [data-sidebar-swipe-preview="${direction}"]`); + const viewport = area.closest("[data-slot=scroll-area-viewport]"); + // The list can be scrolled; draw the neighbour at the top of what is visible. + const visibleTop = () => + viewport === null + ? 0 + : Math.max(0, viewport.getBoundingClientRect().top - area.getBoundingClientRect().top); + + const show = (direction: 1 | -1 | null) => { + if (session.direction === direction) return; + session.direction = direction; + const preview = direction === null ? null : previewOf(direction); + if (preview !== null) { + preview.style.top = `${visibleTop()}px`; + preview.style.height = `${viewport?.clientHeight ?? area.clientHeight}px`; + } + setShownDirection(direction); + }; + + const place = (offset: number, transition: string) => { + const width = panel.clientWidth; + panel.style.transition = transition; + panel.style.transform = `translateX(${-offset}px)`; + panel.style.willChange = "transform"; + const preview = session.direction === null ? null : previewOf(session.direction); + if (preview !== null) { + preview.style.transition = transition; + preview.style.transform = `translateX(${session.direction! * width - offset}px)`; + } + }; + + const finishSettle = (land: boolean) => { + clearTimeout(session.settleTimer); + session.settleTimer = undefined; + const landing = land ? session.landingTab : null; + session.landingTab = null; + session.landingFrom = null; + if (landing !== null && viewport !== null) { + // The neighbour was drawn at the top of the viewport; keep its rows where they were. + const listTop = + viewport.scrollTop + + area.getBoundingClientRect().top - + viewport.getBoundingClientRect().top; + viewport.scrollTop = Math.min(viewport.scrollTop, listTop); + } + session.direction = null; + if (landing === null) { + setShownDirection(null); + } else { + flushSync(() => { + onValueChange(landing); + setShownDirection(null); + }); + } + panel.style.transition = ""; + panel.style.transform = ""; + panel.style.willChange = ""; + for (const preview of area.querySelectorAll( + ":scope > [data-sidebar-swipe-preview]", + )) { + preview.style.transition = ""; + preview.style.transform = restingPreviewTransform( + Number(preview.dataset.sidebarSwipePreview) as 1 | -1, + ); + } + }; + + const settle = (direction: 1 | -1 | null) => { + const transition = `transform ${SETTLE_MS}ms ${SETTLE_EASING}`; + session.landingTab = direction === null ? null : direction === 1 ? next! : previous!; + session.landingFrom = value; + place(direction === null ? 0 : direction * panel.clientWidth, transition); + session.settleTimer = setTimeout(() => finishSettle(true), SETTLE_MS); + }; + + const handleWheel = (event: WheelEvent) => { + const result = stepTabSwipe( + session.state, + { deltaX: event.deltaX, deltaY: event.deltaY }, + { + width: panel.clientWidth, + hasPrevious: previous !== undefined, + hasNext: next !== undefined, + }, + ); + if (result.output.kind === "pass") return; + // Also stops the browser's swipe-to-go-back. + event.preventDefault(); + clearTimeout(session.gapTimer); + session.gapTimer = setTimeout(() => { + session.gapTimer = undefined; + const { cancel } = endTabSwipe(session.state); + session.state = TAB_SWIPE_IDLE; + if (cancel) settle(null); + }, TAB_SWIPE_GAP_MS); + if (result.output.kind !== "hold" && session.settleTimer !== undefined) { + // A new swipe began while the last one was landing. The tabs change under this + // closure, so the swipe picks up from the next event. + finishSettle(true); + session.state = TAB_SWIPE_IDLE; + return; + } + session.state = result.state; + if (result.output.kind === "track") { + const offset = result.output.offset; + show(offset > 0 ? 1 : offset < 0 ? -1 : null); + place(offset, ""); + } else if (result.output.kind === "commit") { + show(result.output.direction); + settle(result.output.direction); + } + }; + + if (session.settleTimer !== undefined && session.landingFrom !== value) finishSettle(false); + + area.addEventListener("wheel", handleWheel, { passive: false }); + // Landing on a tab re-attaches with new neighbours mid-gesture; the session keeps the + // swipe's state so its remaining momentum is still swallowed. + return () => area.removeEventListener("wheel", handleWheel); + }; + + return ( +
    +
    + {children} +
    + {previous !== undefined ? ( + + {renderPreview(previous)} + + ) : null} + {next !== undefined ? ( + + {renderPreview(next)} + + ) : null} +
    + ); +} + +const restingPreviewTransform = (direction: 1 | -1) => `translateX(${direction * 100}%)`; + +// A read-only copy of a neighbouring tab's first rows. It stays mounted in a hidden Activity so a +// swipe shows it on the first frame. +function SwipePreview(props: { direction: 1 | -1; visible: boolean; children: ReactNode }) { + return ( + +
    +
      + {props.children} +
    +
    +
    + ); +} diff --git a/apps/web/src/components/sidebar/sidebarTabSwipe.logic.test.ts b/apps/web/src/components/sidebar/sidebarTabSwipe.logic.test.ts new file mode 100644 index 0000000000000..65b2e686c0621 --- /dev/null +++ b/apps/web/src/components/sidebar/sidebarTabSwipe.logic.test.ts @@ -0,0 +1,65 @@ +import { describe, expect, it } from "vite-plus/test"; + +import { + endTabSwipe, + stepTabSwipe, + TAB_SWIPE_IDLE, + type TabSwipeOutput, + type TabSwipeState, +} from "./sidebarTabSwipe.logic"; + +const BOTH = { width: 300, hasPrevious: true, hasNext: true }; + +function run(deltas: readonly number[], context = BOTH, from: TabSwipeState = TAB_SWIPE_IDLE) { + let state = from; + const outputs: TabSwipeOutput[] = []; + for (const deltaX of deltas) { + const result = stepTabSwipe(state, { deltaX, deltaY: 0 }, context); + state = result.state; + outputs.push(result.output); + } + return { state, outputs }; +} + +describe("stepTabSwipe", () => { + it("follows horizontal movement and leaves vertical scrolling alone", () => { + const { state, outputs } = run([40, 40, -30]); + expect(outputs.map((output) => output.kind === "track" && output.offset)).toEqual([40, 80, 50]); + expect(stepTabSwipe(state, { deltaX: 5, deltaY: 200 }, BOTH)).toEqual({ + state, + output: { kind: "pass" }, + }); + }); + + it("only moves toward a neighbour that exists", () => { + const lastTab = { width: 300, hasPrevious: true, hasNext: false }; + expect(run([200], lastTab).outputs).toEqual([{ kind: "track", offset: 0 }]); + expect(run([-100], lastTab).outputs).toEqual([{ kind: "track", offset: -100 }]); + }); + + it("commits once the offset crosses half the width, in either direction", () => { + expect(run([100, 60]).outputs.at(-1)).toEqual({ kind: "commit", direction: 1 }); + expect(run([-160]).outputs.at(-1)).toEqual({ kind: "commit", direction: -1 }); + }); + + it("swallows the momentum of a committed swipe", () => { + const committed = run([160]).state; + const tail = run([20, 30, 18, 9, 4, 2, 1, 1], BOTH, committed); + expect(tail.outputs.every((output) => output.kind === "hold")).toBe(true); + }); + + it("starts a new swipe on a reversal or a rise after the momentum came to rest", () => { + const committed = run([160]).state; + expect(run([-20], BOTH, committed).outputs).toEqual([{ kind: "track", offset: -20 }]); + const rested = run([12, 6, 1], BOTH, committed).state; + expect(run([8], BOTH, rested).outputs).toEqual([{ kind: "track", offset: 8 }]); + }); +}); + +describe("endTabSwipe", () => { + it("springs back only a swipe that moved and did not commit", () => { + expect(endTabSwipe(run([80]).state)).toEqual({ cancel: true }); + expect(endTabSwipe(run([160]).state)).toEqual({ cancel: false }); + expect(endTabSwipe(TAB_SWIPE_IDLE)).toEqual({ cancel: false }); + }); +}); diff --git a/apps/web/src/components/sidebar/sidebarTabSwipe.logic.ts b/apps/web/src/components/sidebar/sidebarTabSwipe.logic.ts new file mode 100644 index 0000000000000..7907fa2da11dd --- /dev/null +++ b/apps/web/src/components/sidebar/sidebarTabSwipe.logic.ts @@ -0,0 +1,90 @@ +// Share of the list width a swipe must cross to switch tabs. +const TAB_SWIPE_COMMIT_FRACTION = 0.5; +// Quiet time that ends a swipe; trackpad momentum keeps wheel events flowing inside it. +export const TAB_SWIPE_GAP_MS = 90; +// After a commit, a magnitude below this counts as the finger at rest. +const REST_PX = 1.5; +// After resting, a same-direction rise this far above the floor is a new swipe. +const RISE_PX = 3; + +export type TabSwipeState = + | { readonly phase: "idle" } + // Positive offsets move toward the next tab, negative toward the previous one. + | { readonly phase: "tracking"; readonly offset: number } + // A swipe committed: the rest of its momentum is swallowed. + | { + readonly phase: "momentum"; + readonly sign: 1 | -1; + readonly previous: number; + // Lowest magnitude once the wheel started slowing down; Infinity before that. + readonly floor: number; + }; + +export const TAB_SWIPE_IDLE: TabSwipeState = { phase: "idle" }; + +export interface TabSwipeContext { + readonly width: number; + readonly hasPrevious: boolean; + readonly hasNext: boolean; +} + +export type TabSwipeOutput = + // A vertical scroll: leave it to the browser. + | { readonly kind: "pass" } + // Horizontal but nothing to draw, such as swallowed momentum. + | { readonly kind: "hold" } + | { readonly kind: "track"; readonly offset: number } + | { readonly kind: "commit"; readonly direction: 1 | -1 }; + +export interface TabSwipeResult { + readonly state: TabSwipeState; + readonly output: TabSwipeOutput; +} + +function track(offset: number, deltaX: number, context: TabSwipeContext): TabSwipeResult { + const next = Math.min( + context.hasNext ? context.width : 0, + Math.max(context.hasPrevious ? -context.width : 0, offset + deltaX), + ); + if (next !== 0 && Math.abs(next) >= context.width * TAB_SWIPE_COMMIT_FRACTION) { + const sign = next > 0 ? 1 : -1; + return { + state: { phase: "momentum", sign, previous: Math.abs(deltaX), floor: Infinity }, + output: { kind: "commit", direction: sign }, + }; + } + return { state: { phase: "tracking", offset: next }, output: { kind: "track", offset: next } }; +} + +export function stepTabSwipe( + state: TabSwipeState, + input: { readonly deltaX: number; readonly deltaY: number }, + context: TabSwipeContext, +): TabSwipeResult { + if (Math.abs(input.deltaX) <= Math.abs(input.deltaY)) return { state, output: { kind: "pass" } }; + if (state.phase === "idle") return track(0, input.deltaX, context); + if (state.phase === "tracking") return track(state.offset, input.deltaX, context); + + // Momentum keeps the committed direction, so a reversal is a new swipe. A same-direction + // swipe that lands on the momentum shows as a rise after the wheel slowed nearly to rest. + const magnitude = Math.abs(input.deltaX); + if (Math.sign(input.deltaX) !== state.sign) return track(0, input.deltaX, context); + const slowing = state.floor !== Infinity || magnitude < state.previous; + if (slowing && state.floor <= REST_PX && magnitude > state.floor + RISE_PX) { + return track(0, input.deltaX, context); + } + return { + state: { + phase: "momentum", + sign: state.sign, + previous: magnitude, + floor: slowing ? Math.min(state.floor, magnitude) : Infinity, + }, + output: { kind: "hold" }, + }; +} + +// The wheel went quiet: a swipe that did not commit springs back. +export function endTabSwipe(state: TabSwipeState): { readonly cancel: boolean } { + return { cancel: state.phase === "tracking" && state.offset !== 0 }; +} diff --git a/apps/web/src/i18n/translations/de.json b/apps/web/src/i18n/translations/de.json index 648fd58859dbe..e24e6e3fb296c 100644 --- a/apps/web/src/i18n/translations/de.json +++ b/apps/web/src/i18n/translations/de.json @@ -9717,6 +9717,8 @@ "cd5452cc9e13c818": "Projektgruppierung", "cfb01b8a2a3361fb": "Projektreihenfolge auf Standard zurücksetzen", "26abcbe322049a8a": "Bereich „In Arbeit“ auf Standard zurücksetzen", + "6f229a272798fced": "Bereichs-Tabs auf Standard zurücksetzen", + "b5fe39cd5b07e7c0": "Bereichs-Tabs", "76f3c3e2f8dd0120": "Bestätigungen", "caed837d6dc42548": "Bestätigung beim Loslösen auf Standard zurücksetzen", "859e386f8af841f0": "Loslösen von Threads bestätigen", @@ -9821,6 +9823,7 @@ "83ca942c7163904f": "Gleiche Repositorys aus verschiedenen Umgebungen zusammenfassen.", "609da998ca13521e": "Reihenfolge der Projekte in der Projektauswahl der Seitenleiste und in der Befehlspalette.", "b4c541137a76b351": "Laufende und überwachende Threads im Bereich „In Arbeit“ bündeln. Sie rücken im Posteingang wieder nach oben, sobald sie dich brauchen. Die schlichte Seitenleiste unter Labs hat keinen Bereich „In Arbeit“.", + "f4faa7d2cedead57": "Zeigt jeweils einen Bereich der Seitenleiste mit Tabs für Aktiv, In Arbeit, Zurückgestellt und Erledigt. Wische mit zwei Fingern auf dem Trackpad seitwärts, um zwischen Tabs zu wechseln.", "e815f49e5abedcfd": "Vor dem Loslösen eines Threads aus dem Bereich „Angeheftet“ nachfragen.", "41210f99adeeba78": "Einen zweiten Klick auf die Archivieren-Aktion verlangen, bevor ein Thread archiviert wird.", "84f3d2cefc8d2a74": "Vor dem Löschen eines Threads samt Chatverlauf nachfragen.", @@ -11414,6 +11417,7 @@ "6751449c6188912d": "nutzung kontingent rate limit zurücksetzen aufwecken wiederherstellen fortsetzen", "0aedae6a82c09429": "nutzung kontingent rate limit zurücksetzen wiederherstellen fortsetzen", "85dbcfec2d41f534": "ausblenden einklappen laufende überwachende threads posteingang seitenleiste in arbeit ablage", + "765ab357676679f1": "seitenleiste tabs akkordeon wischen trackpad zurückgestellt erledigt in arbeit bereiche", "405a2295152c9d77": "beta ordner projektbaum klassische seitenleiste", "de42c4690914cee4": "beta schlichte seitenleiste ordner zeilen mehrzeilig branch pull request details", "8f71bc7c325e23e3": "tool-aufrufe ausblenden befehle bearbeitungen suchen arbeitsprotokoll aktivität ruhiger chat zen nur endgültige antworten", @@ -11614,6 +11618,8 @@ "ef436cc0f1cee213": ", arbeitet", "2c3bb8ccf6c38078": "Hinweis zum Anbieter-Update schließen", "3cef7762c22f5fb1": "Ausblenden, bis sich der Anbieterstatus ändert", + "04a1f5c2e7851c1a": "Bereiche der Seitenleiste", + "5eb95ce376bce294": "{section} ({count})", "0f90824868d6c3af": "Neuer Thread ({shortcut})", "a1dbe20d209982b6": "Suchen", "201317aac48d4d9f": "Thread-Suche leeren", diff --git a/apps/web/src/i18n/translations/en.json b/apps/web/src/i18n/translations/en.json index 599944358b5bb..399623232bade 100644 --- a/apps/web/src/i18n/translations/en.json +++ b/apps/web/src/i18n/translations/en.json @@ -9726,6 +9726,8 @@ "cd5452cc9e13c818": "Project grouping", "cfb01b8a2a3361fb": "Reset project order to default", "26abcbe322049a8a": "Reset working section to default", + "6f229a272798fced": "Reset section tabs to default", + "b5fe39cd5b07e7c0": "Section tabs", "76f3c3e2f8dd0120": "Confirmations", "caed837d6dc42548": "Reset unpin confirmation to default", "859e386f8af841f0": "Confirm thread unpinning", @@ -9830,6 +9832,7 @@ "83ca942c7163904f": "Combine matching repositories across environments.", "609da998ca13521e": "Order of projects in the sidebar project picker and command palette.", "b4c541137a76b351": "Fold working and monitoring threads into a Working section. They return to the top of the inbox when they need you. The boring sidebar in Labs has no Working section.", + "f4faa7d2cedead57": "Show one sidebar section at a time, with tabs for Active, Working, Snoozed and Settled. Swipe sideways with two fingers on a trackpad to switch tabs.", "e815f49e5abedcfd": "Ask before unpinning a thread from the pinned section.", "41210f99adeeba78": "Require a second click on the inline archive action before a thread is archived.", "84f3d2cefc8d2a74": "Ask before deleting a thread and its chat history.", @@ -11422,6 +11425,7 @@ "6751449c6188912d": "usage quota rate limit reset wake recover continue", "0aedae6a82c09429": "usage quota rate limit reset recover continue", "85dbcfec2d41f534": "hide fold running monitoring threads inbox sidebar shelf", + "765ab357676679f1": "sidebar tabs accordion swipe trackpad snoozed settled working sections", "405a2295152c9d77": "beta folders project tree classic sidebar", "de42c4690914cee4": "beta boring sidebar folder rows multiline branch pull request details", "8f71bc7c325e23e3": "hide tool calls commands edits searches work log activity quiet chat zen final answers only", @@ -11622,6 +11626,8 @@ "ef436cc0f1cee213": ", working", "2c3bb8ccf6c38078": "Dismiss provider update notice", "3cef7762c22f5fb1": "Dismiss until provider status changes", + "04a1f5c2e7851c1a": "Sidebar sections", + "5eb95ce376bce294": "{section} ({count})", "0f90824868d6c3af": "New thread ({shortcut})", "a1dbe20d209982b6": "Search", "201317aac48d4d9f": "Clear thread search", diff --git a/apps/web/src/i18n/translations/es.json b/apps/web/src/i18n/translations/es.json index 956f4e17a9617..d107298933902 100644 --- a/apps/web/src/i18n/translations/es.json +++ b/apps/web/src/i18n/translations/es.json @@ -9714,6 +9714,8 @@ "cd5452cc9e13c818": "Agrupación de proyectos", "cfb01b8a2a3361fb": "Restablecer el orden de proyectos al valor predeterminado", "26abcbe322049a8a": "Restablecer la sección En curso al valor predeterminado", + "6f229a272798fced": "Restablecer pestañas de sección", + "b5fe39cd5b07e7c0": "Pestañas de sección", "76f3c3e2f8dd0120": "Confirmaciones", "caed837d6dc42548": "Restablecer la confirmación al desfijar al valor predeterminado", "859e386f8af841f0": "Confirmar al desfijar hilos", @@ -9818,6 +9820,7 @@ "83ca942c7163904f": "Combina los repositorios coincidentes de distintos entornos.", "609da998ca13521e": "Orden de los proyectos en el selector de la barra lateral y en la paleta de comandos.", "b4c541137a76b351": "Agrupa los hilos activos y en seguimiento en la sección En curso. Vuelven arriba de la bandeja de entrada cuando te necesitan. La barra lateral simple (en Experimentos) no tiene sección En curso.", + "f4faa7d2cedead57": "Muestra una sección de la barra lateral a la vez, con pestañas para Activos, En curso, Pospuestos y Resueltos. Desliza de lado con dos dedos en el trackpad para cambiar de pestaña.", "e815f49e5abedcfd": "Pregunta antes de desfijar un hilo de la sección de fijados.", "41210f99adeeba78": "Pide un segundo clic en la acción de archivar antes de archivar un hilo.", "84f3d2cefc8d2a74": "Pregunta antes de eliminar un hilo y su historial de chat.", @@ -11407,6 +11410,7 @@ "6751449c6188912d": "uso cuota límite de uso restablecer reactivar recuperar continuar", "0aedae6a82c09429": "uso cuota límite de uso restablecer recuperar continuar", "85dbcfec2d41f534": "ocultar agrupar en ejecución seguimiento hilos bandeja de entrada barra lateral estante en curso", + "765ab357676679f1": "barra lateral pestañas acordeón deslizar trackpad pospuestos resueltos en curso secciones", "405a2295152c9d77": "beta carpetas proyecto árbol barra lateral clásica", "de42c4690914cee4": "beta barra lateral simple boring sidebar filas de carpetas multilínea rama pull request detalles", "8f71bc7c325e23e3": "ocultar llamadas a herramientas comandos ediciones búsquedas registro de trabajo actividad chat silencioso zen solo respuestas finales", @@ -11607,6 +11611,8 @@ "ef436cc0f1cee213": ", en curso", "2c3bb8ccf6c38078": "Descartar aviso de actualización del proveedor", "3cef7762c22f5fb1": "Descartar hasta que cambie el estado del proveedor", + "04a1f5c2e7851c1a": "Secciones de la barra lateral", + "5eb95ce376bce294": "{section} ({count})", "0f90824868d6c3af": "Nuevo hilo ({shortcut})", "a1dbe20d209982b6": "Buscar", "201317aac48d4d9f": "Borrar búsqueda de hilos", diff --git a/apps/web/src/i18n/translations/fr.json b/apps/web/src/i18n/translations/fr.json index 1c982cc6d6f58..9e0f418bf0fdf 100644 --- a/apps/web/src/i18n/translations/fr.json +++ b/apps/web/src/i18n/translations/fr.json @@ -9716,6 +9716,8 @@ "cd5452cc9e13c818": "Regroupement des projets", "cfb01b8a2a3361fb": "Réinitialiser l’ordre des projets à la valeur par défaut", "26abcbe322049a8a": "Réinitialiser la section En cours à la valeur par défaut", + "6f229a272798fced": "Réinitialiser les onglets de section", + "b5fe39cd5b07e7c0": "Onglets de section", "76f3c3e2f8dd0120": "Confirmations", "caed837d6dc42548": "Réinitialiser la confirmation avant de désépingler à la valeur par défaut", "859e386f8af841f0": "Confirmer avant de désépingler un fil", @@ -9820,6 +9822,7 @@ "83ca942c7163904f": "Regroupe les dépôts identiques de tous les environnements.", "609da998ca13521e": "Ordre des projets dans le sélecteur de la barre latérale et dans la palette de commandes.", "b4c541137a76b351": "Regroupe les fils en cours et en surveillance dans une section En cours. Ils reviennent en haut de la boîte de réception quand ils ont besoin de vous. La barre latérale classique de Labs n’a pas de section En cours.", + "f4faa7d2cedead57": "Affiche une seule section de la barre latérale à la fois, avec des onglets Actifs, En cours, Reportés et Clos. Balayez latéralement à deux doigts sur le trackpad pour changer d’onglet.", "e815f49e5abedcfd": "Demande confirmation avant de désépingler un fil.", "41210f99adeeba78": "Exige un second clic sur le bouton d’archivage du fil avant de l’archiver.", "84f3d2cefc8d2a74": "Demande confirmation avant de supprimer un fil et son historique de discussion.", @@ -11412,6 +11415,7 @@ "6751449c6188912d": "utilisation quota limite de débit réinitialisation réveil récupérer continuer", "0aedae6a82c09429": "utilisation quota limite de débit réinitialisation récupérer continuer", "85dbcfec2d41f534": "masquer regrouper en cours surveillance fils boîte de réception barre latérale étagère", + "765ab357676679f1": "barre latérale onglets accordéon balayer trackpad reportés clos en cours sections", "405a2295152c9d77": "bêta dossiers arborescence de projets barre latérale classique", "de42c4690914cee4": "bêta barre latérale classique lignes de dossier multiligne branche détails pull request", "8f71bc7c325e23e3": "masquer appels d’outils commandes modifications recherches journal de travail activité discussion silencieuse zen réponses finales uniquement", @@ -11612,6 +11616,8 @@ "ef436cc0f1cee213": ", en cours", "2c3bb8ccf6c38078": "Ignorer l’avis de mise à jour du fournisseur", "3cef7762c22f5fb1": "Ignorer jusqu’au prochain changement de statut du fournisseur", + "04a1f5c2e7851c1a": "Sections de la barre latérale", + "5eb95ce376bce294": "{section} ({count})", "0f90824868d6c3af": "Nouveau fil ({shortcut})", "a1dbe20d209982b6": "Rechercher", "201317aac48d4d9f": "Effacer la recherche de fils", diff --git a/apps/web/src/i18n/translations/ja.json b/apps/web/src/i18n/translations/ja.json index 879531a396d2a..c57f60e87e2b7 100644 --- a/apps/web/src/i18n/translations/ja.json +++ b/apps/web/src/i18n/translations/ja.json @@ -9668,6 +9668,8 @@ "cd5452cc9e13c818": "プロジェクトのグループ化", "cfb01b8a2a3361fb": "プロジェクトの並び順をデフォルトにリセット", "26abcbe322049a8a": "「作業中」セクションをデフォルトにリセット", + "6f229a272798fced": "セクションタブをデフォルトに戻す", + "b5fe39cd5b07e7c0": "セクションタブ", "76f3c3e2f8dd0120": "確認ダイアログ", "caed837d6dc42548": "ピン留め解除の確認をデフォルトにリセット", "859e386f8af841f0": "スレッドのピン留め解除を確認", @@ -9772,6 +9774,7 @@ "83ca942c7163904f": "環境をまたいで同じリポジトリをまとめて表示します。", "609da998ca13521e": "サイドバーのプロジェクト選択メニューとコマンドパレットでの表示順です。", "b4c541137a76b351": "作業中と監視中のスレッドを「作業中」セクションにまとめます。対応が必要になると受信トレイの先頭に戻ります。「試験的機能」のシンプルなサイドバーには「作業中」セクションはありません。", + "f4faa7d2cedead57": "サイドバーのセクションを一度に1つずつ表示し、アクティブ・作業中・スヌーズ中・対応済みのタブで切り替えます。トラックパッドで2本指で横にスワイプしてタブを切り替えます。", "e815f49e5abedcfd": "スレッドのピン留めを解除する前に確認します。", "41210f99adeeba78": "インラインのアーカイブボタンは、もう一度クリックするまでスレッドをアーカイブしません。", "84f3d2cefc8d2a74": "スレッドとそのチャット履歴を削除する前に確認します。", @@ -11362,6 +11365,7 @@ "6751449c6188912d": "使用量 クォータ レート制限 リセット 再開 復旧 続行 usage limit", "0aedae6a82c09429": "使用量 クォータ レート制限 リセット 復旧 続行 usage limit", "85dbcfec2d41f534": "非表示 折りたたみ 実行中 監視中 スレッド 受信トレイ サイドバー 棚 作業中 working", + "765ab357676679f1": "サイドバー タブ アコーディオン スワイプ トラックパッド スヌーズ中 対応済み 作業中 セクション", "405a2295152c9d77": "ベータ フォルダー プロジェクト ツリー クラシック サイドバー beta folders", "de42c4690914cee4": "ベータ シンプルなサイドバー フォルダー 行 複数行 ブランチ プルリクエスト 詳細 beta boring sidebar", "8f71bc7c325e23e3": "非表示 ツール呼び出し コマンド 編集 検索 作業ログ アクティビティ 静か チャット zen 最終回答のみ tool calls", @@ -11562,6 +11566,8 @@ "ef436cc0f1cee213": "、作業中", "2c3bb8ccf6c38078": "プロバイダーの更新通知を閉じる", "3cef7762c22f5fb1": "プロバイダーのステータスが変わるまで非表示", + "04a1f5c2e7851c1a": "サイドバーのセクション", + "5eb95ce376bce294": "{section}({count})", "0f90824868d6c3af": "新しいスレッド ({shortcut})", "a1dbe20d209982b6": "検索", "201317aac48d4d9f": "スレッドの検索をクリア", diff --git a/apps/web/src/i18n/translations/ko.json b/apps/web/src/i18n/translations/ko.json index fae8ce2ec6fc4..fd47bff6c3d00 100644 --- a/apps/web/src/i18n/translations/ko.json +++ b/apps/web/src/i18n/translations/ko.json @@ -9671,6 +9671,8 @@ "cd5452cc9e13c818": "프로젝트 그룹화", "cfb01b8a2a3361fb": "프로젝트 순서 기본값으로 재설정", "26abcbe322049a8a": "작업 중 섹션 기본값으로 재설정", + "6f229a272798fced": "섹션 탭 기본값으로 재설정", + "b5fe39cd5b07e7c0": "섹션 탭", "76f3c3e2f8dd0120": "확인 요청", "caed837d6dc42548": "고정 해제 확인 기본값으로 재설정", "859e386f8af841f0": "스레드 고정 해제 확인", @@ -9775,6 +9777,7 @@ "83ca942c7163904f": "여러 환경에 있는 같은 저장소를 하나로 묶어 표시합니다.", "609da998ca13521e": "사이드바 프로젝트 선택기와 명령 팔레트에 표시되는 프로젝트 순서입니다.", "b4c541137a76b351": "작업 중이거나 모니터링 중인 스레드를 작업 중 섹션으로 접어 둡니다. 응답이 필요해지면 인박스 맨 위로 다시 올라옵니다. 실험 기능의 단순 사이드바에는 작업 중 섹션이 없습니다.", + "f4faa7d2cedead57": "사이드바 섹션을 한 번에 하나씩 표시하고 활성, 작업 중, 다시 알림 설정됨, 정리됨 탭으로 전환합니다. 트랙패드에서 두 손가락으로 옆으로 스와이프하면 탭이 바뀝니다.", "e815f49e5abedcfd": "고정 섹션에서 스레드 고정을 해제하기 전에 확인을 요청합니다.", "41210f99adeeba78": "인라인 보관 버튼을 한 번 더 클릭해야 스레드가 보관됩니다.", "84f3d2cefc8d2a74": "스레드와 채팅 기록을 삭제하기 전에 확인을 요청합니다.", @@ -11359,6 +11362,7 @@ "6751449c6188912d": "사용량 할당량 속도 제한 초기화 깨우기 복구 계속", "0aedae6a82c09429": "사용량 할당량 속도 제한 초기화 복구 계속", "85dbcfec2d41f534": "숨기기 접기 실행 중 모니터링 스레드 인박스 사이드바 선반 작업 중", + "765ab357676679f1": "사이드바 탭 아코디언 스와이프 트랙패드 다시 알림 정리됨 작업 중 섹션", "405a2295152c9d77": "베타 폴더 프로젝트 트리 클래식 사이드바", "de42c4690914cee4": "베타 단순 사이드바 폴더 행 여러 줄 브랜치 풀 리퀘스트 세부 정보", "8f71bc7c325e23e3": "숨기기 도구 호출 명령 편집 검색 작업 로그 활동 조용한 채팅 젠 최종 답변만", @@ -11559,6 +11563,8 @@ "ef436cc0f1cee213": ", 작업 중", "2c3bb8ccf6c38078": "제공자 업데이트 알림 닫기", "3cef7762c22f5fb1": "제공자 상태가 바뀔 때까지 닫기", + "04a1f5c2e7851c1a": "사이드바 섹션", + "5eb95ce376bce294": "{section} ({count})", "0f90824868d6c3af": "새 스레드({shortcut})", "a1dbe20d209982b6": "검색", "201317aac48d4d9f": "스레드 검색어 지우기", diff --git a/apps/web/src/i18n/translations/pt-BR.json b/apps/web/src/i18n/translations/pt-BR.json index 7010bef288b16..924795c8e6856 100644 --- a/apps/web/src/i18n/translations/pt-BR.json +++ b/apps/web/src/i18n/translations/pt-BR.json @@ -9715,6 +9715,8 @@ "cd5452cc9e13c818": "Agrupamento de projetos", "cfb01b8a2a3361fb": "Redefinir a ordem dos projetos para o padrão", "26abcbe322049a8a": "Redefinir a seção Trabalhando para o padrão", + "6f229a272798fced": "Redefinir abas de seção", + "b5fe39cd5b07e7c0": "Abas de seção", "76f3c3e2f8dd0120": "Confirmações", "caed837d6dc42548": "Redefinir a confirmação ao desafixar para o padrão", "859e386f8af841f0": "Confirmar ao desafixar threads", @@ -9819,6 +9821,7 @@ "83ca942c7163904f": "Combina repositórios correspondentes entre ambientes.", "609da998ca13521e": "Ordem dos projetos no seletor da barra lateral e na paleta de comandos.", "b4c541137a76b351": "Agrupa as threads em andamento e em monitoramento em uma seção Trabalhando. Elas voltam ao topo da caixa de entrada quando precisam de você. A barra lateral sem graça do Labs não tem seção Trabalhando.", + "f4faa7d2cedead57": "Mostra uma seção da barra lateral por vez, com abas para Ativas, Trabalhando, Adiadas e Concluídas. Deslize para o lado com dois dedos no trackpad para trocar de aba.", "e815f49e5abedcfd": "Pergunta antes de desafixar uma thread da seção de fixadas.", "41210f99adeeba78": "Exige um segundo clique para confirmar antes de arquivar uma thread.", "84f3d2cefc8d2a74": "Pergunta antes de excluir uma thread e o histórico dela.", @@ -11411,6 +11414,7 @@ "6751449c6188912d": "uso cota limite de taxa redefinir despertar recuperar continuar", "0aedae6a82c09429": "uso cota limite de taxa redefinir recuperar continuar", "85dbcfec2d41f534": "ocultar agrupar em execução monitoramento threads caixa de entrada barra lateral prateleira", + "765ab357676679f1": "barra lateral abas acordeão deslizar trackpad adiadas concluídas trabalhando seções", "405a2295152c9d77": "beta pastas projeto árvore barra lateral clássica", "de42c4690914cee4": "beta barra lateral sem graça pasta linhas várias linhas branch pull request detalhes", "8f71bc7c325e23e3": "ocultar chamadas de ferramentas comandos edições pesquisas registro de trabalho atividade chat silencioso zen só respostas finais", @@ -11611,6 +11615,8 @@ "ef436cc0f1cee213": ", trabalhando", "2c3bb8ccf6c38078": "Dispensar aviso de atualização do provedor", "3cef7762c22f5fb1": "Dispensar até o status do provedor mudar", + "04a1f5c2e7851c1a": "Seções da barra lateral", + "5eb95ce376bce294": "{section} ({count})", "0f90824868d6c3af": "Nova thread ({shortcut})", "a1dbe20d209982b6": "Pesquisar", "201317aac48d4d9f": "Limpar pesquisa de threads", diff --git a/apps/web/src/i18n/translations/ru.json b/apps/web/src/i18n/translations/ru.json index 0766d953dd02d..7702369db9942 100644 --- a/apps/web/src/i18n/translations/ru.json +++ b/apps/web/src/i18n/translations/ru.json @@ -9718,6 +9718,8 @@ "cd5452cc9e13c818": "Группировка проектов", "cfb01b8a2a3361fb": "Сбросить порядок проектов к значению по умолчанию", "26abcbe322049a8a": "Сбросить раздел «В работе» к значению по умолчанию", + "6f229a272798fced": "Сбросить вкладки разделов", + "b5fe39cd5b07e7c0": "Вкладки разделов", "76f3c3e2f8dd0120": "Подтверждения", "caed837d6dc42548": "Сбросить подтверждение открепления к значению по умолчанию", "859e386f8af841f0": "Подтверждать открепление тредов", @@ -9822,6 +9824,7 @@ "83ca942c7163904f": "Объединяет одинаковые репозитории из разных окружений.", "609da998ca13521e": "Порядок проектов в меню выбора проекта на боковой панели и в палитре команд.", "b4c541137a76b351": "Сворачивает выполняющиеся и отслеживающие треды в раздел «В работе». Они возвращаются наверх входящих, когда требуется ваше участие. В простой боковой панели из раздела «Эксперименты» раздела «В работе» нет.", + "f4faa7d2cedead57": "Показывать в боковой панели по одному разделу с вкладками «Активные», «В работе», «Отложенные» и «Разобранные». Проведите двумя пальцами по трекпаду вбок, чтобы переключить вкладку.", "e815f49e5abedcfd": "Запрашивает подтверждение перед откреплением треда.", "41210f99adeeba78": "Требует повторного нажатия на кнопку архивации в строке, прежде чем тред будет архивирован.", "84f3d2cefc8d2a74": "Запрашивает подтверждение перед удалением треда и его истории.", @@ -11412,6 +11415,7 @@ "6751449c6188912d": "использование квота лимит запросов сброс пробуждение восстановить продолжить", "0aedae6a82c09429": "использование квота лимит запросов сброс восстановить продолжить", "85dbcfec2d41f534": "скрыть свернуть выполняющиеся отслеживающие треды входящие боковая панель полка в работе", + "765ab357676679f1": "боковая панель вкладки аккордеон свайп трекпад отложенные разобранные в работе разделы", "405a2295152c9d77": "бета папки дерево проектов классическая боковая панель", "de42c4690914cee4": "бета простая боковая панель строки папок многострочные ветка пул-реквест подробности", "8f71bc7c325e23e3": "скрыть вызовы инструментов команды правки поиски журнал работы активность тихий чат дзен только итоговые ответы", @@ -11612,6 +11616,8 @@ "ef436cc0f1cee213": ", в работе", "2c3bb8ccf6c38078": "Скрыть уведомление об обновлении провайдера", "3cef7762c22f5fb1": "Скрыть до изменения статуса провайдера", + "04a1f5c2e7851c1a": "Разделы боковой панели", + "5eb95ce376bce294": "{section} ({count})", "0f90824868d6c3af": "Новый тред ({shortcut})", "a1dbe20d209982b6": "Поиск", "201317aac48d4d9f": "Очистить поиск тредов", diff --git a/apps/web/src/i18n/translations/sv.json b/apps/web/src/i18n/translations/sv.json index 5e6d1607edf31..329d9987d3f10 100644 --- a/apps/web/src/i18n/translations/sv.json +++ b/apps/web/src/i18n/translations/sv.json @@ -9724,6 +9724,8 @@ "cd5452cc9e13c818": "Projektgruppering", "cfb01b8a2a3361fb": "Återställ projektordning till standard", "26abcbe322049a8a": "Återställ avsnittet Arbetar till standard", + "6f229a272798fced": "Återställ sektionsflikar till standard", + "b5fe39cd5b07e7c0": "Sektionsflikar", "76f3c3e2f8dd0120": "Bekräftelser", "caed837d6dc42548": "Återställ bekräftelse vid lossning till standard", "859e386f8af841f0": "Bekräfta lossning av trådar", @@ -9828,6 +9830,7 @@ "83ca942c7163904f": "Slå ihop matchande repon från olika miljöer.", "609da998ca13521e": "Ordningen på projekt i sidofältets projektväljare och kommandopaletten.", "b4c541137a76b351": "Fäll in arbetande och övervakande trådar i avsnittet Arbetar. De återvänder överst i inkorgen när de behöver dig. Det enkla sidofältet i Labs har inget avsnitt Arbetar.", + "f4faa7d2cedead57": "Visa en sektion i sidofältet i taget, med flikar för Aktiva, Arbetar, Snoozade och Klara. Svep i sidled med två fingrar på styrplattan för att byta flik.", "e815f49e5abedcfd": "Fråga innan en tråd lossas från avsnittet för fästa trådar.", "41210f99adeeba78": "Kräv ett andra klick på arkiveringsåtgärden innan en tråd arkiveras.", "84f3d2cefc8d2a74": "Fråga innan en tråd och dess chatthistorik tas bort.", @@ -11420,6 +11423,7 @@ "6751449c6188912d": "användning kvot hastighetsbegränsning återställning vakna återhämta fortsätt", "0aedae6a82c09429": "användning kvot hastighetsbegränsning återställning återhämta fortsätt", "85dbcfec2d41f534": "dölj fäll ihop pågående bevakning trådar inkorg sidofält hylla", + "765ab357676679f1": "sidofält flikar dragspel svep styrplatta snoozade klara arbetar sektioner", "405a2295152c9d77": "beta mappar projektträd klassiskt sidofält", "de42c4690914cee4": "beta enkelt sidofält mapprader flera rader gren pull request detaljer", "8f71bc7c325e23e3": "dölj verktygsanrop kommandon redigeringar sökningar arbetslogg aktivitet tyst chatt zen bara slutliga svar", @@ -11620,6 +11624,8 @@ "ef436cc0f1cee213": ", arbetar", "2c3bb8ccf6c38078": "Stäng meddelandet om leverantörsuppdatering", "3cef7762c22f5fb1": "Stäng tills leverantörsstatusen ändras", + "04a1f5c2e7851c1a": "Sektioner i sidofältet", + "5eb95ce376bce294": "{section} ({count})", "0f90824868d6c3af": "Ny tråd ({shortcut})", "a1dbe20d209982b6": "Sök", "201317aac48d4d9f": "Rensa trådsökningen", diff --git a/apps/web/src/i18n/translations/zh.json b/apps/web/src/i18n/translations/zh.json index c86b9e6c55e41..30205ca601558 100644 --- a/apps/web/src/i18n/translations/zh.json +++ b/apps/web/src/i18n/translations/zh.json @@ -9731,6 +9731,8 @@ "cd5452cc9e13c818": "项目分组", "cfb01b8a2a3361fb": "重置项目排序为默认值", "26abcbe322049a8a": "重置“运行中”分区为默认值", + "6f229a272798fced": "将分区标签页重置为默认", + "b5fe39cd5b07e7c0": "分区标签页", "76f3c3e2f8dd0120": "确认操作", "caed837d6dc42548": "重置取消置顶确认为默认值", "859e386f8af841f0": "确认取消置顶会话", @@ -9835,6 +9837,7 @@ "83ca942c7163904f": "将不同环境中的相同仓库合并显示。", "609da998ca13521e": "侧边栏项目选择器和命令面板中的项目排序。", "b4c541137a76b351": "将正在执行和监控的会话收起到“运行中”分组。需要你处理时,它们会回到收件箱顶部。实验功能中的简洁侧边栏不显示此分组。", + "f4faa7d2cedead57": "侧边栏一次只显示一个分区,并提供“活跃”“运行中”“已暂缓”“已收尾”标签页。在触控板上用两指横向轻扫即可切换标签页。", "e815f49e5abedcfd": "取消置顶会话前询问。", "41210f99adeeba78": "点击会话行内的归档按钮后,需再次点击才会归档。", "84f3d2cefc8d2a74": "删除会话及其聊天记录前询问。", @@ -11436,6 +11439,7 @@ "6751449c6188912d": "用量 配额 速率限制 重置 唤醒 恢复 继续", "0aedae6a82c09429": "用量 配额 速率限制 重置 恢复 继续", "85dbcfec2d41f534": "隐藏 收起 运行中 监控中 会话 收件箱 侧边栏 分组", + "765ab357676679f1": "侧边栏 标签页 折叠 轻扫 触控板 已暂缓 已收尾 运行中 分区", "405a2295152c9d77": "测试版 文件夹 项目 树 经典 侧边栏", "de42c4690914cee4": "测试版 简洁侧边栏 文件夹 行 多行 分支 PR 详情", "8f71bc7c325e23e3": "隐藏 工具调用 命令 编辑 搜索 工作日志 活动 安静 聊天 专注 仅最终回答", @@ -11636,6 +11640,8 @@ "ef436cc0f1cee213": ",运行中", "2c3bb8ccf6c38078": "忽略提供方更新提示", "3cef7762c22f5fb1": "忽略直到提供方状态变化", + "04a1f5c2e7851c1a": "侧边栏分区", + "5eb95ce376bce294": "{section}({count})", "0f90824868d6c3af": "新建会话({shortcut})", "a1dbe20d209982b6": "搜索", "201317aac48d4d9f": "清除会话搜索", diff --git a/docs/user/thread-sidebar.md b/docs/user/thread-sidebar.md index 905f3a5bfbe9c..37a61a140a5c0 100644 --- a/docs/user/thread-sidebar.md +++ b/docs/user/thread-sidebar.md @@ -148,6 +148,14 @@ choice. While this is on, the active list is ordered by when each thread last came back to you, so you cannot drag or move threads within it. Your saved order returns when you turn it off. +### Show sections as tabs + +Turn on **Settings → General → Section tabs** on web and desktop to show one section at a time. +A tab bar under the search field switches between Active, Snoozed, and Settled, plus Working when +the Working section is on. Pinned threads stay above every tab. On a trackpad, swipe sideways +with two fingers over the list to move to the next or previous tab. To settle a thread from the +Active tab, drag it below the list. Each device keeps its own choice. + ### Group threads by project (beta) Turn on **Settings → Labs → Boring sidebar (group by project)** on web and desktop to put active diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.ts index 678f58294c66a..b485a3d03e4a3 100644 --- a/packages/contracts/src/settings.ts +++ b/packages/contracts/src/settings.ts @@ -546,6 +546,7 @@ export const ClientSettingsSchema = Schema.Struct({ Schema.withDecodingDefault(Effect.succeed({})), ), sidebarWorkingShelfEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))), + sidebarSectionTabsEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))), sidebarProjectGroupingMode: SidebarProjectGroupingMode.pipe( Schema.withDecodingDefault(Effect.succeed(DEFAULT_SIDEBAR_PROJECT_GROUPING_MODE)), ), @@ -2108,6 +2109,7 @@ export const ClientSettingsPatch = Schema.Struct({ threadDetailsUsageEnabled: Schema.optionalKey(Schema.Boolean), threadDetailsItems: Schema.optionalKey(Schema.Record(Schema.String, Schema.Boolean)), sidebarWorkingShelfEnabled: Schema.optionalKey(Schema.Boolean), + sidebarSectionTabsEnabled: Schema.optionalKey(Schema.Boolean), sidebarProjectGroupingMode: Schema.optionalKey(SidebarProjectGroupingMode), sidebarProjectGroupingOverrides: Schema.optionalKey( Schema.Record(TrimmedNonEmptyString, SidebarProjectGroupingMode),