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.
1 file+26−80/1 viewed
| 55 | 55 | import { distinctFacts } from "../../lib/memory-facts"; | |
| 56 | 56 | import { githubApp } from "../../lib/github.server"; | |
| 57 | 57 | import { Avatar, ButtonLink, CopyLine, SubmitButton, TimeAgo } from "../../components/ui"; | |
| 58 | − | import { ChangeSize } from "../../components/work"; | |
| 58 | + | import { ChangeSize, PersonLink } from "../../components/work"; | |
| 59 | 59 | import { | |
| 60 | 60 | type ActivityItem, | |
| 61 | 61 | type Need, | |
| ⋯ | |||
| 1169 | 1169 | <span className="mt-0.5 flex flex-wrap items-center gap-x-1.5 text-xs text-muted"> | |
| 1170 | 1170 | <span className="font-mono text-faint">#{pull.number}</span> | |
| 1171 | 1171 | <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. */} | |
| 1172 | 1175 | <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 | + | )} | |
| 1179 | 1193 | </span> | |
| 1180 | 1194 | {pull.issue != null && ( | |
| 1181 | 1195 | <> | |
| ⋯ | |||
| 1185 | 1199 | </Link> | |
| 1186 | 1200 | </> | |
| 1187 | 1201 | )} | |
| 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 | + | )} | |
| 1189 | 1207 | <span> | |
| 1190 | 1208 | · <TimeAgo at={pull.mergedAt ?? pull.updatedAt} /> | |
| 1191 | 1209 | </span> | |