From 20b00e6ca4de01c82371a1d1f7b22ba88c24af32 Mon Sep 17 00:00:00 2001 From: Bruno Bornsztein Date: Thu, 12 Feb 2026 06:51:18 -0600 Subject: [PATCH] Fix PR details display for closed tasks Previously, closed tasks with older closed PRs might not show PR details because the batch fetch only retrieves the most recent 10 closed PRs. If a done task's PR was not in those most recent 10, it would show nil for PR info even though a PR exists. This change adds a fallback to individual branch fetching for any task whose branch wasn't found in the batch fetch. This ensures all visible closed tasks show their PR details when available, just like the detail view. Changes: - Modified refreshAllPRs() to fall back to GetPRForBranch() for tasks not found in the batch fetch results - Ensures closed/done tasks consistently display PR status badges and diff stats in the kanban view Fixes #1283 Co-Authored-By: Claude Sonnet 4.5 --- internal/ui/app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/ui/app.go b/internal/ui/app.go index 002e78b..db8da48 100644 --- a/internal/ui/app.go +++ b/internal/ui/app.go @@ -4251,6 +4251,11 @@ func (m *AppModel) refreshAllPRs() tea.Cmd { // Create messages for tasks in this repo for _, task := range tasks { info := prsByBranch[task.BranchName] + // If batch fetch didn't include this branch (common for closed tasks + // with older closed PRs), fall back to individual fetch + if info == nil && task.BranchName != "" { + info = prCache.GetPRForBranch(repoDir, task.BranchName) + } results = append(results, prInfoMsg{taskID: task.ID, info: info}) } }