diff --git a/apps/code/src/renderer/features/inbox/components/detail/ReportDetailPane.tsx b/apps/code/src/renderer/features/inbox/components/detail/ReportDetailPane.tsx index bdc2be529b..94e4c8c1fd 100644 --- a/apps/code/src/renderer/features/inbox/components/detail/ReportDetailPane.tsx +++ b/apps/code/src/renderer/features/inbox/components/detail/ReportDetailPane.tsx @@ -17,6 +17,7 @@ import { CaretRightIcon, ChatCircleIcon, EyeIcon, + InfoIcon, LinkSimpleIcon, Plus, ThumbsDownIcon, @@ -211,8 +212,12 @@ export function ReportDetailPane({ const reviewerArtefact = allArtefacts.find( (a): a is SuggestedReviewersArtefact => a.type === "suggested_reviewers", ); - return reviewerArtefact?.content ?? []; - }, [allArtefacts]); + const reviewers = reviewerArtefact?.content ?? []; + if (!me?.uuid) return reviewers; + const meIndex = reviewers.findIndex((r) => r.user?.uuid === me.uuid); + if (meIndex <= 0) return reviewers; + return [reviewers[meIndex], ...reviewers.filter((_, i) => i !== meIndex)]; + }, [allArtefacts, me?.uuid]); const signalFindings = useMemo(() => { const map = new Map(); @@ -818,15 +823,38 @@ export function ReportDetailPane({ {reviewer.relevant_commits.map((commit, i) => ( {i > 0 && ", "} - - - {commit.sha.slice(0, 7)} - + + + Why was I assigned? + + + {commit.reason} + + + ) : ( + commit.reason || undefined + ) + } + > + + + {commit.sha.slice(0, 7)} + + {isMe && commit.reason && ( + + )} + ))}