From 7a5b0894ba3d3ba4e39bf35156467da829bebe8e Mon Sep 17 00:00:00 2001 From: Forgotten Date: Thu, 26 Feb 2026 16:08:39 -0600 Subject: [PATCH] fix(ui): show "Me" for self-assigned issues, truncated ID for other users When a task is assigned to the current user, the assignee field now shows "Me" instead of "User 1gQsX9Jb". For other board users, shows just the truncated ID (5 chars). The dropdown also says "Assign to me" when the issue creator is the current user. Co-Authored-By: Claude Opus 4.6 --- ui/src/components/IssueProperties.tsx | 39 ++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/ui/src/components/IssueProperties.tsx b/ui/src/components/IssueProperties.tsx index 1074a1be..299de898 100644 --- a/ui/src/components/IssueProperties.tsx +++ b/ui/src/components/IssueProperties.tsx @@ -3,6 +3,7 @@ import { Link } from "react-router-dom"; import type { Issue } from "@paperclip/shared"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { agentsApi } from "../api/agents"; +import { authApi } from "../api/auth"; import { issuesApi } from "../api/issues"; import { projectsApi } from "../api/projects"; import { useCompany } from "../context/CompanyContext"; @@ -107,6 +108,12 @@ export function IssueProperties({ issue, onUpdate, inline }: IssuePropertiesProp const [newLabelName, setNewLabelName] = useState(""); const [newLabelColor, setNewLabelColor] = useState("#6366f1"); + const { data: session } = useQuery({ + queryKey: queryKeys.auth.session, + queryFn: () => authApi.getSession(), + }); + const currentUserId = session?.user?.id ?? session?.session?.userId; + const { data: agents } = useQuery({ queryKey: queryKeys.agents.list(companyId!), queryFn: () => agentsApi.list(companyId!), @@ -166,6 +173,16 @@ export function IssueProperties({ issue, onUpdate, inline }: IssuePropertiesProp const assignee = issue.assigneeAgentId ? agents?.find((a) => a.id === issue.assigneeAgentId) : null; + const userLabel = (userId: string | null | undefined) => + userId + ? userId === "local-board" + ? "Board" + : currentUserId && userId === currentUserId + ? "Me" + : userId.slice(0, 5) + : null; + const assigneeUserLabel = userLabel(issue.assigneeUserId); + const creatorUserLabel = userLabel(issue.createdByUserId); const labelsTrigger = (issue.labels ?? []).length > 0 ? (
@@ -268,6 +285,11 @@ export function IssueProperties({ issue, onUpdate, inline }: IssuePropertiesProp const assigneeTrigger = assignee ? ( + ) : assigneeUserLabel ? ( + <> + + {assigneeUserLabel} + ) : ( <> @@ -279,7 +301,7 @@ export function IssueProperties({ issue, onUpdate, inline }: IssuePropertiesProp <> setAssigneeSearch(e.target.value)} autoFocus={!inline} @@ -294,6 +316,21 @@ export function IssueProperties({ issue, onUpdate, inline }: IssuePropertiesProp > No assignee + {issue.createdByUserId && ( + + )} {(agents ?? []) .filter((a) => a.status !== "terminated") .filter((a) => {