diff --git a/packages/ui/src/features/sidebar/components/TaskListView.tsx b/packages/ui/src/features/sidebar/components/TaskListView.tsx index 6124cf8115..f21d0b11fc 100644 --- a/packages/ui/src/features/sidebar/components/TaskListView.tsx +++ b/packages/ui/src/features/sidebar/components/TaskListView.tsx @@ -12,7 +12,6 @@ import type { TaskGroup, } from "@posthog/core/sidebar/sidebarData.types"; import { MenuLabel } from "@posthog/quill"; -import { getFileName } from "@posthog/shared"; import { builderHog } from "@posthog/ui/assets/hedgehogs"; import { useFolders } from "@posthog/ui/features/folders/useFolders"; import { useSettingsStore } from "@posthog/ui/features/settings/settingsStore"; @@ -92,32 +91,10 @@ function TaskRow({ depth?: number; }) { const workspace = useWorkspace(task.id); - const { folders } = useFolders(); const effectiveMode = workspace?.mode ?? (task.taskRunEnvironment === "cloud" ? "cloud" : undefined); - // Chip identifying the checkout the task runs in: app-managed worktrees - // (worktree mode) and local tasks whose registered folder is itself a - // linked worktree of the group's main clone. - const worktreeCheckout = useMemo(() => { - if (workspace?.worktreePath) { - return { - name: workspace.worktreeName ?? getFileName(workspace.worktreePath), - path: workspace.worktreePath, - }; - } - if (workspace?.mode === "local" && workspace.folderPath) { - const folder = folders.find((f) => f.path === workspace.folderPath); - if (folder?.mainRepoPath) { - return { - name: getFileName(workspace.folderPath), - path: workspace.folderPath, - }; - } - } - return null; - }, [workspace, folders]); const { prState, hasDiff } = useTaskPrStatus(task); const isArchiving = useArchivingTasksStore((s) => s.archivingTaskIds.has(task.id), @@ -134,8 +111,6 @@ function TaskRow({ hideHoverActions={hideHoverActions} isEditing={isEditing} workspaceMode={effectiveMode} - worktreeName={worktreeCheckout?.name} - worktreePath={worktreeCheckout?.path} isSuspended={task.isSuspended} isGenerating={task.isGenerating} isUnread={task.isUnread} diff --git a/packages/ui/src/features/sidebar/components/items/TaskItem.tsx b/packages/ui/src/features/sidebar/components/items/TaskItem.tsx index 1d71be612a..3d68b86474 100644 --- a/packages/ui/src/features/sidebar/components/items/TaskItem.tsx +++ b/packages/ui/src/features/sidebar/components/items/TaskItem.tsx @@ -1,9 +1,4 @@ -import { - Archive, - GitFork, - GitPullRequest, - PushPin, -} from "@phosphor-icons/react"; +import { Archive, GitPullRequest, PushPin } from "@phosphor-icons/react"; import { parseGithubUrl } from "@posthog/git/utils"; import type { WorkspaceMode } from "@posthog/shared"; import { formatRelativeTimeShort } from "@posthog/shared"; @@ -34,17 +29,6 @@ function PrBadge({ url, number }: { url: string; number: number }) { ); } -function WorktreeChip({ name, path }: { name: string; path?: string }) { - return ( - - - - {name} - - - ); -} - interface TaskItemProps { depth?: number; taskId: string; @@ -55,10 +39,6 @@ interface TaskItemProps { isArchiving?: boolean; hideHoverActions?: boolean; workspaceMode?: WorkspaceMode; - /** Checkout name shown as a chip when the task runs in a git worktree. */ - worktreeName?: string; - /** Full path of that checkout, surfaced in the chip's tooltip. */ - worktreePath?: string; isGenerating?: boolean; isUnread?: boolean; isPinned?: boolean; @@ -131,8 +111,6 @@ export function TaskItem({ isArchiving = false, hideHoverActions = false, workspaceMode, - worktreeName, - worktreePath, isSuspended = false, isGenerating, isUnread, @@ -195,14 +173,9 @@ export function TaskItem({ /> ) : null; - const worktreeChip = worktreeName ? ( - - ) : null; - const endContent = - worktreeChip || prBadge || timestampNode || toolbar ? ( + prBadge || timestampNode || toolbar ? ( <> - {worktreeChip} {prBadge} {timestampNode} {toolbar}