feat: add review status icon and merge status indicator to PR list rows
Add per-PR review state aggregation by fetching reviews concurrently via the existing semaphore pattern. Display review status (approved, changes requested, awaiting) and merge status (ready/conflicts) as compact badges in each PR card row. - Add ReviewState field to PullRequest struct - Add GetPullReviewState() and EnrichPullsWithReviewState() to client - Call enrichment in ListPulls handler after fetching PRs - Update pulls template with review and merge badges - Add CSS for .review-badge and .merge-badge classes Closes leeworks-agents/gitea-mobile#97 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -412,6 +412,10 @@ func (h *Handler) ListPulls(w http.ResponseWriter, r *http.Request) {
|
||||
if result.HasMore {
|
||||
data.NextPage = page + 1
|
||||
}
|
||||
// Enrich PRs with review state for status icons.
|
||||
if len(data.Pulls) > 0 {
|
||||
h.Client.EnrichPullsWithReviewState(r.Context(), token, data.Pulls)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user