Skip to content

Commit

Overview: Recent changes show the avatar of whoever the line names, and every name opens its card

A person's own pull request drew the avatar of the agent they used (an orange C beside "by syntaqx"). The avatar now follows the name: the agent for agent-made work, otherwise the author. The author, the person it was made for and who landed it are links with the hovercard.

syntaqxcommitted Parent1315c25Browse files
1 file+26−80/1 viewed
+26−8
5555 import { distinctFacts } from "../../lib/memory-facts";
5656 import { githubApp } from "../../lib/github.server";
5757 import { Avatar, ButtonLink, CopyLine, SubmitButton, TimeAgo } from "../../components/ui";
58−import { ChangeSize } from "../../components/work";
58+import { ChangeSize, PersonLink } from "../../components/work";
5959 import {
6060 type ActivityItem,
6161 type Need,
11691169 <span className="mt-0.5 flex flex-wrap items-center gap-x-1.5 text-xs text-muted">
11701170 <span className="font-mono text-faint">#{pull.number}</span>
11711171 <span>·</span>
1172+ {/* The avatar is whoever the line names first: the
1173+ agent that made it, or the person who wrote it
1174+ with their own tools. */}
11721175 <span className="inline-flex items-center gap-1">
1173− <Avatar name={pull.agent} size={13} />
1174− {pull.requestedBy
1175− ? `made by ${pull.author.username} for ${pull.requestedBy.username}`
1176− : byAgent
1177− ? `made by ${pull.agent}`
1178− : `by ${pull.author.username}`}
1176+ {pull.requestedBy ? (
1177+ <>
1178+ <Avatar name={pull.author.username} size={13} />
1179+ made by <PersonLink name={pull.author.username} className="hover:text-fg" /> for{" "}
1180+ <PersonLink name={pull.requestedBy.username} className="hover:text-fg" />
1181+ </>
1182+ ) : byAgent ? (
1183+ <>
1184+ <Avatar name={pull.agent} size={13} />
1185+ made by {pull.agent}
1186+ </>
1187+ ) : (
1188+ <>
1189+ <Avatar name={pull.author.username} size={13} />
1190+ by <PersonLink name={pull.author.username} className="hover:text-fg" />
1191+ </>
1192+ )}
11791193 </span>
11801194 {pull.issue != null && (
11811195 <>
11851199 </Link>
11861200 </>
11871201 )}
1188− {pull.mergedBy && <span>· landed by {pull.mergedBy}</span>}
1202+ {pull.mergedBy && (
1203+ <span>
1204+ · landed by <PersonLink name={pull.mergedBy} className="hover:text-fg" />
1205+ </span>
1206+ )}
11891207 <span>
11901208 · <TimeAgo at={pull.mergedAt ?? pull.updatedAt} />
11911209 </span>