Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/app/admin/reviews/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ export default function ReviewsPage() {
)
}
await fetchReviews(skip, { silent: true })
// The silent refetch intentionally skips the selection reset, so clear the
// now-stale selection here — decided rows have left the pending list.
setSelectedIds(new Set())
refreshPendingCount()
}

Expand Down
6 changes: 6 additions & 0 deletions src/components/admin/review-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,13 @@ export function ReviewRow({
: undefined
const res = await approveReview(review.ref_id, override)
if (res.error_message || res.status === "failed") {
// Keep the row and its error visible instead of silently refetching it
// out of the pending list (it is now 'failed', not pending) — otherwise
// a failed merge just vanishes and looks like it succeeded. Still refresh
// the pending badge so the count reflects that it left the queue.
setInlineError(res.error_message ?? "Approval failed")
onCountRefresh?.()
return
}
onRefresh()
onCountRefresh?.()
Expand Down
Loading