Skip to content

The open-source app everyone uses to manage agents at work

feat: make comment identity headers clickable links to agent pages

Forgotten57f88f6f6aa2
diff --git a/ui/src/components/CommentThread.tsx b/ui/src/components/CommentThread.tsx
index 4c5f390088..fe463b7d2d 100644
--- a/ui/src/components/CommentThread.tsx
+++ b/ui/src/components/CommentThread.tsx
@@ -70,14 +70,16 @@ export function CommentThread({ comments, onAdd, issueStatus, agentMap }: Commen
{sorted.map((comment) => (
<div key={comment.id} className="border border-border p-3">
<div className="flex items-center justify-between mb-1">
- <Identity
- name={
- comment.authorAgentId
- ? agentMap?.get(comment.authorAgentId)?.name ?? comment.authorAgentId.slice(0, 8)
- : "You"
- }
- size="sm"
- />
+ {comment.authorAgentId ? (
+ <Link to={`/agents/${comment.authorAgentId}`} className="hover:underline">
+ <Identity
+ name={agentMap?.get(comment.authorAgentId)?.name ?? comment.authorAgentId.slice(0, 8)}
+ size="sm"
+ />
+ </Link>
+ ) : (
+ <Identity name="You" size="sm" />
+ )}
<span className="text-xs text-muted-foreground">
{formatDateTime(comment.createdAt)}
</span>
diff --git a/ui/src/pages/ApprovalDetail.tsx b/ui/src/pages/ApprovalDetail.tsx
index c6149429da..b9304add92 100644
--- a/ui/src/pages/ApprovalDetail.tsx
+++ b/ui/src/pages/ApprovalDetail.tsx
@@ -315,14 +315,16 @@ export function ApprovalDetail() {
{(comments ?? []).map((comment: ApprovalComment) => (
<div key={comment.id} className="border border-border/60 rounded-md p-3">
<div className="flex items-center justify-between mb-1">
- <Identity
- name={
- comment.authorAgentId
- ? agentNameById.get(comment.authorAgentId) ?? comment.authorAgentId.slice(0, 8)
- : "Board"
- }
- size="sm"
- />
+ {comment.authorAgentId ? (
+ <Link to={`/agents/${comment.authorAgentId}`} className="hover:underline">
+ <Identity
+ name={agentNameById.get(comment.authorAgentId) ?? comment.authorAgentId.slice(0, 8)}
+ size="sm"
+ />
+ </Link>
+ ) : (
+ <Identity name="Board" size="sm" />
+ )}
<span className="text-xs text-muted-foreground">
{new Date(comment.createdAt).toLocaleString()}
</span>