The open-source app everyone uses to manage agents at work
TypeScript acpxagent-orchestrationagent-skillsagentic-aiai-agentsai-engineeringai-governanceai-toolsautonomous-agentsclaudeclaude-codeclaude-skillscodexhermesllmmcpmulti-agentopenclawproject-managementworkflow-automation
feat(ui): unify comment assignee selector with icons and fix click flash
Dottad4eb50238935
diff --git a/ui/src/components/CommentThread.tsx b/ui/src/components/CommentThread.tsxindex b96c1af077..f529382b30 100644--- a/ui/src/components/CommentThread.tsx+++ b/ui/src/components/CommentThread.tsx@@ -8,6 +8,7 @@ import { InlineEntitySelector, type InlineEntityOption } from "./InlineEntitySelimport { MarkdownBody } from "./MarkdownBody";import { MarkdownEditor, type MarkdownEditorRef, type MentionOption } from "./MarkdownEditor";import { StatusBadge } from "./StatusBadge";+import { AgentIcon } from "./AgentIconPicker";import { formatDateTime } from "../lib/utils";interface CommentWithRunMeta extends IssueComment {@@ -385,6 +386,32 @@ export function CommentThread({emptyMessage="No assignees found."onChange={setReassignTarget}className="text-xs h-8"+ renderTriggerValue={(option) => {+ if (!option) return <span className="text-muted-foreground">Assignee</span>;+ const agentId = option.id.startsWith("agent:") ? option.id.slice("agent:".length) : null;+ const agent = agentId ? agentMap?.get(agentId) : null;+ return (+ <>+ {agent ? (+ <AgentIcon icon={agent.icon} className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />+ ) : null}+ <span className="truncate">{option.label}</span>+ </>+ );+ }}+ renderOption={(option) => {+ if (!option.id) return <span className="truncate">{option.label}</span>;+ const agentId = option.id.startsWith("agent:") ? option.id.slice("agent:".length) : null;+ const agent = agentId ? agentMap?.get(agentId) : null;+ return (+ <>+ {agent ? (+ <AgentIcon icon={agent.icon} className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />+ ) : null}+ <span className="truncate">{option.label}</span>+ </>+ );+ }}/>)}<Button size="sm" disabled={!canSubmit} onClick={handleSubmit}>diff --git a/ui/src/components/InlineEntitySelector.tsx b/ui/src/components/InlineEntitySelector.tsxindex 0c274b56f9..24991f9a18 100644--- a/ui/src/components/InlineEntitySelector.tsx+++ b/ui/src/components/InlineEntitySelector.tsx@@ -45,6 +45,7 @@ export const InlineEntitySelector = forwardRef<HTMLButtonElement, InlineEntitySeconst [highlightedIndex, setHighlightedIndex] = useState(0);const inputRef = useRef<HTMLInputElement>(null);const shouldPreventCloseAutoFocusRef = useRef(false);+ const isPointerDownRef = useRef(false);const allOptions = useMemo<InlineEntityOption[]>(() => [{ id: "", label: noneLabel, searchText: noneLabel }, ...options],@@ -97,7 +98,11 @@ export const InlineEntitySelector = forwardRef<HTMLButtonElement, InlineEntitySe"inline-flex min-w-0 items-center gap-1 rounded-md border border-border bg-muted/40 px-2 py-1 text-sm font-medium text-foreground transition-colors hover:bg-accent/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",className,)}- onFocus={() => setOpen(true)}+ onPointerDown={() => { isPointerDownRef.current = true; }}+ onFocus={() => {+ if (!isPointerDownRef.current) setOpen(true);+ isPointerDownRef.current = false;+ }}>{renderTriggerValue? renderTriggerValue(currentOption)