Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-7031 feat(issues): show requester beneath agent creator (#10532)

Bohan Jiange6c3ef3d8025
diff --git a/packages/views/common/prop-row.tsx b/packages/views/common/prop-row.tsx
index 5e2c94c63e..e1cf232291 100644
--- a/packages/views/common/prop-row.tsx
+++ b/packages/views/common/prop-row.tsx
@@ -1,4 +1,5 @@
import type { ReactNode } from "react";
+import { cn } from "@multica/ui/lib/utils";
/**
* Two-column property row used in detail-page sidebars: a muted label on the
@@ -32,16 +33,20 @@ export function PropRow({
label,
children,
interactive = true,
+ className,
}: {
label: ReactNode;
children: ReactNode;
interactive?: boolean;
+ className?: string;
}) {
return (
<div
- className={`-mx-2 col-span-2 grid min-h-8 grid-cols-subgrid items-center rounded-md px-2 ${
- interactive ? "transition-colors hover:bg-accent/50" : ""
- }`}
+ className={cn(
+ "-mx-2 col-span-2 grid min-h-8 grid-cols-subgrid items-center rounded-md px-2",
+ interactive && "transition-colors hover:bg-accent/50",
+ className,
+ )}
>
<span className="flex min-w-0 items-center gap-1.5 text-label text-muted-foreground">
{label}
diff --git a/packages/views/issues/components/issue-detail.test.tsx b/packages/views/issues/components/issue-detail.test.tsx
index 84a16ae8db..36bf2b71f8 100644
--- a/packages/views/issues/components/issue-detail.test.tsx
+++ b/packages/views/issues/components/issue-detail.test.tsx
@@ -2324,6 +2324,75 @@ describe("IssueDetail (shared)", () => {
expect(screen.queryByRole("button", { name: "Retry run" })).not.toBeInTheDocument();
});
+ describe("an issue an agent created for a member (#7995)", () => {
+ const created = (actorType: "agent" | "member", actorId: string): TimelineEntry => ({
+ type: "activity",
+ id: "act-created",
+ actor_type: actorType,
+ actor_id: actorId,
+ action: "created",
+ details: {},
+ created_at: "2026-01-15T00:00:00Z",
+ });
+
+ it("names the requester in the created entry and under the creator", async () => {
+ mockApiObj.getIssue.mockResolvedValue({
+ ...mockIssue,
+ creator_type: "agent",
+ creator_id: "agent-1",
+ requester_id: "user-1",
+ });
+ mockApiObj.listTimeline.mockResolvedValue([created("agent", "agent-1")]);
+
+ renderIssueDetail();
+
+ expect(await screen.findByText("created this issue on behalf of Test User")).toBeInTheDocument();
+ fireEvent.click(screen.getByText("Details"));
+ const creatorRow = screen.getByText("Created by").parentElement!;
+ expect(creatorRow).toHaveTextContent("Claude Agent");
+ expect(within(creatorRow).getByRole("link", { name: "On behalf of Test User" }))
+ .toHaveAttribute("href", "/test/members/user-1");
+ expect(screen.queryByText("Requested by")).not.toBeInTheDocument();
+ });
+
+ it.each([
+ { creatorType: "agent", creatorId: "agent-1", requesterId: null },
+ { creatorType: "agent", creatorId: "agent-1", requesterId: undefined },
+ { creatorType: "member", creatorId: "user-1", requesterId: "user-1" },
+ ] as const)("keeps plain creation for $creatorType with requester $requesterId", async ({ creatorType, creatorId, requesterId }) => {
+ mockApiObj.getIssue.mockResolvedValue({
+ ...mockIssue,
+ creator_type: creatorType,
+ creator_id: creatorId,
+ requester_id: requesterId,
+ });
+ mockApiObj.listTimeline.mockResolvedValue([created(creatorType, creatorId)]);
+
+ renderIssueDetail();
+
+ expect(await screen.findByText("created this issue")).toBeInTheDocument();
+ fireEvent.click(screen.getByText("Details"));
+ expect(screen.queryByText(/On behalf of/)).not.toBeInTheDocument();
+ expect(screen.queryByText("Requested by")).not.toBeInTheDocument();
+ });
+
+ it("uses the existing member-name fallback when the requester is unavailable", async () => {
+ mockApiObj.getIssue.mockResolvedValue({
+ ...mockIssue,
+ creator_type: "agent",
+ creator_id: "agent-1",
+ requester_id: "former-member",
+ });
+ mockApiObj.listTimeline.mockResolvedValue([created("agent", "agent-1")]);
+
+ renderIssueDetail();
+
+ expect(await screen.findByText("created this issue on behalf of Unknown")).toBeInTheDocument();
+ fireEvent.click(screen.getByText("Details"));
+ expect(screen.getByText("Created by").parentElement).toHaveTextContent("On behalf of Unknown");
+ });
+ });
+
it("collapses non-trailing activity blocks and expands the last one by default", async () => {
// Timeline shape:
// [activities: status_changed, priority_changed] ← block A (older)
diff --git a/packages/views/issues/components/issue-detail.tsx b/packages/views/issues/components/issue-detail.tsx
index 945f9daf20..110afda93b 100644
--- a/packages/views/issues/components/issue-detail.tsx
+++ b/packages/views/issues/components/issue-detail.tsx
@@ -73,6 +73,8 @@ import { Checkbox } from "@multica/ui/components/ui/checkbox";
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from "@multica/ui/components/ui/command";
import { AvatarGroup, AvatarGroupCount } from "@multica/ui/components/ui/avatar";
import { ActorAvatar } from "../../common/actor-avatar";
+import { MemberProfileCard } from "../../members/member-profile-card";
+import { HoverCard, HoverCardTrigger, HoverCardContent } from "@multica/ui/components/ui/hover-card";
import { ActionShortcutKeycaps } from "../../common/shortcut-keycaps";
import { PropRow } from "../../common/prop-row";
import { TimelineHandoff } from "../../workflows/timeline-handoff";
@@ -365,10 +367,14 @@ function formatActivity(
locale: string,
resolveActorName?: (type: string, id: string) => string,
resolveStatusLabel?: (statusKey: string) => string,
+ requesterName?: string,
): string {
const details = (entry.details ?? {}) as Record<string, string>;
switch (entry.action) {
case "created":
+ if (requesterName && entry.actor_type === "agent") {
+ return t(($) => $.activity.created_on_behalf_of, { name: requesterName });
+ }
return t(($) => $.activity.created);
case "status_changed":
// PR auto-complete (MUL-7429) says why the status moved.
@@ -735,6 +741,7 @@ function ActivityBlock({
t,
timeAgo,
locale,
+ requesterName,
}: {
entries: TimelineEntry[];
expanded: boolean;
@@ -754,6 +761,7 @@ function ActivityBlock({
t: ActivityT;
timeAgo: (dateStr: string) => string;
locale: string;
+ requesterName?: string;
}) {
const wakeupText = useWakeupText();
if (!expanded) {
@@ -869,7 +877,7 @@ function ActivityBlock({
entry={entry}
text={isWakeup
? formatWakeupActivity(entry, t, wakeupText, getActorName)
- : formatActivity(entry, t, locale, getActorName, resolveStatusLabel)}
+ : formatActivity(entry, t, locale, getActorName, resolveStatusLabel, requesterName)}
/>
</span>
{chip && (
@@ -2983,6 +2991,11 @@ export function IssueDetail({ issueId, onDelete, onDone, defaultSidebarOpen = tr
return <IssueNotFound showBackLink={!onDelete} leading={leadingAction} trailing={trailingActions} />;
}
+ const requesterName =
+ issue.creator_type === "agent" && issue.requester_id
+ ? getActorName("member", issue.requester_id)
+ : undefined;
+
const persistDescriptionSave = (
draft: { markdown: string; baseMarkdown: string; attachmentIds: string[] },
) => {
@@ -3312,9 +3325,31 @@ export function IssueDetail({ issueId, onDelete, onDone, defaultSidebarOpen = tr
<div>
<IssueSidebarSectionHeader title={t(($) => $.detail.section_details)} open={detailsOpen} onOpenChange={setDetailsOpen} />
{detailsOpen && <IssueSidebarPropertyGrid>
- <PropRow interactive={false} label={t(($) => $.detail.prop_created_by)}>
- <ActorAvatar actorType={issue.creator_type} actorId={issue.creator_id} size="sm" enableHoverCard />
- <span className="cursor-pointer truncate">{getActorName(issue.creator_type, issue.creator_id)}</span>
+ <PropRow
+ interactive={false}
+ label={t(($) => $.detail.prop_created_by)}
+ className={requesterName ? "items-start py-1.5" : undefined}
+ >
+ <div className="flex min-w-0 flex-1 items-start gap-1.5">
+ <ActorAvatar actorType={issue.creator_type} actorId={issue.creator_id} size="sm" enableHoverCard />
+ <div className="flex min-w-0 flex-1 flex-col">
+ <span className="cursor-pointer truncate">{getActorName(issue.creator_type, issue.creator_id)}</span>
+ {requesterName && issue.requester_id && (
+ <HoverCard>
+ <HoverCardTrigger
+ render={<AppLink href={paths.memberDetail(issue.requester_id)} />}
+ className="block truncate text-caption text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
+ title={t(($) => $.execution_log.attribution.on_behalf_of, { name: requesterName })}
+ >
+ {t(($) => $.execution_log.attribution.on_behalf_of, { name: requesterName })}
+ </HoverCardTrigger>
+ <HoverCardContent align="start" className="w-72">
+ <MemberProfileCard userId={issue.requester_id} />
+ </HoverCardContent>
+ </HoverCard>
+ )}
+ </div>
+ </div>
</PropRow>
<PropRow interactive={false} label={t(($) => $.detail.prop_created)}>
<span className="text-muted-foreground">{shortDate(issue.created_at, locale)}</span>
@@ -3430,6 +3465,7 @@ export function IssueDetail({ issueId, onDelete, onDone, defaultSidebarOpen = tr
t={t}
timeAgo={timeAgo}
locale={locale}
+ requesterName={requesterName}
/>
);
};
diff --git a/packages/views/locales/en/issues.json b/packages/views/locales/en/issues.json
index 1e929212d8..042233ea52 100644
--- a/packages/views/locales/en/issues.json
+++ b/packages/views/locales/en/issues.json
@@ -611,6 +611,7 @@
},
"activity": {
"created": "created this issue",
+ "created_on_behalf_of": "created this issue on behalf of {{name}}",
"self_assigned": "self-assigned this issue",
"assigned_to": "assigned to {{name}}",
"removed_assignee": "removed assignee",
diff --git a/packages/views/locales/es/issues.json b/packages/views/locales/es/issues.json
index 362dae6309..d841dcc1c1 100644
--- a/packages/views/locales/es/issues.json
+++ b/packages/views/locales/es/issues.json
@@ -594,6 +594,7 @@
},
"activity": {
"created": "creó esta tarea",
+ "created_on_behalf_of": "creó esta tarea en nombre de {{name}}",
"self_assigned": "se autoasignó esta tarea",
"assigned_to": "la asignó a {{name}}",
"removed_assignee": "eliminó al asignado",
diff --git a/packages/views/locales/fr/issues.json b/packages/views/locales/fr/issues.json
index 0cebeff3ba..687838998f 100644
--- a/packages/views/locales/fr/issues.json
+++ b/packages/views/locales/fr/issues.json
@@ -611,6 +611,7 @@
},
"activity": {
"created": "a créé cette tâche",
+ "created_on_behalf_of": "a créé cette tâche au nom de {{name}}",
"self_assigned": "s'est assigné cette tâche",
"assigned_to": "a assigné à {{name}}",
"removed_assignee": "a retiré l'assignation",
diff --git a/packages/views/locales/ja/issues.json b/packages/views/locales/ja/issues.json
index 1ad5104c35..7efe436ee7 100644
--- a/packages/views/locales/ja/issues.json
+++ b/packages/views/locales/ja/issues.json
@@ -601,6 +601,7 @@
},
"activity": {
"created": "このタスクを作成しました",
+ "created_on_behalf_of": "{{name}} の代理としてこのタスクを作成しました",
"self_assigned": "このタスクを自分に割り当てました",
"assigned_to": "{{name}} に割り当てました",
"removed_assignee": "担当者を削除しました",
diff --git a/packages/views/locales/ko/issues.json b/packages/views/locales/ko/issues.json
index 0568bdb9c3..d0cc615014 100644
--- a/packages/views/locales/ko/issues.json
+++ b/packages/views/locales/ko/issues.json
@@ -601,6 +601,7 @@
},
"activity": {
"created": "이 태스크를 만들었습니다",
+ "created_on_behalf_of": "{{name}} 님을 대신하여 이 태스크를 만들었습니다",
"self_assigned": "이 태스크를 본인에게 할당했습니다",
"assigned_to": "{{name}}님에게 할당했습니다",
"removed_assignee": "담당자를 제거했습니다",
diff --git a/packages/views/locales/ru/issues.json b/packages/views/locales/ru/issues.json
index 35c63fcef0..24704dd3fc 100644
--- a/packages/views/locales/ru/issues.json
+++ b/packages/views/locales/ru/issues.json
@@ -630,6 +630,7 @@
},
"activity": {
"created": "создал(а) эту задачу",
+ "created_on_behalf_of": "создал(а) эту задачу от имени {{name}}",
"self_assigned": "назначил(а) эту задачу на себя",
"assigned_to": "назначил(а) на {{name}}",
"removed_assignee": "убрал(а) исполнителя",
diff --git a/packages/views/locales/zh-Hans/issues.json b/packages/views/locales/zh-Hans/issues.json
index 14a783d5a2..7ffd773261 100644
--- a/packages/views/locales/zh-Hans/issues.json
+++ b/packages/views/locales/zh-Hans/issues.json
@@ -601,6 +601,7 @@
},
"activity": {
"created": "创建了这个任务",
+ "created_on_behalf_of": "代表 {{name}} 创建了这个任务",
"self_assigned": "把这个任务分配给了自己",
"assigned_to": "分配给 {{name}}",
"removed_assignee": "移除了负责人",
diff --git a/packages/views/locales/zh-Hant/issues.json b/packages/views/locales/zh-Hant/issues.json
index cbe5d09b11..321462abaf 100644
--- a/packages/views/locales/zh-Hant/issues.json
+++ b/packages/views/locales/zh-Hant/issues.json
@@ -601,6 +601,7 @@
},
"activity": {
"created": "建立了這個任務",
+ "created_on_behalf_of": "代表 {{name}} 建立了這個任務",
"self_assigned": "把這個任務分配給了自己",
"assigned_to": "分配給 {{name}}",
"removed_assignee": "移除了負責人",