Skip to content

Commit 133e414

Browse files
TonybynMp4claude
andcommitted
fix(web): reviewer menu shows search failures and refreshes search results after a change
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 9b24857 commit 133e414

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎apps/web/src/components/pullRequest/PullRequestReviewerPicker.tsx‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ export function PullRequestReviewerPicker({
8080
});
8181
return;
8282
}
83+
// The command reads the loaded list again only for somebody it lacked, and a search result
84+
// is keyed by what was typed, so the one on screen is read here or it keeps the old request.
85+
if (searchesHost) searchResult.refresh();
8386
toastManager.add({
8487
type: "success",
8588
title: candidate.isRequested
@@ -107,7 +110,13 @@ export function PullRequestReviewerPicker({
107110
query.trim().length > 0 &&
108111
(searchQuery !== query.trim() || searchResult.isPending))
109112
}
110-
error={candidatesQuery.data === null ? candidatesQuery.error : null}
113+
error={
114+
candidatesQuery.data === null
115+
? candidatesQuery.error
116+
: searchesHost && candidates.length === 0
117+
? searchResult.error
118+
: null
119+
}
111120
candidates={candidates}
112121
emptyLabel="Nobody else has access to this repository."
113122
noMatchLabel="Nobody with access matches that."

0 commit comments

Comments
 (0)