diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsx index dc5acaaadc7..8df679d761a 100644 --- a/apps/web/src/components/Sidebar.tsx +++ b/apps/web/src/components/Sidebar.tsx @@ -3,6 +3,7 @@ import { ArrowUpDownIcon, ChevronRightIcon, CloudIcon, + FolderGit2Icon, FolderPlusIcon, SearchIcon, SettingsIcon, @@ -18,6 +19,7 @@ import { ThreadStatusLabel, } from "./ThreadStatusIndicators"; import { ProjectFavicon } from "./ProjectFavicon"; +import { formatWorktreePathForDisplay } from "../worktreeCleanup"; import { autoAnimate } from "@formkit/auto-animate"; import React, { useCallback, useEffect, memo, useMemo, useRef, useState } from "react"; import { useShallow } from "zustand/react/shallow"; @@ -373,6 +375,12 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP ), ); const gitCwd = thread.worktreePath ?? threadProjectCwd ?? props.projectCwd; + const worktreePath = thread.worktreePath?.trim() ? thread.worktreePath : null; + const worktreeTooltip = worktreePath + ? thread.branch + ? `Worktree: ${formatWorktreePathForDisplay(worktreePath)} (${thread.branch})` + : `Worktree: ${formatWorktreePathForDisplay(worktreePath)}` + : null; const gitStatus = useVcsStatus({ environmentId: thread.environmentId, cwd: thread.branch != null ? gitCwd : null, @@ -609,6 +617,23 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP )}
+ {worktreeTooltip && ( + + + } + > + + + {worktreeTooltip} + + )} {terminalStatus && (