TypeScript
revert(web): remove the compact sidebar (#11685)
mariad81278aa6b27
diff --git a/apps/desktop/src/settings/DesktopClientSettings.test.ts b/apps/desktop/src/settings/DesktopClientSettings.test.tsindex 5ad23ee7058..53044dcf7e5 100644--- a/apps/desktop/src/settings/DesktopClientSettings.test.ts+++ b/apps/desktop/src/settings/DesktopClientSettings.test.ts@@ -57,7 +57,6 @@ const clientSettings: ClientSettings = {proactivePanelsEnabled: true,showSkillsInSlashMenu: false,providerModelPreferences: {},- sidebarCompactThreadRows: false,sidebarProjectGroupingMode: "repository_path",sidebarProjectGroupingOverrides: {"environment-1:/tmp/project-a": "separate",diff --git a/apps/web/src/components/AppSidebarLayout.tsx b/apps/web/src/components/AppSidebarLayout.tsxindex 6497df68c8b..6769586f7fa 100644--- a/apps/web/src/components/AppSidebarLayout.tsx+++ b/apps/web/src/components/AppSidebarLayout.tsx@@ -14,11 +14,7 @@ import { getLocalStorageItem, removeLocalStorageItem } from "../hooks/useLocalStimport { resolveShortcutCommand, shortcutLabelForCommand } from "../keybindings";import { cn, isMacPlatform } from "../lib/utils";import { primaryServerKeybindingsAtom } from "../state/server";-import {- useCompactSidebarEnabled,- useEnvironmentIdentificationMode,- useLegacySidebarEnabled,-} from "../hooks/useSettings";+import { useEnvironmentIdentificationMode, useLegacySidebarEnabled } from "../hooks/useSettings";import {PanelAnimationSuppressionProvider,usePanelAnimationSettings,@@ -148,7 +144,6 @@ function ProjectProjectionRetention() {export function AppSidebarLayout({ children }: { children: ReactNode }) {const navigate = useNavigate();const legacySidebarEnabled = useLegacySidebarEnabled();- const compactSidebarEnabled = useCompactSidebarEnabled();const { active: panelAnimationsActive, durationMs: panelAnimationDurationMs } =usePanelAnimationSettings();// Settings routes show the settings nav in place of whichever thread@@ -234,7 +229,7 @@ export function AppSidebarLayout({ children }: { children: ReactNode }) {<ProjectProjectionRetention /><Sidebarside="left"- collapsible={compactSidebarEnabled ? "icon" : "offcanvas"}+ collapsible="offcanvas"data-app-sidebar=""className="border-r border-sidebar-border bg-sidebar text-sidebar-foreground"resizable={{diff --git a/apps/web/src/components/LegacySidebar.tsx b/apps/web/src/components/LegacySidebar.tsxindex 37398f26608..81fd6047f13 100644--- a/apps/web/src/components/LegacySidebar.tsx+++ b/apps/web/src/components/LegacySidebar.tsx@@ -199,11 +199,7 @@ import { SidebarChromeFooter, SidebarChromeHeader } from "./sidebar/SidebarChromimport { useCopyToClipboard } from "~/hooks/useCopyToClipboard";import { useIsMobile } from "~/hooks/useMediaQuery";import { CommandDialogTrigger } from "./ui/command";-import {- useClientSettings,- useCompactSidebarEnabled,- useUpdateClientSettings,-} from "~/hooks/useSettings";+import { useClientSettings, useUpdateClientSettings } from "~/hooks/useSettings";import { primaryServerKeybindingsAtom } from "../state/server";import {derivePhysicalProjectKey,@@ -1198,9 +1194,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjecconst router = useRouter();const queuePendingFileDrop = useSidebarPendingFileDropStore((s) => s.queuePendingFileDrop);const clearPendingFileDrop = useSidebarPendingFileDropStore((s) => s.clearPendingFileDrop);- const { isMobile, setOpenMobile, state, setOpen } = useSidebar();- const compactSidebarEnabled = useCompactSidebarEnabled();- const isCompact = compactSidebarEnabled && !isMobile && state === "collapsed";+ const { isMobile, setOpenMobile } = useSidebar();const markThreadUnread = useUiStateStore((state) => state.markThreadUnread);const setProjectExpanded = useUiStateStore((state) => state.setProjectExpanded);const toggleThreadSelection = useThreadSelectionStore((state) => state.toggleThread);@@ -1451,13 +1445,10 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjecif (useThreadSelectionStore.getState().hasSelection()) {clearSelection();}- setProjectExpanded(projectPreferenceKeys, isCompact || !projectExpanded);- if (isCompact) setOpen(true);+ setProjectExpanded(projectPreferenceKeys, !projectExpanded);},[clearSelection,- isCompact,- setOpen,dragInProgressRef,projectExpanded,projectPreferenceKeys,@@ -1474,17 +1465,9 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjecif (dragInProgressRef.current) {return;}- setProjectExpanded(projectPreferenceKeys, isCompact || !projectExpanded);- if (isCompact) setOpen(true);+ setProjectExpanded(projectPreferenceKeys, !projectExpanded);},- [- dragInProgressRef,- isCompact,- projectExpanded,- projectPreferenceKeys,- setOpen,- setProjectExpanded,- ],+ [dragInProgressRef, projectExpanded, projectPreferenceKeys, setProjectExpanded],);const handleProjectButtonPointerDownCapture = useCallback(@@ -2376,10 +2359,8 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec<><div className="group/project-header relative"><SidebarMenuButton- tooltip={project.displayName}- aria-label={project.displayName}ref={isManualProjectSorting ? dragHandleProps?.setActivatorNodeRef : undefined}- className={`pr-8 group-hover/project-header:bg-sidebar-row-hover group-hover/project-header:text-sidebar-foreground max-sm:pr-14 group-data-[collapsible=icon]:justify-center ${+ className={`pr-8 group-hover/project-header:bg-sidebar-row-hover group-hover/project-header:text-sidebar-foreground max-sm:pr-14 ${isManualProjectSorting ? "cursor-grab active:cursor-grabbing" : ""}`}{...(isManualProjectSorting && dragHandleProps ? dragHandleProps.attributes : {})}@@ -2389,7 +2370,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjeconKeyDown={handleProjectButtonKeyDown}onContextMenu={handleProjectButtonContextMenu}>- {isCompact ? null : !projectExpanded && projectStatus ? (+ {!projectExpanded && projectStatus ? (<Tooltip><TooltipTriggerrender={@@ -2420,7 +2401,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec<span className="flex shrink-0"><ProjectFavicon project={project} /></span>- <span className="flex min-w-0 flex-1 items-center gap-2 group-data-[collapsible=icon]:hidden">+ <span className="flex min-w-0 flex-1 items-center gap-2"><span className="truncate text-sm font-medium text-sidebar-foreground/90">{project.displayName}</span>@@ -2434,7 +2415,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec{/* Environment badge – visible by default, crossfades with the"new thread" button on hover using the same pointer-events +opacity pattern as the thread row archive/timestamp swap. */}- {!isCompact && project.environmentPresence === "remote-only" && (+ {project.environmentPresence === "remote-only" && (<Tooltip><TooltipTriggerrender={@@ -2460,7 +2441,7 @@ const SidebarProjectItem = memo(function SidebarProjectItem(props: SidebarProjec<Tooltip><TooltipTriggerrender={- <div className="pointer-events-none absolute top-[calc(50%+1px)] right-0.5 -translate-y-1/2 opacity-0 transition-opacity duration-150 max-sm:pointer-events-auto max-sm:opacity-100 group-hover/project-header:pointer-events-auto group-hover/project-header:opacity-100 group-focus-within/project-header:pointer-events-auto group-focus-within/project-header:opacity-100 group-data-[collapsible=icon]:hidden">+ <div className="pointer-events-none absolute top-[calc(50%+1px)] right-0.5 -translate-y-1/2 opacity-0 transition-opacity duration-150 max-sm:pointer-events-auto max-sm:opacity-100 group-hover/project-header:pointer-events-auto group-hover/project-header:opacity-100 group-focus-within/project-header:pointer-events-auto group-focus-within/project-header:opacity-100"><buttontype="button"aria-label={`Create new thread in ${project.displayName}`}@@ -2693,7 +2674,7 @@ function LocalSecondaryStatus() {}return (- <SidebarGroup className="px-2 pt-2 pb-0 group-data-[collapsible=icon]:hidden">+ <SidebarGroup className="px-2 pt-2 pb-0">{connecting.length > 0 ? (<Alertvariant="default"@@ -2997,16 +2978,14 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent(render={<SidebarMenuButtonclassName="focus-visible:ring-0"- tooltip="Search"- aria-label="Search"data-testid="command-palette-trigger"/>}><SearchIcon />- <span className="flex-1 truncate group-data-[collapsible=icon]:hidden">Search</span>+ <span className="flex-1 truncate">Search</span>{commandPaletteShortcutLabel ? (- <Kbd className="h-4 min-w-0 rounded-sm px-1.5 text-[10px] group-data-[collapsible=icon]:hidden">+ <Kbd className="h-4 min-w-0 rounded-sm px-1.5 text-[10px]">{commandPaletteShortcutLabel}</Kbd>) : null}@@ -3017,7 +2996,7 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent(}>{showArm64IntelBuildWarning && arm64IntelBuildWarningDescription ? (- <SidebarGroup className="px-2 pt-2 pb-0 group-data-[collapsible=icon]:hidden">+ <SidebarGroup className="px-2 pt-2 pb-0"><Alert variant="warning" className="rounded-2xl border-warning/40 bg-warning/8"><TriangleAlertIcon /><AlertTitle>Intel build on Apple Silicon</AlertTitle>@@ -3041,21 +3020,17 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent() : null}<LocalSecondaryStatus /><SidebarGroup className="px-2 py-2">- <div className="mb-1 flex items-center justify-between pl-2 pr-1.5 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-0">- <span className="text-xs font-medium text-sidebar-muted-foreground/80 group-data-[collapsible=icon]:hidden">- Projects- </span>+ <div className="mb-1 flex items-center justify-between pl-2 pr-1.5">+ <span className="text-xs font-medium text-sidebar-muted-foreground/80">Projects</span><div className="flex items-center gap-1">- <div className="group-data-[collapsible=icon]:hidden">- <ProjectSortMenu- projectSortOrder={projectSortOrder}- threadSortOrder={threadSortOrder}- threadPreviewCount={threadPreviewCount}- onProjectSortOrderChange={handleProjectSortOrderChange}- onThreadSortOrderChange={handleThreadSortOrderChange}- onThreadPreviewCountChange={handleThreadPreviewCountChange}- />- </div>+ <ProjectSortMenu+ projectSortOrder={projectSortOrder}+ threadSortOrder={threadSortOrder}+ threadPreviewCount={threadPreviewCount}+ onProjectSortOrderChange={handleProjectSortOrderChange}+ onThreadSortOrderChange={handleThreadSortOrderChange}+ onThreadPreviewCountChange={handleThreadPreviewCountChange}+ /><Tooltip><TooltipTriggerrender={@@ -3152,9 +3127,7 @@ const SidebarProjectsContent = memo(function SidebarProjectsContent()}{projectsLength === 0 && (- <div className="px-2 pt-4 text-center text-secondary-label text-xs group-data-[collapsible=icon]:hidden">- No projects yet- </div>+ <div className="px-2 pt-4 text-center text-secondary-label text-xs">No projects yet</div>)}</SidebarGroup></SidebarContent>diff --git a/apps/web/src/components/Sidebar.drag.ts b/apps/web/src/components/Sidebar.drag.tsindex 0b5710c671f..bfd112d1899 100644--- a/apps/web/src/components/Sidebar.drag.ts+++ b/apps/web/src/components/Sidebar.drag.ts@@ -103,7 +103,6 @@ export function createSidebarSortingStrategy(input: {snoozedThreadCount?: number;cardHeight?: number;slimHeight?: number;- compact?: boolean;/** Space each pinned boundary opens for its label while dragging. The* markers stay zero height at rest, so nothing is reserved until pickup. */boundaryLabelHeight?: number;@@ -141,14 +140,11 @@ export function createSidebarSortingStrategy(input: {else slimHeight ??= rects[index]?.height;if (item.key !== active.key) groups[item.section].push(item);}- // Compact icons use h-7; expanded cards include their vertical padding.- const scale = input.compact- ? (cardHeight ?? slimHeight ?? 28) / 28- : slimHeight !== undefined- ? slimHeight / 36- : (headerScale ?? (cardHeight ?? 82) / 82);- cardHeight ??= (input.compact ? 28 : 82) * scale;- slimHeight ??= (input.compact ? 28 : 36) * scale;+ // Cards are 4.875rem + 0.25rem padding; slim rows/placeholders are h-9.+ const scale =+ slimHeight !== undefined ? slimHeight / 36 : (headerScale ?? (cardHeight ?? 82) / 82);+ cardHeight ??= 82 * scale;+ slimHeight ??= 36 * scale;const labelHeight = (input.boundaryLabelHeight ?? 0) * scale;const group = groups[target.section];const order =@@ -222,11 +218,7 @@ export function createSidebarSortingStrategy(input: {// Consume the shelf's auto margin as drag labels and resized rows need// room, keeping the combined shelves at their measured bottom.let shelfSpace =- !input.compact &&- shelfRect &&- beforeShelf &&- lastRect &&- shelfRect.top > beforeShelf.bottom + 1+ shelfRect && beforeShelf && lastRect && shelfRect.top > beforeShelf.bottom + 1? Math.max(0,lastRect.bottom - rects[0].top - heights.reduce((sum, height) => sum + height + 1, -1),diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsxindex 9cee123e4ec..cc3487b595e 100644--- a/apps/web/src/components/Sidebar.tsx+++ b/apps/web/src/components/Sidebar.tsx@@ -1,12 +1,10 @@import { useSupportsMultiplePullRequests } from "~/hooks/useSupportsMultiplePullRequests";-import { useCompactSidebarEnabled } from "../hooks/useSettings";import { resolveThreadCurrentPullRequestLink } from "@t3tools/shared/threadPullRequests";import { useAtomValue } from "@effect/atom-react";import { replaceComposerContextReferences } from "@t3tools/shared/composerContextReferences";import * as Schema from "effect/Schema";import {DndContext,- DragOverlay,useSensor,useSensors,type DragEndEvent,@@ -74,7 +72,6 @@ import {type MouseEvent as ReactMouseEvent,type ReactNode,} from "react";-import { createPortal } from "react-dom";import { useParams, useRouter } from "@tanstack/react-router";import { useRightPanelStore } from "../rightPanelStore";@@ -124,7 +121,6 @@ import { startNewThreadFromContext } from "../lib/chatThreadActions";import { useClientSettings } from "../hooks/useSettings";import { useCopyToClipboard } from "../hooks/useCopyToClipboard";import { useLocalStorage } from "../hooks/useLocalStorage";-import { SidebarCompletedTime } from "./sidebar/SidebarCompletedTime";import { useNowMinute } from "../hooks/useNowMinute";import { useEnvironments, usePrimaryEnvironmentId } from "../state/environments";import {@@ -325,7 +321,6 @@ function SidebarThreadTooltip({branchMismatch,terminalStatus,terminalProcessCount,- compactStatus,}: {thread: SidebarThreadSummary;project: ProjectFaviconProject | null;@@ -342,7 +337,6 @@ function SidebarThreadTooltip({} | null;terminalStatus: TerminalStatusIndicator | null;terminalProcessCount: number;- compactStatus?: string | undefined;}) {const driverKind = providerEntry?.driverKind ?? null;const supportsMultiplePullRequests = useSupportsMultiplePullRequests(thread.environmentId);@@ -359,7 +353,6 @@ function SidebarThreadTooltip({{thread.title}</div><div className="grid gap-1.5 pl-0.5 text-xs text-muted-foreground">- {compactStatus ? <div>{compactStatus}</div> : null}{projectDisplayName ? (<div className="flex min-w-0 items-center gap-2">{project ? <ProjectFavicon project={project} className="size-3 shrink-0" /> : null}@@ -509,7 +502,7 @@ function SnoozePopoverButton(props: {type SortableThreadRowBag = Pick<ReturnType<typeof useSortable>,"listeners" | "setNodeRef" | "transform" | "transition" | "isDragging"-> & { hidden?: boolean };+>;function SortableThreadRow(props: {id: string;@@ -590,18 +583,7 @@ function SidebarSectionPlaceholder(props: {props.isDropTarget && "border-primary/40 bg-primary/5 text-primary",)}>- <span className="group-data-[collapsible=icon]:sr-only">{props.label}</span>- {props.marker === "settled-placeholder" ? (- <CheckIcon- aria-hidden- className="hidden size-3.5 group-data-[collapsible=icon]:block"- />- ) : (- <Undo2Icon- aria-hidden- className="hidden size-3.5 group-data-[collapsible=icon]:block"- />- )}+ {props.label}</div>) : null}</SortableSidebarMarker>@@ -625,30 +607,19 @@ function SidebarDragBoundary(props: {className="pointer-events-none relative mx-0.5 -mb-px h-0">{props.visible ? (- <div className="sidebar-drag-boundary-label absolute inset-x-2 top-1 flex h-4 items-center gap-2 group-data-[collapsible=icon]:inset-x-0 group-data-[collapsible=icon]:justify-center">+ <div className="sidebar-drag-boundary-label absolute inset-x-2 top-1 flex h-4 items-center gap-2"><spanclassName={cn("shrink-0 text-xs font-medium",props.isDropTarget ? "text-primary" : "text-sidebar-foreground/80",)}>- <span className="group-data-[collapsible=icon]:sr-only">{props.label}</span>- {props.marker === "pinned-header" ? (- <PinIcon- aria-hidden- className="hidden size-3.5 group-data-[collapsible=icon]:block"- />- ) : (- <Undo2Icon- aria-hidden- className="hidden size-3.5 group-data-[collapsible=icon]:block"- />- )}+ {props.label}</span><spanaria-hiddenclassName={cn(- "h-px flex-1 group-data-[collapsible=icon]:hidden",+ "h-px flex-1",props.isDropTarget ? "bg-primary/50" : "bg-sidebar-foreground/25",)}/>@@ -669,32 +640,20 @@ function SidebarSectionHeader(props: {isDropTarget?: boolean;toggle: { expanded: boolean; onToggle: () => void };}) {- const compactEnabled = useCompactSidebarEnabled();- const { state, isMobile } = useSidebar();- const compact = compactEnabled && state === "collapsed" && !isMobile;const snoozed = props.marker === "snoozed-header";const className = cn("flex h-full w-full items-center gap-2 px-2 text-left text-xs font-medium",- compact && "justify-center px-0",snoozed ? "text-blue-600 dark:text-blue-400" : "text-sidebar-muted-foreground/60",props.dragging && "text-sidebar-foreground/80",props.isDropTarget && "text-primary",);const content = (<>- <span className={compact ? "sr-only" : "shrink-0"}>{props.label}</span>- {compact ? (- snoozed ? (- <AlarmClockIcon aria-hidden className="size-3.5" />- ) : (- <CheckIcon aria-hidden className="size-3.5" />- )- ) : null}+ <span className="shrink-0">{props.label}</span><spanaria-hiddenclassName={cn("h-px min-w-2 flex-1",- compact && "hidden",snoozed ? "bg-blue-500/20 dark:bg-blue-400/15" : "bg-sidebar-border/60",props.dragging && "bg-sidebar-foreground/25",props.isDropTarget && "bg-primary/50",@@ -704,7 +663,6 @@ function SidebarSectionHeader(props: {aria-hiddenclassName={cn("size-3 shrink-0 transition-transform",- compact && "hidden",props.toggle.expanded && "rotate-180",)}/>@@ -716,22 +674,15 @@ function SidebarSectionHeader(props: {data-testid={`sidebar-${props.marker}`}className={cn("mx-0.5 h-8", props.className)}>- <Tooltip disabled={!compact}>- <TooltipTrigger- render={- <button- type="button"- onClick={props.toggle.onToggle}- aria-expanded={props.toggle.expanded}- data-testid={`sidebar-${snoozed ? "snoozed" : "settled"}-shelf-toggle`}- className={cn(className, "cursor-pointer")}- />- }- >- {content}- </TooltipTrigger>- <TooltipPopup side="right">{props.label}</TooltipPopup>- </Tooltip>+ <button+ type="button"+ onClick={props.toggle.onToggle}+ aria-expanded={props.toggle.expanded}+ data-testid={`sidebar-${snoozed ? "snoozed" : "settled"}-shelf-toggle`}+ className={cn(className, "cursor-pointer")}+ >+ {content}+ </button></SortableSidebarMarker>);}@@ -754,9 +705,6 @@ const SidebarDraftRow = memo(function SidebarDraftRow(props: {onDiscard: (draftId: DraftId) => void;}) {const { composer, draftId, onDiscard, onNavigate, session } = props;- const compactEnabled = useCompactSidebarEnabled();- const { state, isMobile } = useSidebar();- const compact = compactEnabled && state === "collapsed" && !isMobile;const promptPreview =replaceComposerContextReferences(composer.prompt, (occurrence) => occurrence.label).trim()@@ -795,34 +743,6 @@ const SidebarDraftRow = memo(function SidebarDraftRow(props: {},[draftId, onDiscard],);- if (compact) {- return (- <li className="list-none">- <Tooltip>- <TooltipTrigger- render={- <button- type="button"- data-testid="sidebar-draft-row"- aria-label={`Draft: ${preview}`}- onClick={handleActivate}- className={cn(- "relative flex h-7 w-full cursor-pointer items-center justify-center rounded-md outline-none hover:bg-sidebar-row-hover focus-visible:ring-2 focus-visible:ring-ring",- props.isActive ? "bg-sidebar-row-active" : draftSurfaceClassName,- )}- />- }- >- <SquarePenIcon aria-hidden className={cn(draftPenClassName, "size-4")} />- </TooltipTrigger>- <TooltipPopup side="right" className="max-w-80 whitespace-normal">- <div className="font-medium">{props.projectDisplayName}</div>- <div>{preview}</div>- </TooltipPopup>- </Tooltip>- </li>- );- }return (<li className="list-none py-0.5"><div@@ -1032,7 +952,6 @@ const dropVerbBadge: Record<SidebarDropVerb, ReactNode> = {const SidebarThreadRow = memo(function SidebarThreadRow(props: {thread: SidebarThreadSummary;variant: "card" | "slim";- compact: boolean;// Slim rows are either settled (action: un-settle) or merely quiet// (seen Ready threads — action: settle).variantAction: "settle" | "unsettle" | "unsnooze";@@ -1113,9 +1032,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {variant,variantAction,} = props;- const compactEnabled = useCompactSidebarEnabled();- const { state, isMobile } = useSidebar();- const compact = compactEnabled && state === "collapsed" && !isMobile;const threadRef = useMemo(() => scopeThreadRef(thread.environmentId, thread.id),[thread.environmentId, thread.id],@@ -1293,16 +1209,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {branchMismatch={branchMismatch}terminalStatus={terminalStatus}terminalProcessCount={terminalProcessCount}- compactStatus={- compact || (props.compact && variant === "card")- ? (topStatus?.label ??- (variantAction === "unsnooze"- ? "Snoozed"- : variantAction === "unsettle"- ? "Settled"- : "Ready"))- : undefined- }/>);@@ -1349,7 +1255,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {[isRenaming, onStartRename, thread.title, threadRef],);const [isFileDragOver, setIsFileDragOver] = useState(false);- const [tooltipOpen, setTooltipOpen] = useState(false);const fileDropHandlers = useMemo(() =>onFileDropThreads@@ -1512,7 +1417,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {// A zero-height boundary also makes dnd-kit scale the source to// zero. Only projected peers use scaleY as a visibility sentinel.visibility:- sortable.hidden || (!sortable.isDragging && sortable.transform?.scaleY === 0)+ !sortable.isDragging && sortable.transform?.scaleY === 0? ("hidden" as const): undefined,},@@ -1584,21 +1489,18 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {useRightPanelStore.getState().open(threadRef, "pull-requests");if (!props.isActive) onThreadActivate(threadRef);}, [onThreadActivate, props.isActive, threadRef]);- const renderPrBadge = (iconOnly: boolean, variant: "underline" | "badge" = "underline") =>+ const prBadge =prBadgeShape?.kind === "stack" || pr || currentLinkedPr ? (<ThreadPullRequestBadgeControl- variant={variant}+ variant="underline"badge={prBadgeShape}number={pr?.number ?? currentLinkedPr?.number}url={pr?.url ?? currentLinkedPr?.url}status={prStatus}- iconOnly={iconOnly}onOpenStack={handlePrStackClick}onOpenPullRequest={handlePrClick}/>) : null;- const hasPrBadge = prBadgeShape?.kind === "stack" || pr !== null || currentLinkedPr !== null;- const prBadge = renderPrBadge(false);const terminalStatusIcon = terminalStatus ? (<spanrole="img"@@ -1656,102 +1558,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {)) : null;- if (compact) {- return (- <li- data-thread-item- {...sortableRootProps}- {...(fileDropHandlers ?? {})}- className={cn("list-none", sortable?.isDragging && "relative z-20")}- >- <Tooltip- open={- sortable?.hidden ? false : sortable?.isDragging ? dragDestination !== null : tooltipOpen- }- onOpenChange={setTooltipOpen}- >- <TooltipTrigger- render={- <div- ref={rowRef}- role="button"- tabIndex={0}- aria-label={`${thread.title}${topStatus ? `, ${topStatus.label}` : ""}`}- aria-current={props.isActive ? "page" : undefined}- aria-busy={isRegeneratingTitle || undefined}- className={cn(- rowSurfaceClassName,- "flex h-7 items-center justify-center focus-visible:ring-2 focus-visible:ring-ring",- )}- onClick={handleClick}- onDoubleClick={handleDoubleClick}- onKeyDown={handleKeyDown}- onContextMenu={handleContextMenu}- />- }- >- <span className="relative inline-flex size-4 shrink-0 items-center justify-center">- {props.project ? (- <ProjectFavicon project={props.project} className="size-4" />- ) : driverKind ? (- <ProviderInstanceIcon- driverKind={driverKind}- displayName={providerEntry?.displayName ?? modelInstanceId}- iconClassName="size-4"- />- ) : (- <SquarePenIcon aria-hidden className="size-4" />- )}- {isRemote ? (- <Tooltip>- <TooltipTrigger- render={- <span- role="img"- aria-label={props.environmentLabel ?? "Remote environment"}- className="absolute -left-1 -bottom-1 inline-flex size-3 items-center justify-center rounded-full bg-sidebar text-sidebar-muted-foreground ring-1 ring-sidebar"- />- }- >- <EnvironmentMachineIcon kind={props.environmentMachine} className="size-2.5" />- </TooltipTrigger>- <TooltipPopup side="right">- {props.environmentLabel ?? "Remote environment"}- </TooltipPopup>- </Tooltip>- ) : null}- {hasPrBadge ? (- <span className="absolute -top-1 -right-1 inline-flex">- {renderPrBadge(true, "badge")}- </span>- ) : null}- </span>- {topStatus ? (- <span- aria-hidden- className={cn(- "absolute right-0.5 bottom-0.5 size-1.5 rounded-full bg-current",- topStatus.className,- )}- />- ) : hasUnsentDraft ? (- <span- aria-hidden- className="absolute right-0.5 bottom-0.5 size-1.5 rounded-full bg-primary"- />- ) : null}- {props.jumpLabel ? <JumpHintBadge label={props.jumpLabel} /> : null}- </TooltipTrigger>- {sortable?.isDragging ? (- <TooltipPopup side="right">{dragDestination}</TooltipPopup>- ) : (- detailsTooltip- )}- </Tooltip>- </li>- );- }-if (variant === "slim") {return (<li@@ -1764,11 +1570,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {sortable?.isDragging && "relative z-20",)}>- <Tooltip- open={!sortable?.isDragging && tooltipOpen}- onOpenChange={setTooltipOpen}- disabled={sortable?.isDragging}- >+ <Tooltip disabled={sortable?.isDragging}><TooltipTriggerrender={<div@@ -1908,22 +1710,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {);}- const compactRows = props.compact;- const CompactStatusIcon = topStatus- ? {- working: CircleDashedIcon,- monitoring: EyeIcon,- approval: ShieldQuestionIcon,- input: MessageCircleQuestionIcon,- failed: CircleAlertIcon,- woke: AlarmClockIcon,- done: CircleCheckIcon,- }[topStatus.icon]- : null;- const compactCompletedAt =- compactRows && status === "ready" && !isWokeStatus- ? (thread.latestTurn?.completedAt ?? null)- : null;const diff = latestTurnDiff(thread);return (@@ -1932,25 +1718,19 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {{...sortableRootProps}{...(fileDropHandlers ?? {})}className={cn(- "list-none [content-visibility:auto]",- compactRows- ? "[contain-intrinsic-size:auto_36px]"- : "py-0.5 [contain-intrinsic-size:auto_78px]",+ // Matches the h-[4.875rem] content box; the py-0.5 padding is added on top.+ "list-none py-0.5 [content-visibility:auto] [contain-intrinsic-size:auto_78px]",sortable?.isDragging && "relative z-20",)}>- <Tooltip- open={!snoozeMenuOpen && !sortable?.isDragging && tooltipOpen}- onOpenChange={setTooltipOpen}- disabled={snoozeMenuOpen || sortable?.isDragging}- >+ <Tooltip disabled={snoozeMenuOpen || sortable?.isDragging}><TooltipTriggerrender={<divref={rowRef}role="button"tabIndex={0}- data-testid={compactRows ? "sidebar-row-compact" : "sidebar-row-card"}+ data-testid="sidebar-row-card"aria-busy={isRegeneratingTitle || undefined}className={rowSurfaceClassName}onClick={handleClick}@@ -1960,62 +1740,13 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {/>}>- <div- className={cn(- "relative z-10",- compactRows- ? "flex h-9 items-center px-2.5"- : "h-[4.875rem] px-[var(--sidebar-row-content-inset)] py-[var(--sidebar-content-inset)]",- )}- >- <div className="flex h-5 w-full min-w-0 items-center gap-1.5">+ <div className="relative z-10 h-[4.875rem] px-[var(--sidebar-row-content-inset)] py-[var(--sidebar-content-inset)]">+ <div className="flex h-5 min-w-0 items-center gap-1.5">{draftIndicator}{props.project ? (- <span className="relative inline-flex size-4 shrink-0 items-center justify-center">- <ProjectFavicon project={props.project} className="size-4" />- {compactRows && isRemote ? (- <Tooltip>- <TooltipTrigger- render={- <span- role="img"- aria-label={props.environmentLabel ?? "Remote environment"}- className="absolute -right-1 -bottom-1 inline-flex size-3 items-center justify-center rounded-full bg-sidebar text-sidebar-muted-foreground ring-1 ring-sidebar"- />- }- >- <EnvironmentMachineIcon- kind={props.environmentMachine}- className="size-2.5"- />- </TooltipTrigger>- <TooltipPopup side="top">- {props.environmentLabel ?? "Remote environment"}- </TooltipPopup>- </Tooltip>- ) : null}- </span>- ) : compactRows && isRemote ? (- <Tooltip>- <TooltipTrigger- render={- <span- role="img"- aria-label={props.environmentLabel ?? "Remote environment"}- className="inline-flex size-4 shrink-0 items-center justify-center text-sidebar-muted-foreground/70"- />- }- >- <EnvironmentMachineIcon kind={props.environmentMachine} className="size-3.5" />- </TooltipTrigger>- <TooltipPopup side="top">- {props.environmentLabel ?? "Remote environment"}- </TooltipPopup>- </Tooltip>+ <ProjectFavicon project={props.project} className="size-4 shrink-0" />) : null}- {compactRows ? (- title- ) : props.projectDisplayName ? (+ {props.projectDisplayName ? (<spanclassName={cn("min-w-0 flex-1 truncate text-secondary-label text-xs",@@ -2028,38 +1759,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {<span className="flex-1" />)}{pinIndicator}- {compactRows ? (- <>- {terminalStatusIcon}- {topStatus && CompactStatusIcon ? (- isWokeStatus ? (- <button- type="button"- aria-label="Dismiss Woke notification"- onClick={handleAcknowledgeWokeClick}- className={cn(- "shrink-0 rounded-sm outline-none focus-visible:ring-2 focus-visible:ring-ring",- topStatus.className,- )}- >- <CompactStatusIcon aria-hidden className="size-3.5" />- <span role="status" className="sr-only">- {topStatus.label}- </span>- </button>- ) : (- <span- role="status"- className={cn("inline-flex shrink-0", topStatus.className)}- >- <CompactStatusIcon aria-hidden className="size-3.5" />- <span className="sr-only">{topStatus.label}</span>- </span>- )- ) : null}- {renderPrBadge(true)}- </>- ) : null}{/* The visible state owns this slot's width: status at rest,actions on hover/keyboard focus or while the popover is open. Keepingthe hidden state out of flow lets the project label reclaim@@ -2067,35 +1766,20 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {{sortable?.isDragging ? (dragDestination) : (- <span- className={cn(- "group/sidebar-status-slot relative ml-auto flex h-5 shrink-0 items-stretch justify-end text-xs",- !compactRows && "min-w-8",- )}- >+ <span className="group/sidebar-status-slot relative ml-auto flex h-5 min-w-8 shrink-0 items-stretch justify-end text-xs">{/* Read-only status labels yield to the hover actions. Woke isitself an action, so it stays pointer-enabled and visiblewhile the other controls appear beside it. */}<spanclassName={cn(- isWokeStatus && !compactRows+ isWokeStatus? "pointer-events-auto": "pointer-events-none group-has-[:focus-visible]/sidebar-status-slot:absolute group-has-[:focus-visible]/sidebar-status-slot:right-0 group-has-[:focus-visible]/sidebar-status-slot:opacity-0 group-hover/sidebar-row:absolute group-hover/sidebar-row:right-0 group-hover/sidebar-row:opacity-0","flex items-center self-center justify-self-end tabular-nums text-secondary-label transition-opacity",snoozeMenuOpen && "pointer-events-none absolute right-0 opacity-0",)}>- {compactRows ? (- status === "working" ? (- <span className={topStatus?.className}>- <WorkingDuration startedAt={resolveWorkingStartedAt(thread)} />- </span>- ) : compactCompletedAt ? (- <SidebarCompletedTime completedAt={compactCompletedAt} />- ) : (- threadTimeLabel(thread)- )- ) : topStatus ? (+ {topStatus ? (isWokeStatus ? (<Tooltip><TooltipTrigger@@ -2201,7 +1885,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {}><CheckIcon className="size-3.5" />- {compactRows ? null : "Settle"}+ Settle</TooltipTrigger><TooltipPopup>Settle thread</TooltipPopup></Tooltip>@@ -2211,70 +1895,68 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {</span>)}</div>- {isRegeneratingTitle ? (- <span role="status" className="sr-only">- Regenerating title- </span>- ) : null}- {compactRows ? null : (- <>- <div className="mt-1 flex min-w-0">{title}</div>- <div className="mt-0.5 flex min-w-0 items-center gap-1.5 text-secondary-label text-xs">- {/* Always the branch. The plan step used to take this slot while+ <div className="mt-1 flex min-w-0">+ {title}+ {isRegeneratingTitle ? (+ <span role="status" className="sr-only">+ Regenerating title+ </span>+ ) : null}+ </div>+ <div className="mt-0.5 flex min-w-0 items-center gap-1.5 text-secondary-label text-xs">+ {/* Always the branch. The plan step used to take this slot whileworking, but it truncated to a half-sentence and dropped thebranch, so the row lost its most stable identifier. */}- {thread.branch ? (- <>- <ThreadWorktreeIndicator thread={thread} />- <span className="min-w-0 flex-1 truncate whitespace-nowrap text-muted-foreground/40">- {thread.branch}- </span>- </>- ) : (- <span className="flex-1" />- )}- {terminalStatusIcon}- {prBadge}- {diff ? (- <span className="shrink-0 font-mono">- <span className="text-diff-addition-foreground">+{diff.insertions}</span>{" "}- <span className="text-diff-deletion-foreground">−{diff.deletions}</span>- </span>- ) : null}- <span- aria-hidden- className="pointer-events-none ml-auto inline-flex shrink-0 items-center gap-1"- >- {isRemote ? (- <span className="inline-flex shrink-0 items-center text-sidebar-muted-foreground/70">- <EnvironmentMachineIcon- aria-hidden- kind={props.environmentMachine}- className="size-3.5"- />- </span>- ) : null}- {driverKind ? (- <span className="inline-flex shrink-0 items-center">- <ProviderInstanceIcon- driverKind={driverKind}- displayName={- providerEntry?.displayName ??- thread.session?.providerName ??- modelInstanceId- }- accentColor={providerEntry?.accentColor}- showBadge={showInstanceBadge}- // Glyph dims, badge stays saturated; offset matches the composer trigger.- iconClassName="size-3.5 opacity-60"- badgeClassName="right-[-0.1875rem] bottom-[-0.1875rem] h-3 min-w-3 px-0.5 text-[7px]"- />- </span>- ) : null}+ {thread.branch ? (+ <>+ <ThreadWorktreeIndicator thread={thread} />+ <span className="min-w-0 flex-1 truncate whitespace-nowrap text-muted-foreground/40">+ {thread.branch}</span>- </div>- </>- )}+ </>+ ) : (+ <span className="flex-1" />+ )}+ {terminalStatusIcon}+ {prBadge}+ {diff ? (+ <span className="shrink-0 font-mono">+ <span className="text-diff-addition-foreground">+{diff.insertions}</span>{" "}+ <span className="text-diff-deletion-foreground">−{diff.deletions}</span>+ </span>+ ) : null}+ <span+ aria-hidden+ className="pointer-events-none ml-auto inline-flex shrink-0 items-center gap-1"+ >+ {isRemote ? (+ <span className="inline-flex shrink-0 items-center text-sidebar-muted-foreground/70">+ <EnvironmentMachineIcon+ aria-hidden+ kind={props.environmentMachine}+ className="size-3.5"+ />+ </span>+ ) : null}+ {driverKind ? (+ <span className="inline-flex shrink-0 items-center">+ <ProviderInstanceIcon+ driverKind={driverKind}+ displayName={+ providerEntry?.displayName ??+ thread.session?.providerName ??+ modelInstanceId+ }+ accentColor={providerEntry?.accentColor}+ showBadge={showInstanceBadge}+ // Glyph dims, badge stays saturated; offset matches the composer trigger.+ iconClassName="size-3.5 opacity-60"+ badgeClassName="right-[-0.1875rem] bottom-[-0.1875rem] h-3 min-w-3 px-0.5 text-[7px]"+ />+ </span>+ ) : null}+ </span>+ </div></div>{props.jumpLabel ? <JumpHintBadge label={props.jumpLabel} /> : null}</TooltipTrigger>@@ -2308,9 +1990,6 @@ const SidebarSearchResultRow = memo(function SidebarSearchResultRow(props: {onFileDropThreads: (threadRef: ScopedThreadRef, files: File[]) => void;}) {const { thread } = props;- const compactEnabled = useCompactSidebarEnabled();- const { state, isMobile } = useSidebar();- const compact = compactEnabled && state === "collapsed" && !isMobile;const threadRef = useMemo(() => scopeThreadRef(thread.environmentId, thread.id),[thread.environmentId, thread.id],@@ -2396,7 +2075,6 @@ const SidebarSearchResultRow = memo(function SidebarSearchResultRow(props: {onClick={props.onSelect}className={cn("flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm outline-none",- compact && "justify-center px-0",props.isHighlighted || props.isRouteActive? "bg-sidebar-row-active text-sidebar-foreground": "text-sidebar-muted-foreground/75 hover:bg-sidebar-row-hover hover:text-sidebar-foreground",@@ -2408,15 +2086,9 @@ const SidebarSearchResultRow = memo(function SidebarSearchResultRow(props: {>{props.project ? (<ProjectFavicon project={props.project} className="size-4 shrink-0" />- ) : compact ? (- <SquarePenIcon aria-hidden className="size-4" />) : null}- <span className={compact ? "sr-only" : "min-w-0 flex-1 truncate"}>{thread.title}</span>- <span- className={- compact ? "sr-only" : "shrink-0 text-xs text-muted-foreground/55 tabular-nums"- }- >+ <span className="min-w-0 flex-1 truncate">{thread.title}</span>+ <span className="shrink-0 text-xs text-muted-foreground/55 tabular-nums">{threadTimeLabel(thread)}</span></TooltipTrigger>@@ -2444,12 +2116,8 @@ export default function Sidebar() {const projectOrder = useUiStateStore((store) => store.projectOrder);const threads = useThreadShells();const router = useRouter();- const { isMobile, setOpenMobile, setOpen, state: sidebarState } = useSidebar();- const compactEnabled = useCompactSidebarEnabled();- const compact = compactEnabled && sidebarState === "collapsed" && !isMobile;- const [snoozedFooter, setSnoozedFooter] = useState<HTMLUListElement | null>(null);+ const { isMobile, setOpenMobile } = useSidebar();const keybindings = useAtomValue(primaryServerKeybindingsAtom);- const compactThreadRows = useClientSettings((s) => s.sidebarCompactThreadRows);const confirmThreadDelete = useClientSettings((s) => s.confirmThreadDelete);const confirmThreadArchive = useClientSettings((s) => s.confirmThreadArchive);const sidebarProjectSortOrder = useClientSettings((s) => s.sidebarProjectSortOrder);@@ -3020,7 +2688,6 @@ export default function Sidebar() {[setSettledShelfExpanded],);const renderedSettledThreads = useMemo(() => {- if (compact) return EMPTY_THREADS;if (settledShelfExpanded) return visibleSettledThreads;if (routeThreadKey === null) return EMPTY_THREADS;const routeThread = visibleSettledThreads.find(@@ -3028,7 +2695,7 @@ export default function Sidebar() {scopedThreadKey(scopeThreadRef(thread.environmentId, thread.id)) === routeThreadKey,);return routeThread === undefined ? EMPTY_THREADS : [routeThread];- }, [compact, routeThreadKey, settledShelfExpanded, visibleSettledThreads]);+ }, [routeThreadKey, settledShelfExpanded, visibleSettledThreads]);// The snoozed shelf is collapsed by default: out of the way, never gone.// Collapsed threads don't render (and so don't participate in jump@@ -3256,14 +2923,10 @@ export default function Sidebar() {const [renamingThreadKey, setRenamingThreadKey] = useState<string | null>(null);const [renamingTitle, setRenamingTitle] = useState("");- const startThreadRename = useCallback(- (threadRef: ScopedThreadRef, title: string) => {- if (compact) setOpen(true);- setRenamingThreadKey(scopedThreadKey(threadRef));- setRenamingTitle(title);- },- [compact, setOpen],- );+ const startThreadRename = useCallback((threadRef: ScopedThreadRef, title: string) => {+ setRenamingThreadKey(scopedThreadKey(threadRef));+ setRenamingTitle(title);+ }, []);const cancelThreadRename = useCallback(() => setRenamingThreadKey(null), []);const commitThreadRename = useCallback((threadRef: ScopedThreadRef, title: string, originalTitle: string) => {@@ -3425,18 +3088,8 @@ export default function Sidebar() {const threadListRef = useRef<HTMLUListElement | null>(null);const dragLabelOffsetRef = useRef(0);const restrictBelowPins = useCallback<Modifier>(- (args) =>- restrictBelowSidebarLabel(- {- ...args,- // The fixed snoozed shelf shares the main list's drag boundary.- containerNodeRect: compact- ? (threadListRef.current?.getBoundingClientRect() ?? args.containerNodeRect)- : args.containerNodeRect,- },- dragLabelOffsetRef.current,- ),- [compact],+ (args) => restrictBelowSidebarLabel(args, dragLabelOffsetRef.current),+ [],);const listMotionRef = useRef<ReturnType<typeof createSidebarListMotion> | null>(null);const attachListMotionRef = useCallback((node: HTMLUListElement | null) => {@@ -3658,7 +3311,7 @@ export default function Sidebar() {pinnedThreads.length +activeThreads.length +snoozedThreads.length +- (compact ? 0 : settledThreads.length) ===+ settledThreads.length ===0) {return [];@@ -3674,15 +3327,13 @@ export default function Sidebar() {items.push({ kind: "marker", marker: "snoozed-header" });items.push(...rowsOf(visibleSnoozedThreads, "snoozed"));}- if (!compact) {- items.push({ kind: "marker", marker: "settled-header" });- items.push({ kind: "marker", marker: "settled-placeholder" });- items.push(...rowsOf(renderedSettledThreads, "settled"));- }+ items.push({ kind: "marker", marker: "settled-header" });+ const settledRows = rowsOf(renderedSettledThreads, "settled");+ items.push({ kind: "marker", marker: "settled-placeholder" });+ items.push(...settledRows);return items;}, [activeThreads,- compact,pinnedThreads,renderedSettledThreads,settledThreads.length,@@ -3752,7 +3403,6 @@ export default function Sidebar() {() =>createSidebarSortingStrategy({items: sidebarListItems,- compact,boundaryLabelHeight: SIDEBAR_DRAG_LABEL_HEIGHT,settledOrder: draggedSettledOrder,settledExpanded: settledShelfExpanded,@@ -3761,7 +3411,6 @@ export default function Sidebar() {snoozedThreadCount: snoozedThreads.length,}),[- compact,draggedSettledOrder,routeThreadKey,settledShelfExpanded,@@ -3770,22 +3419,6 @@ export default function Sidebar() {snoozedThreads.length,],);- const draggingCompactSnoozed = compact && dragState?.activeSection === "snoozed";- const compactSnoozedDragThread =- draggingCompactSnoozed && dragState ? threadByKey.get(dragState.activeKey) : undefined;- const compactSidebarSortingStrategy = useCallback<typeof sidebarSortingStrategy>(- (args) => {- const item = sidebarListItems[args.index];- // Footer rows stay anchored while the main list previews a reorder.- if (- item?.kind === "thread" ? item.section === "snoozed" : item?.marker === "snoozed-header"- ) {- return null;- }- return sidebarSortingStrategy(args);- },- [sidebarListItems, sidebarSortingStrategy],- );// Hidden and filtered threads keep their keys. Reserve those slots without// including the rows in the visible drop order or writing to them.const { pinnedKeysById, activeKeysById } = useMemo(@@ -4689,19 +4322,7 @@ export default function Sidebar() {<><SidebarChromeHeader isElectron={isElectron} /><SidebarContent- className={cn(- "gap-0",- compact ? "group-data-[collapsible=icon]:overflow-visible" : "min-h-full",- )}- fixedFooter={- compact && !isSearchingThreads && snoozedThreads.length > 0 ? (- <ul- ref={setSnoozedFooter}- aria-label="Snoozed threads"- className="relative flex max-h-[min(30vh,16rem)] flex-col gap-px overflow-y-auto px-[var(--sidebar-content-inset)] pb-1"- />- ) : null- }+ className="gap-0 min-h-full"fixedHeader={// Lifted above the stage backdrop, whose fade bleeds below the// header and would otherwise paint across the search row's outline.@@ -4761,12 +4382,8 @@ export default function Sidebar() {// popup opens under the field, is at least as wide as it,// and grows to fit project names up to a cap, past which// the rows truncate.- anchor={compact ? undefined : headerSearchRef}- side={compact ? "right" : "bottom"}- className={cn(- "max-w-[min(18rem,var(--available-width))] overflow-hidden",- compact && "min-w-56",- )}+ anchor={headerSearchRef}+ className="max-w-[min(18rem,var(--available-width))] overflow-hidden"><ComboboxSearchInputaria-label="Search projects"@@ -4868,12 +4485,7 @@ export default function Sidebar() {</SidebarGroup>}>- <SidebarGroup- className={cn(- "ps-[calc(var(--sidebar-content-inset)+1px)] pe-[var(--sidebar-content-inset)] pb-1 pt-0",- !compact && "flex-1",- )}- >+ <SidebarGroup className="ps-[calc(var(--sidebar-content-inset)+1px)] pe-[var(--sidebar-content-inset)] pb-1 pt-0 flex-1">{isSearchingThreads ? (threadSearchResults.length > 0 ? (<TooltipProvider@@ -4926,10 +4538,7 @@ export default function Sidebar() {) : (<prole="status"- className={cn(- "px-2 py-6 text-center text-xs text-sidebar-muted-foreground",- compact && "sr-only",- )}+ className="px-2 py-6 text-center text-xs text-sidebar-muted-foreground">No threads found</p>@@ -4948,23 +4557,20 @@ export default function Sidebar() {modifiers={[restrictToVerticalAxis,restrictBelowPins,- ...(compact ? [] : [restrictToFirstScrollableAncestor]),+ restrictToFirstScrollableAncestor,]}onDragStart={handleThreadDragStart}onDragOver={handleThreadDragOver}onDragEnd={handleThreadDragEnd}><SidebarDragLifecycle onUnmount={cancelThreadDrag} />- <SortableContext- items={sortableIds}- strategy={compact ? compactSidebarSortingStrategy : sidebarSortingStrategy}- >+ <SortableContext items={sortableIds} strategy={sidebarSortingStrategy}><ulref={attachListMotionRef}role="list"className={cn("relative flex flex-col gap-px",- !compact && sidebarListItems.length > 0 && "flex-1",+ sidebarListItems.length > 0 && "flex-1",)}>{(() => {@@ -4976,9 +4582,10 @@ export default function Sidebar() {const threadKey = scopedThreadKey(scopeThreadRef(thread.environmentId, thread.id),);- // Settled and snoozed always use slim rows. Active and- // pinned threads use cards unless the user has explicitly- // enabled the compact thread-list preference.+ // Settled and snoozed are the ONLY things that collapse a+ // row: every other thread is a full card. Density comes+ // from users (or the auto rules) actually parking work,+ // not from the sidebar second-guessing what still matters.const isCard = section === "active" || section === "pinned";const rowVariant = isCard ? "card" : "slim";return (@@ -4988,7 +4595,6 @@ export default function Sidebar() {key={`${threadKey}:${rowVariant}`}thread={thread}variant={rowVariant}- compact={compactThreadRows}// Snoozed rows wake, settled rows un-settle, and cards settle.variantAction={section === "snoozed"@@ -5091,25 +4697,11 @@ export default function Sidebar() {!draggableThreadKeys.has(threadKey) || optimisticDrop !== null}>- {(bag) =>- renderThreadRowInner(- thread,- section,- draggingCompactSnoozed && bag.isDragging- ? { ...bag, hidden: true }- : bag,- )- }+ {(bag) => renderThreadRowInner(thread, section, bag)}</SortableThreadRow>);};const from = dragState?.activeSection ?? null;- const showDragLabels =- from !== null &&- (!compact ||- dragTargetSection === "active" ||- dragTargetSection === "pinned");- const snoozedItems: ReactNode[] = [];const items: ReactNode[] = [<SidebarDraftBlockkey="draft-sessions"@@ -5121,17 +4713,8 @@ export default function Sidebar() {/>,];for (const item of sidebarListItems) {- const destination =- compact &&- (item.kind === "thread"- ? item.section === "snoozed"- : item.marker === "snoozed-header")- ? snoozedItems- : items;if (item.kind === "thread") {- destination.push(- renderThreadRow(threadByKey.get(item.key)!, item.section),- );+ items.push(renderThreadRow(threadByKey.get(item.key)!, item.section));continue;}switch (item.marker) {@@ -5141,7 +4724,7 @@ export default function Sidebar() {key="pinned-header"marker="pinned-header"label="Pinned"- visible={showDragLabels}+ visible={from !== null}isDropTarget={dragTargetSection === "pinned"}/>,);@@ -5152,7 +4735,7 @@ export default function Sidebar() {key="pinned-divider"marker="pinned-divider"label="Active"- visible={showDragLabels}+ visible={from !== null}isDropTarget={dragTargetSection === "active"}/>,);@@ -5176,11 +4759,11 @@ export default function Sidebar() {);break;case "snoozed-header":- destination.push(+ items.push(<SidebarSectionHeaderkey="snoozed-shelf-header"marker="snoozed-header"- className={cn(!compact && "mt-auto")}+ className="mt-auto"label={snoozedShelfExpanded? "Snoozed"@@ -5198,7 +4781,7 @@ export default function Sidebar() {<SidebarSectionHeaderkey="settled-shelf-header"marker="settled-header"- className={cn(!compact && snoozedThreads.length === 0 && "mt-auto")}+ className={cn(snoozedThreads.length === 0 && "mt-auto")}label={settledShelfExpanded? "Settled"@@ -5233,56 +4816,18 @@ export default function Sidebar() {break;}}- // Keep the shelf inside this drag context while anchoring- // its DOM outside the main thread scroller.- return [- ...items,- compact && snoozedFooter- ? createPortal(snoozedItems, snoozedFooter, "snoozed-footer")- : null,- compactSnoozedDragThread- ? createPortal(- <DragOverlay dropAnimation={null}>- <ul className="pointer-events-none">- {renderThreadRowInner(compactSnoozedDragThread, "snoozed", {- isDragging: true,- listeners: undefined,- setNodeRef: () => {},- transform: null,- transition: undefined,- })}- </ul>- </DragOverlay>,- document.body,- "compact-snoozed-drag",- )- : null,- ];+ return items;})()}- {!compact && settledShelfExpanded && hiddenSettledCount > 0 ? (+ {settledShelfExpanded && hiddenSettledCount > 0 ? (<li className="list-none">- <Tooltip disabled={!compact}>- <TooltipTrigger- render={- <button- type="button"- onClick={showMoreSettled}- className={cn(- "flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm text-sidebar-muted-foreground/55 hover:bg-sidebar-row-hover hover:text-sidebar-foreground",- compact && "justify-center px-0",- )}- />- }- >- <PlusIcon aria-hidden className="size-4 shrink-0" />- <span className={compact ? "sr-only" : undefined}>- Show {Math.min(hiddenSettledCount, SETTLED_TAIL_PAGE_COUNT)} more- </span>- </TooltipTrigger>- <TooltipPopup side="right">- Show {Math.min(hiddenSettledCount, SETTLED_TAIL_PAGE_COUNT)} more- </TooltipPopup>- </Tooltip>+ <button+ type="button"+ onClick={showMoreSettled}+ className="flex h-9 w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 text-left text-sm text-sidebar-muted-foreground/55 hover:bg-sidebar-row-hover hover:text-sidebar-foreground"+ >+ <PlusIcon aria-hidden className="size-4 shrink-0" />+ Show {Math.min(hiddenSettledCount, SETTLED_TAIL_PAGE_COUNT)} more+ </button></li>) : null}</ul>@@ -5297,29 +4842,20 @@ export default function Sidebar() {snoozedThreads.length +settledThreads.length ===0 ? (- <div- className={cn(- "flex flex-col items-center gap-2 px-2 py-6 text-center text-xs text-muted-foreground/60",- compact && "px-0",- )}- >+ <div className="flex flex-col items-center gap-2 px-2 py-6 text-center text-xs text-muted-foreground/60">{projects.length === 0 ? (<>- <span className={compact ? "sr-only" : undefined}>No projects yet</span>+ <span>No projects yet</span><buttontype="button"onClick={openAddProjectCommandPalette}- aria-label="Add project"- className={cn(- "inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-[11px] font-medium text-sidebar-muted-foreground transition-colors hover:bg-sidebar-row-hover hover:text-sidebar-foreground",- compact && "justify-center px-1.5",- )}+ className="inline-flex cursor-pointer items-center gap-1.5 rounded-md border border-sidebar-border px-2.5 py-1 text-[11px] font-medium text-sidebar-muted-foreground transition-colors hover:bg-sidebar-row-hover hover:text-sidebar-foreground"><PlusIcon className="-mx-0.5 size-3" />- <span className={compact ? "sr-only" : undefined}>Add project</span>+ Add project</button></>- ) : compact ? null : scopedProjectGroup ? (+ ) : scopedProjectGroup ? (`No threads in ${scopedProjectGroup.displayName} yet`) : ("No threads yet"diff --git a/apps/web/src/components/ThreadStatusIndicators.tsx b/apps/web/src/components/ThreadStatusIndicators.tsxindex 4b26d044202..7201779f13f 100644--- a/apps/web/src/components/ThreadStatusIndicators.tsx+++ b/apps/web/src/components/ThreadStatusIndicators.tsx@@ -144,17 +144,14 @@ export function ThreadPullRequestBadgeControl({number,url,status,- iconOnly = false,onOpenStack,onOpenPullRequest,}: {- variant: "underline" | "ghost" | "badge";+ variant: "underline" | "ghost";badge: ThreadPullRequestBadge | null;number?: number | undefined;url?: string | undefined;status: PrStatusIndicator | null;- /** Dense rows drop the number/layer count and keep only the state glyph. */- iconOnly?: boolean;onOpenStack: () => void;onOpenPullRequest: (event: MouseEvent<HTMLAnchorElement>) => void;}) {@@ -171,9 +168,7 @@ export function ThreadPullRequestBadgeControl({const className = cn(variant === "ghost"? buttonVariants({ variant: "ghost", size: "xs" })- : variant === "badge"- ? "inline-flex size-3 shrink-0 cursor-pointer items-center justify-center rounded-full bg-sidebar ring-1 ring-sidebar outline-none focus-visible:ring-2 focus-visible:ring-ring"- : "inline-flex shrink-0 cursor-pointer items-center gap-0.5 whitespace-nowrap border-b border-transparent hover:border-current focus-visible:outline-2 focus-visible:outline-ring",+ : "inline-flex shrink-0 cursor-pointer items-center gap-0.5 whitespace-nowrap border-b border-transparent hover:border-current focus-visible:outline-2 focus-visible:outline-ring","text-xs tabular-nums",variant === "ghost" &&"font-normal text-xs! active:scale-100 [--control-icon-color:currentColor]",@@ -183,11 +178,8 @@ export function ThreadPullRequestBadgeControl({);const content = (<>- <ThreadPullRequestBadgeIcon- icon={badge?.kind ?? "pull-request"}- className={variant === "badge" ? "size-2.5" : undefined}- />- {iconOnly ? null : isStack ? badge.layers : linkedCount !== null ? `+${linkedCount}` : number}+ <ThreadPullRequestBadgeIcon icon={badge?.kind ?? "pull-request"} />+ {isStack ? badge.layers : linkedCount !== null ? `+${linkedCount}` : number}</>);return (diff --git a/apps/web/src/components/settings/CompactSidebarPreview.tsx b/apps/web/src/components/settings/CompactSidebarPreview.tsxdeleted file mode 100644index 4d1e861d14e..00000000000--- a/apps/web/src/components/settings/CompactSidebarPreview.tsx+++ /dev/null@@ -1,82 +0,0 @@-import { useEffect, useRef, useState } from "react";--import { cn } from "~/lib/utils";--export function CompactSidebarPreview({- railEnabled,- compactRows,-}: {- railEnabled: boolean;- compactRows: boolean;-}) {- const [collapsed, setCollapsed] = useState(false);- const sidebarRef = useRef<HTMLSpanElement>(null);-- useEffect(() => {- if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;- const animation = sidebarRef.current?.animate(- [- { width: "36px", offset: 0 },- { width: railEnabled ? "12px" : "0px", offset: 0.45 },- { width: railEnabled ? "12px" : "0px", offset: 0.6 },- { width: "36px", offset: 1 },- ],- { duration: 800, easing: "ease-in-out" },- );- return () => animation?.cancel();- }, [railEnabled, compactRows]);-- return (- <button- type="button"- aria-label="Toggle compact sidebar preview"- aria-pressed={collapsed}- className="group/compact-preview relative flex h-10 w-full cursor-pointer overflow-hidden rounded-lg border border-border bg-background p-1 shadow-xs/5 outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background"- onClick={() => {- sidebarRef.current?.getAnimations().forEach((animation) => animation.cancel());- setCollapsed((value) => !value);- }}- >- <span- ref={sidebarRef}- aria-hidden- className={cn(- "flex h-full shrink-0 flex-col justify-center gap-1 overflow-hidden rounded-md bg-sidebar transition-[width] duration-250 ease-out motion-reduce:transition-none",- collapsed ? (railEnabled ? "w-3" : "w-0") : "w-9",- )}- >- {(compactRows ? [0, 1, 2, 3] : [0, 1, 2]).map((row) => (- <span key={row} className="flex shrink-0 items-start gap-1 px-1">- <span className="size-1 shrink-0 rounded-[1px] bg-muted-foreground/50" />- <span- className={cn(- "flex shrink-0 flex-col gap-0.5 transition-opacity duration-250 ease-out motion-reduce:transition-none",- collapsed && "opacity-0",- )}- >- <span className="h-0.5 w-4 rounded-full bg-muted-foreground/25" />- {!compactRows && <span className="h-0.5 w-2 rounded-full bg-muted-foreground/15" />}- </span>- </span>- ))}- </span>- <span aria-hidden className="flex min-w-0 flex-1 flex-col gap-1 px-1 pt-1">- <span className="h-0.5 w-full rounded-full bg-muted-foreground/25" />- <span className="h-0.5 w-4/5 rounded-full bg-muted-foreground/20" />- <span className="h-0.5 w-3/5 rounded-full bg-muted-foreground/15" />- </span>- <span- aria-hidden- className={cn(- "pointer-events-none absolute top-3 left-5 flex w-9 flex-col gap-1 rounded-sm border border-border bg-popover p-1 opacity-0 shadow-xs transition-opacity duration-150 ease-out motion-reduce:transition-none",- collapsed &&- railEnabled &&- "group-hover/compact-preview:opacity-100 group-focus-visible/compact-preview:opacity-100",- )}- >- <span className="h-0.5 w-full rounded-full bg-popover-foreground/45" />- <span className="h-0.5 w-2/3 rounded-full bg-popover-foreground/25" />- </span>- </button>- );-}diff --git a/apps/web/src/components/settings/SettingsPanels.tsx b/apps/web/src/components/settings/SettingsPanels.tsxindex a0d713f58be..6baa561a91f 100644--- a/apps/web/src/components/settings/SettingsPanels.tsx+++ b/apps/web/src/components/settings/SettingsPanels.tsx@@ -170,7 +170,6 @@ import {import { searchableSetting } from "./settingsSearch";import { ProjectFavicon } from "../ProjectFavicon";import { PanelAnimationsPreview } from "./PanelAnimationsPreview";-import { CompactSidebarPreview } from "./CompactSidebarPreview";const ENVIRONMENT_IDENTIFICATION_LABELS: Record<EnvironmentIdentificationMode, string> = {artwork: "Artwork",@@ -524,10 +523,6 @@ export function useSettingsRestore(onRestored?: () => void) {...(theme !== "system" ? ["Theme"] : []),...(!followSystem ? ["Follow system"] : []),...(themeHalves !== null ? ["Theme mix"] : []),- ...(settings.compactSidebarEnabled !== DEFAULT_UNIFIED_SETTINGS.compactSidebarEnabled ||- settings.sidebarCompactThreadRows !== DEFAULT_UNIFIED_SETTINGS.sidebarCompactThreadRows- ? ["Compact sidebar"]- : []),...(settings.appearanceContrast !== DEFAULT_UNIFIED_SETTINGS.appearanceContrast? ["Contrast"]: []),@@ -634,7 +629,6 @@ export function useSettingsRestore(onRestored?: () => void) {settings.browserLinkTarget,settings.browserAutoShowFloatingPreview,settings.appearanceContrast,- settings.compactSidebarEnabled,settings.diffColorScheme,settings.enableAgentBrowserAccess,settings.confirmQuit,@@ -666,7 +660,6 @@ export function useSettingsRestore(onRestored?: () => void) {settings.continueThreadsAfterServerUpdate,settings.sidebarAutoSettleAfterDays,settings.sidebarAutoSettleOnMerge,- settings.sidebarCompactThreadRows,settings.sidebarProjectGroupingMode,settings.sidebarThreadPreviewCount,settings.showSkillsInSlashMenu,@@ -744,7 +737,6 @@ export function useSettingsRestore(onRestored?: () => void) {}updateSettings({appearanceContrast: DEFAULT_UNIFIED_SETTINGS.appearanceContrast,- compactSidebarEnabled: DEFAULT_UNIFIED_SETTINGS.compactSidebarEnabled,diffColorScheme: DEFAULT_UNIFIED_SETTINGS.diffColorScheme,timestampFormat: DEFAULT_UNIFIED_SETTINGS.timestampFormat,notificationMode: DEFAULT_UNIFIED_SETTINGS.notificationMode,@@ -762,7 +754,6 @@ export function useSettingsRestore(onRestored?: () => void) {panelAnimationDurationMs: DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs,sidebarThreadPreviewCount: DEFAULT_UNIFIED_SETTINGS.sidebarThreadPreviewCount,sidebarProjectGroupingMode: DEFAULT_UNIFIED_SETTINGS.sidebarProjectGroupingMode,- sidebarCompactThreadRows: DEFAULT_UNIFIED_SETTINGS.sidebarCompactThreadRows,sidebarAutoSettleAfterDays: DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleAfterDays,sidebarAutoSettleOnMerge: DEFAULT_UNIFIED_SETTINGS.sidebarAutoSettleOnMerge,responseStreamingMode: DEFAULT_UNIFIED_SETTINGS.responseStreamingMode,@@ -1143,19 +1134,6 @@ export function AppearanceSettingsPanel() {const [isImportThemeOpen, setIsImportThemeOpen] = useState(false);const settings = useScopedSettings();const updateSettings = useUpdateScopedSettings();- const compactSidebarMode = settings.compactSidebarEnabled- ? settings.sidebarCompactThreadRows- ? "both"- : "rail"- : settings.sidebarCompactThreadRows- ? "threads"- : "off";- const compactSidebarModes = {- off: "Off",- rail: "Rail only",- threads: "Threads only",- both: "Both",- };const environmentStageLabel = useEnvironmentStageLabel();const showEnvironmentIdentification =resolveEnvironmentIdentificationPillLabel(environmentStageLabel) !== null;@@ -1442,64 +1420,6 @@ export function AppearanceSettingsPanel() {/></SettingsSection>- <SettingsSection id="appearance-sidebar" title="Sidebar">- <SettingsRow- {...searchableSetting("compact-sidebar")}- description="Choose a collapsed icon rail, denser thread rows, or both. Click the preview to collapse or expand."- resetAction={- settings.compactSidebarEnabled !== DEFAULT_UNIFIED_SETTINGS.compactSidebarEnabled ||- settings.sidebarCompactThreadRows !==- DEFAULT_UNIFIED_SETTINGS.sidebarCompactThreadRows ? (- <SettingResetButton- label="compact sidebar"- onClick={() =>- updateSettings({- compactSidebarEnabled: DEFAULT_UNIFIED_SETTINGS.compactSidebarEnabled,- sidebarCompactThreadRows: DEFAULT_UNIFIED_SETTINGS.sidebarCompactThreadRows,- })- }- />- ) : null- }- control={- <div className="grid w-full grid-cols-[5rem_1fr] items-center gap-3 sm:w-auto sm:grid-cols-[7rem_10rem] sm:gap-4">- <CompactSidebarPreview- key={compactSidebarMode}- railEnabled={settings.compactSidebarEnabled}- compactRows={settings.sidebarCompactThreadRows}- />- <Select- value={compactSidebarMode}- onValueChange={(value) => {- if (- value !== "off" &&- value !== "rail" &&- value !== "threads" &&- value !== "both"- )- return;- updateSettings({- compactSidebarEnabled: value === "rail" || value === "both",- sidebarCompactThreadRows: value === "threads" || value === "both",- });- }}- >- <SelectTrigger size="sm" className="w-full" aria-label="Compact sidebar">- <SelectValue>{compactSidebarModes[compactSidebarMode]}</SelectValue>- </SelectTrigger>- <SelectPopup align="end" alignItemWithTrigger={false}>- {Object.entries(compactSidebarModes).map(([value, label]) => (- <SelectItem key={value} hideIndicator value={value}>- {label}- </SelectItem>- ))}- </SelectPopup>- </Select>- </div>- }- />- </SettingsSection>-<TypographySection /></SettingsPageContainer>);diff --git a/apps/web/src/components/settings/SettingsSidebarNav.tsx b/apps/web/src/components/settings/SettingsSidebarNav.tsxindex c206174a397..c29068934ef 100644--- a/apps/web/src/components/settings/SettingsSidebarNav.tsx+++ b/apps/web/src/components/settings/SettingsSidebarNav.tsx@@ -24,7 +24,6 @@ import {XIcon,} from "lucide-react";import { useLocation, useNavigate } from "@tanstack/react-router";-import { useCompactSidebarEnabled } from "../../hooks/useSettings";import { Button } from "../ui/button";import { Input } from "../ui/input";@@ -112,13 +111,12 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {(item) => item.to !== "/settings/projects" || isSettingsOverviewVisible(scopeSearch),);const { isMobile, setOpenMobile, open, setOpen } = useSidebar();- const compactSidebarEnabled = useCompactSidebarEnabled();const searchInputRef = useRef<HTMLInputElement>(null);const [query, setQuery] = useState("");const [activeResultIndex, setActiveResultIndex] = useState(0);const searchableItems = useAvailableSettingsSearchItems();const results = useMemo(() => searchSettings(query, searchableItems), [query, searchableItems]);- const isSearching = query.trim().length > 0 && !(compactSidebarEnabled && !isMobile && !open);+ const isSearching = query.trim().length > 0;const hasResults = results.length > 0;useEffect(() => {@@ -235,18 +233,7 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {<><SidebarContent className="overflow-x-hidden"><SidebarGroup className="gap-2 p-[var(--sidebar-content-inset)]">- <SidebarMenuButton- className="hidden group-data-[collapsible=icon]:flex"- aria-label="Search settings"- tooltip="Search settings"- onClick={() => {- setOpen(true);- requestAnimationFrame(() => searchInputRef.current?.focus());- }}- >- <SearchIcon />- </SidebarMenuButton>- <div className="flex h-8 items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground group-data-[collapsible=icon]:hidden">+ <div className="flex h-8 items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground"><SearchIcon className="size-4 shrink-0 text-sidebar-muted-foreground/80" /><Inputref={searchInputRef}@@ -343,14 +330,10 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {<SidebarMenuItem key={item.to}><SidebarMenuButtonisActive={isActive}- aria-label={item.label}- tooltip={item.label}onClick={() => handleSectionClick(item.to)}><Icon />- <span className="truncate group-data-[collapsible=icon]:hidden">- {item.label}- </span>+ <span className="truncate">{item.label}</span></SidebarMenuButton></SidebarMenuItem>);@@ -360,12 +343,10 @@ export function SettingsSidebarNav({ pathname }: { pathname: string }) {</SidebarGroup></SidebarContent><SidebarFooter className="px-[var(--sidebar-content-inset)] py-1">- <div className="contents group-data-[collapsible=icon]:hidden">- <Suspense fallback={null}>- <T3ConnectSidebarSignIn />- </Suspense>- </div>- <div className="flex items-center gap-1 group-data-[collapsible=icon]:flex-col">+ <Suspense fallback={null}>+ <T3ConnectSidebarSignIn />+ </Suspense>+ <div className="flex items-center gap-1"><div className="min-w-0 flex-1"><SidebarUtilityMenu /></div>diff --git a/apps/web/src/components/settings/settingsSearch.ts b/apps/web/src/components/settings/settingsSearch.tsindex 1fe96d2b4df..837aa7b47ce 100644--- a/apps/web/src/components/settings/settingsSearch.ts+++ b/apps/web/src/components/settings/settingsSearch.ts@@ -159,14 +159,6 @@ export const SETTINGS_SEARCH_ITEMS = [title: "Panel animations",to: "/settings/appearance",},- {- id: "compact-sidebar",- title: "Compact sidebar",- to: "/settings/appearance",- searchTerms: [- "collapsed icons rail hover navigation preview expanded dense density one line rows chats threads compact thread list",- ],- },{id: "environment-identification",title: "Environment identification",diff --git a/apps/web/src/components/sidebar/SidebarChrome.tsx b/apps/web/src/components/sidebar/SidebarChrome.tsxindex 2f65cf8c369..afbbf7671df 100644--- a/apps/web/src/components/sidebar/SidebarChrome.tsx+++ b/apps/web/src/components/sidebar/SidebarChrome.tsx@@ -86,7 +86,7 @@ function SidebarBrand({ onBackdrop }: { onBackdrop: boolean }) {<Linkaria-label="Go to threads"className={cn(- "relative z-10 ml-[var(--workspace-titlebar-content-left)] hidden h-7 w-fit min-w-0 shrink-0 items-center overflow-hidden rounded-md outline-hidden ring-ring focus-visible:ring-2 md:flex group-data-[collapsible=icon]:hidden",+ "relative z-10 ml-[var(--workspace-titlebar-content-left)] hidden h-7 w-fit min-w-0 shrink-0 items-center overflow-hidden rounded-md outline-hidden ring-ring focus-visible:ring-2 md:flex",onBackdrop ? "text-white" : "text-foreground",)}to="/"@@ -187,12 +187,12 @@ export const SidebarUtilityMenu = memo(function SidebarUtilityMenu() {}, [canGoBack, closeMobileSidebar, navigate]);return (- <SidebarMenu className="flex-row items-center group-data-[collapsible=icon]:flex-col">+ <SidebarMenu className="flex-row items-center">{currentFooterPage ? (<SidebarMenuItem className="min-w-0 flex-1">- <SidebarMenuButton onClick={handleBackClick} aria-label="Back" tooltip="Back">+ <SidebarMenuButton onClick={handleBackClick}><ArrowLeftIcon />- <span className="group-data-[collapsible=icon]:hidden">Back</span>+ <span>Back</span></SidebarMenuButton></SidebarMenuItem>) : (@@ -224,10 +224,8 @@ export const SidebarUtilityMenu = memo(function SidebarUtilityMenu() {export const SidebarChromeFooter = memo(function SidebarChromeFooter() {return (<SidebarFooter className="px-[var(--sidebar-content-inset)] py-1">- <div className="contents group-data-[collapsible=icon]:hidden">- <SidebarProviderUpdatePill />- <SidebarUpdateArchitectureWarning />- </div>+ <SidebarProviderUpdatePill />+ <SidebarUpdateArchitectureWarning /><SidebarUtilityMenu /></SidebarFooter>);diff --git a/apps/web/src/components/sidebar/SidebarCompletedTime.test.tsx b/apps/web/src/components/sidebar/SidebarCompletedTime.test.tsxdeleted file mode 100644index 7327af79e79..00000000000--- a/apps/web/src/components/sidebar/SidebarCompletedTime.test.tsx+++ /dev/null@@ -1,56 +0,0 @@-import { act, memo } from "react";-import { create, type ReactTestRenderer } from "react-test-renderer";-import { afterEach, beforeEach, expect, it, vi } from "vite-plus/test";--import { SidebarCompletedTime } from "./SidebarCompletedTime";--let renderer: ReactTestRenderer | undefined;--beforeEach(() => {- vi.useFakeTimers();- vi.setSystemTime(new Date("2026-09-07T01:01:00Z"));- vi.stubGlobal("IS_REACT_ACT_ENVIRONMENT", true);- vi.stubGlobal("window", {- setTimeout,- clearTimeout,- setInterval,- clearInterval,- });-});--afterEach(async () => {- await act(() => renderer?.unmount());- renderer = undefined;- vi.unstubAllGlobals();- vi.useRealTimers();-});--it("advances visible and accessible completion times without rerendering its memoized row", async () => {- const rowRender = vi.fn();- const Row = memo(function Row() {- rowRender();- return <SidebarCompletedTime completedAt="2026-09-07T01:00:00Z" />;- });- await act(() => {- renderer = create(<Row />);- });- expect(renderer!.root.findByType("time").props.dateTime).toBe("2026-09-07T01:00:00Z");- expect(renderer!.root.findByProps({ className: "sr-only" }).children).toEqual(["Completed "]);- expect(- renderer!.root.findAll((node) => node.props.role === "status" || node.props["aria-live"]),- ).toHaveLength(0);- expect(renderer!.root.findByProps({ className: "text-secondary-label" }).children).toEqual([- "1m",- ]);-- await act(() => vi.advanceTimersByTime(60_000));-- expect(renderer!.root.findByProps({ className: "sr-only" }).children).toEqual(["Completed "]);- expect(renderer!.root.findByProps({ className: "text-secondary-label" }).children).toEqual([- "2m",- ]);- expect(rowRender).toHaveBeenCalledTimes(1);- await act(() => renderer!.unmount());- renderer = undefined;- expect(vi.getTimerCount()).toBe(0);-});diff --git a/apps/web/src/components/sidebar/SidebarCompletedTime.tsx b/apps/web/src/components/sidebar/SidebarCompletedTime.tsxdeleted file mode 100644index 785b8d9459d..00000000000--- a/apps/web/src/components/sidebar/SidebarCompletedTime.tsx+++ /dev/null@@ -1,16 +0,0 @@-import { useNowMinute } from "../../hooks/useNowMinute";-import { formatRelativeTimeLabel } from "../../timestampFormat";--export function SidebarCompletedTime({ completedAt }: { completedAt: string }) {- // Subscribe inside the label so time advances even when the row is memoized.- const nowMinute = useNowMinute();- const relativeTime = formatRelativeTimeLabel(completedAt, Date.parse(`${nowMinute}:00Z`));- const label = relativeTime === "just now" ? "now" : relativeTime.replace(/ ago$/, "");-- return (- <time dateTime={completedAt} className="inline-flex items-center">- <span className="sr-only">Completed </span>- <span className="text-secondary-label">{label}</span>- </time>- );-}diff --git a/apps/web/src/components/sidebar/SidebarThreadHeader.tsx b/apps/web/src/components/sidebar/SidebarThreadHeader.tsxindex d0718d9856f..878235615b3 100644--- a/apps/web/src/components/sidebar/SidebarThreadHeader.tsx+++ b/apps/web/src/components/sidebar/SidebarThreadHeader.tsx@@ -20,10 +20,9 @@ import {} from "react";import { cn } from "~/lib/utils";-import { useCompactSidebarEnabled } from "../../hooks/useSettings";import { Button } from "../ui/button";import { Input } from "../ui/input";-import { SidebarMenuButton, useSidebar } from "../ui/sidebar";+import { SidebarMenuButton } from "../ui/sidebar";import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";export interface SidebarThreadHeaderProps {@@ -70,9 +69,6 @@ export function SidebarThreadHeader({activeSearchResultIndex,onClearSearch,}: SidebarThreadHeaderProps) {- const compactEnabled = useCompactSidebarEnabled();- const { state, isMobile, setOpen } = useSidebar();- const compact = compactEnabled && state === "collapsed" && !isMobile;const resultsVisible = isSearching && searchResultCount > 0;// Results shrink as the query narrows, so the active index can outrun the// list; pointing aria-activedescendant at a removed option strands the@@ -83,24 +79,10 @@ export function SidebarThreadHeader({: "New thread";return (- <div className={cn("flex items-center gap-1", compact && "flex-col")}>- {compact ? (- <SidebarHeaderIconButton- label="Search threads"- onClick={() => {- setOpen(true);- requestAnimationFrame(() => searchInputRef.current?.focus());- }}- >- <SearchIcon />- </SidebarHeaderIconButton>- ) : null}+ <div className="flex items-center gap-1"><divref={searchFieldRef}- className={cn(- "flex h-8 min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground",- compact && "hidden",- )}+ className="flex h-8 min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-sm font-medium text-sidebar-muted-foreground hover:bg-sidebar-row-hover hover:text-sidebar-foreground"><SearchIcon className="size-4 shrink-0 text-[var(--sidebar-icon-color)]" /><Input@@ -142,12 +124,7 @@ export function SidebarThreadHeader({</div>{/* Segmented well: the icons read as one control instead of three loosebuttons competing with the search field beside them. */}- <div- className={cn(- "flex shrink-0 items-center rounded-md bg-sidebar-control-surface/60 p-px",- compact && "flex-col",- )}- >+ <div className="flex shrink-0 items-center rounded-md bg-sidebar-control-surface/60 p-px">{hasProjects ? (<>{projectScope}diff --git a/apps/web/src/components/sidebar/SidebarUpdatePill.tsx b/apps/web/src/components/sidebar/SidebarUpdatePill.tsxindex 8c04eec6fe7..a94b7801ecf 100644--- a/apps/web/src/components/sidebar/SidebarUpdatePill.tsx+++ b/apps/web/src/components/sidebar/SidebarUpdatePill.tsx@@ -348,7 +348,7 @@ function SidebarUpdateControl() {);return (- <SidebarMenuItem className="ml-auto shrink-0 group-data-[collapsible=icon]:hidden">+ <SidebarMenuItem className="ml-auto shrink-0"><Popoverhandle={releaseNotesPopoverHandle}onOpenChange={(open, details) => {diff --git a/apps/web/src/components/ui/sidebar.tsx b/apps/web/src/components/ui/sidebar.tsxindex 404295f5f5c..307feda7abf 100644--- a/apps/web/src/components/ui/sidebar.tsx+++ b/apps/web/src/components/ui/sidebar.tsx@@ -591,11 +591,9 @@ function SidebarSeparator({ className, ...props }: React.ComponentProps<typeof Sfunction SidebarContent({className,fixedHeader,- fixedFooter,...props}: React.ComponentProps<"div"> & {fixedHeader?: React.ReactNode;- fixedFooter?: React.ReactNode;}) {return (<>@@ -619,7 +617,6 @@ function SidebarContent({{...props}/></ScrollArea>- {fixedFooter ? <div className="w-full shrink-0">{fixedFooter}</div> : null}</>);}diff --git a/apps/web/src/hooks/useSettings.ts b/apps/web/src/hooks/useSettings.tsindex fa4b8bc8fd3..194cc36c55f 100644--- a/apps/web/src/hooks/useSettings.ts+++ b/apps/web/src/hooks/useSettings.ts@@ -379,13 +379,6 @@ export function useLegacySidebarEnabled(): boolean {return settingsHydrated && legacySidebarEnabled;}-/** Keep the default collapsed sidebar until persisted client settings hydrate. */-export function useCompactSidebarEnabled(): boolean {- const settingsHydrated = useClientSettingsHydrated();- const compactSidebarEnabled = useClientSettingsValue().compactSidebarEnabled;- return settingsHydrated && compactSidebarEnabled;-}-/** Read current settings for one environment, merged with client-local preferences. */export function useEnvironmentSettings<T = UnifiedSettings>(environmentId: EnvironmentId,diff --git a/apps/web/src/timestampFormat.test.ts b/apps/web/src/timestampFormat.test.tsindex 5169e438bb2..8c6287010d8 100644--- a/apps/web/src/timestampFormat.test.ts+++ b/apps/web/src/timestampFormat.test.ts@@ -228,15 +228,3 @@ describe("formatElapsedDurationLabel", () => {expect(formatElapsedDurationLabel("2026-04-03T12:00:00.000Z")).toBe("4d");});});--describe("explicit relative-time clock", () => {- it("uses the supplied minute instead of the wall clock", () => {- const completedAt = "2026-09-07T01:00:00Z";- expect(formatRelativeTimeLabel(completedAt, Date.parse("2026-09-07T01:01:00Z"))).toBe("1m ago");- expect(formatRelativeTimeLabel(completedAt, Date.parse("2026-09-07T01:02:00Z"))).toBe("2m ago");- expect(formatRelativeTime(completedAt, Date.parse("2026-09-07T01:02:00Z"))).toEqual({- value: "2m",- suffix: "ago",- });- });-});diff --git a/apps/web/src/timestampFormat.ts b/apps/web/src/timestampFormat.tsindex 983a9bb8b23..9dd463bb50f 100644--- a/apps/web/src/timestampFormat.ts+++ b/apps/web/src/timestampFormat.ts@@ -196,10 +196,10 @@ export type RelativeTimeState =| { status: "invalid" }| { status: "relative"; value: string; suffix: string | null };-export function formatRelativeTime(isoDate: string, nowMs = Date.now()): RelativeTimeParts | null {+export function formatRelativeTime(isoDate: string): RelativeTimeParts | null {const date = parseTimestampDate(isoDate);if (!date) return null;- const diffMs = nowMs - date.getTime();+ const diffMs = Date.now() - date.getTime();if (diffMs < 0) return { value: "just now", suffix: null };const seconds = Math.floor(diffMs / 1000);if (seconds < 60) return { value: "just now", suffix: null };@@ -211,8 +211,8 @@ export function formatRelativeTime(isoDate: string, nowMs = Date.now()): Relativreturn { value: `${days}d`, suffix: "ago" };}-export function formatRelativeTimeLabel(isoDate: string, nowMs = Date.now()) {- const relative = formatRelativeTime(isoDate, nowMs);+export function formatRelativeTimeLabel(isoDate: string) {+ const relative = formatRelativeTime(isoDate);if (!relative) return "";return relative.suffix ? `${relative.value} ${relative.suffix}` : relative.value;}diff --git a/apps/web/src/workspaceTitlebar.ts b/apps/web/src/workspaceTitlebar.tsindex aed95897cc5..b481221e63a 100644--- a/apps/web/src/workspaceTitlebar.ts+++ b/apps/web/src/workspaceTitlebar.ts@@ -1,2 +1,2 @@export const COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS =- "[[data-sidebar-state=collapsed]_&]:pl-[var(--workspace-titlebar-content-left)] [[data-sidebar-state=collapsed]:has([data-side=left][data-collapsible=icon])_&]:pl-[max(calc(env(safe-area-inset-left)+1.25rem),calc(var(--workspace-titlebar-content-left)-var(--sidebar-width-icon)))]";+ "[[data-sidebar-state=collapsed]_&]:pl-[var(--workspace-titlebar-content-left)]";diff --git a/packages/contracts/src/settings.test.ts b/packages/contracts/src/settings.test.tsindex c8c6922ec02..b090b47fba5 100644--- a/packages/contracts/src/settings.test.ts+++ b/packages/contracts/src/settings.test.ts@@ -482,18 +482,7 @@ describe("ClientSettings environment identification", () => {describe("ClientSettings sidebar", () => {it("defaults to the current sidebar", () => {- const settings = decodeClientSettings({});- expect(settings.legacySidebarEnabled).toBe(false);- expect(settings.sidebarCompactThreadRows).toBe(false);- });-- it("preserves an explicit compact thread row preference", () => {- expect(decodeClientSettings({ sidebarCompactThreadRows: true }).sidebarCompactThreadRows).toBe(- true,- );- expect(- decodeClientSettingsPatch({ sidebarCompactThreadRows: true }).sidebarCompactThreadRows,- ).toBe(true);+ expect(decodeClientSettings({}).legacySidebarEnabled).toBe(false);});it("drops the retired sidebar v2 beta keys, resetting everyone to the default", () => {@@ -506,6 +495,14 @@ describe("ClientSettings sidebar", () => {expect(decoded).not.toHaveProperty("sidebarV2ConfiguredByUser");});+ it("drops the retired compact sidebar keys for users who opted in", () => {+ const stored = { compactSidebarEnabled: true, sidebarCompactThreadRows: true };+ const decoded = decodeClientSettings(stored);+ expect(decoded).not.toHaveProperty("compactSidebarEnabled");+ expect(decoded).not.toHaveProperty("sidebarCompactThreadRows");+ expect(decodeClientSettingsPatch(stored)).toEqual({});+ });+it("preserves an explicit legacy sidebar opt-in", () => {expect(decodeClientSettings({ legacySidebarEnabled: true }).legacySidebarEnabled).toBe(true);expect(decodeClientSettingsPatch({ legacySidebarEnabled: true }).legacySidebarEnabled).toBe(diff --git a/packages/contracts/src/settings.ts b/packages/contracts/src/settings.tsindex 1262a303ba4..7b3715d704b 100644--- a/packages/contracts/src/settings.ts+++ b/packages/contracts/src/settings.ts@@ -437,7 +437,6 @@ export const ClientSettingsSchema = Schema.Struct({// old keys, so everyone, including prior beta opt-outs, resets to the new// default sidebar.legacySidebarEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),- compactSidebarEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),sidebarProjectGroupingMode: SidebarProjectGroupingMode.pipe(Schema.withDecodingDefault(Effect.succeed(DEFAULT_SIDEBAR_PROJECT_GROUPING_MODE)),),@@ -451,7 +450,6 @@ export const ClientSettingsSchema = Schema.Struct({sidebarThreadSortOrder: SidebarThreadSortOrder.pipe(Schema.withDecodingDefault(Effect.succeed(DEFAULT_SIDEBAR_THREAD_SORT_ORDER)),),- sidebarCompactThreadRows: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),sidebarThreadPreviewCount: SidebarThreadPreviewCount.pipe(Schema.withDecodingDefault(Effect.succeed(DEFAULT_SIDEBAR_THREAD_PREVIEW_COUNT)),),@@ -1504,14 +1502,12 @@ export const ClientSettingsPatch = Schema.Struct({proactivePanelsEnabled: Schema.optionalKey(Schema.Boolean),showSkillsInSlashMenu: Schema.optionalKey(Schema.Boolean),legacySidebarEnabled: Schema.optionalKey(Schema.Boolean),- compactSidebarEnabled: Schema.optionalKey(Schema.Boolean),sidebarProjectGroupingMode: Schema.optionalKey(SidebarProjectGroupingMode),sidebarProjectGroupingOverrides: Schema.optionalKey(Schema.Record(TrimmedNonEmptyString, SidebarProjectGroupingMode),),sidebarProjectSortOrder: Schema.optionalKey(SidebarProjectSortOrder),sidebarThreadSortOrder: Schema.optionalKey(SidebarThreadSortOrder),- sidebarCompactThreadRows: Schema.optionalKey(Schema.Boolean),sidebarThreadPreviewCount: Schema.optionalKey(SidebarThreadPreviewCount),timestampFormat: Schema.optionalKey(TimestampFormat),snapShotEnabled: Schema.optionalKey(Schema.Boolean),