From 54ac2c6fe9a9cb3be8d7f3419971b8e7eebdfcfd Mon Sep 17 00:00:00 2001 From: dotta Date: Mon, 6 Apr 2026 08:10:38 -0500 Subject: [PATCH] feat(ui): show workspace branch/folder in issue properties sidebar Adds a new workspace section to the IssueProperties sidebar that displays branch name and folder path (cwd) from the execution workspace. Both values have copy-to-clipboard buttons and truncated display with full path on hover. Co-Authored-By: Paperclip --- ui/src/components/IssueProperties.tsx | 58 ++++++++++++++++++++++++++- 1 file changed, 56 insertions(+), 2 deletions(-) diff --git a/ui/src/components/IssueProperties.tsx b/ui/src/components/IssueProperties.tsx index a0728c07..3dfe0541 100644 --- a/ui/src/components/IssueProperties.tsx +++ b/ui/src/components/IssueProperties.tsx @@ -1,4 +1,4 @@ -import { useMemo, useState } from "react"; +import { useCallback, useMemo, useRef, useState } from "react"; import { pickTextColorForPillBg } from "@/lib/color-contrast"; import { Link } from "@/lib/router"; import type { Issue } from "@paperclipai/shared"; @@ -19,9 +19,39 @@ import { formatDate, cn, projectUrl } from "../lib/utils"; import { timeAgo } from "../lib/timeAgo"; import { Separator } from "@/components/ui/separator"; import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover"; -import { User, Hexagon, ArrowUpRight, Tag, Plus, Trash2 } from "lucide-react"; +import { User, Hexagon, ArrowUpRight, Tag, Plus, Trash2, GitBranch, FolderOpen, Copy, Check } from "lucide-react"; import { AgentIcon } from "./AgentIconPicker"; +function TruncatedCopyable({ value, icon: Icon }: { value: string; icon: React.ComponentType<{ className?: string }> }) { + const [copied, setCopied] = useState(false); + const timerRef = useRef>(undefined); + const handleCopy = useCallback(async () => { + try { + await navigator.clipboard.writeText(value); + setCopied(true); + clearTimeout(timerRef.current); + timerRef.current = setTimeout(() => setCopied(false), 1500); + } catch { /* noop */ } + }, [value]); + + return ( +
+ + + {value} + + +
+ ); +} + function defaultProjectWorkspaceIdForProject(project: { workspaces?: Array<{ id: string; isPrimary: boolean }>; executionWorkspacePolicy?: { defaultProjectWorkspaceId?: string | null } | null; @@ -700,6 +730,30 @@ export function IssueProperties({ issue, onUpdate, inline }: IssuePropertiesProp )} + {issue.currentExecutionWorkspace?.branchName || issue.currentExecutionWorkspace?.cwd ? ( + <> + +
+ {issue.currentExecutionWorkspace?.branchName && ( + + + + )} + {issue.currentExecutionWorkspace?.cwd && ( + + + + )} +
+ + ) : null} +