Skip to content

Show PR details in closed tasks list#449

Merged
bborn merged 1 commit intomainfrom
task/1283-show-pr-details-in-closed-tasks-list
Feb 12, 2026
Merged

Show PR details in closed tasks list#449
bborn merged 1 commit intomainfrom
task/1283-show-pr-details-in-closed-tasks-list

Conversation

@bborn
Copy link
Owner

@bborn bborn commented Feb 12, 2026

Summary

Fixes #1283 - Ensures closed tasks consistently show PR details in the kanban view, just like the task detail view.

Problem

Previously, closed tasks with older closed PRs might not show PR details because:

  • The batch PR 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
  • This created an inconsistent experience where some closed tasks showed PR details and others didn't

Solution

Added a fallback mechanism in refreshAllPRs() that:

  1. First attempts to get PR info from the batch fetch (efficient for recent PRs)
  2. Falls back to individual branch fetching for any task not found in the batch
  3. This ensures all visible closed tasks display their PR status badges and diff stats

Changes

  • Modified internal/ui/app.go:refreshAllPRs() to add fallback to GetPRForBranch() for tasks not found in batch results

Test Plan

  • All existing tests pass (go test ./internal/ui/... ./internal/github/...)
  • Build succeeds without errors
  • Closed tasks with PRs now consistently show PR details in kanban view

🤖 Generated with Claude Code

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 <noreply@anthropic.com>
@bborn bborn merged commit 4ba8c17 into main Feb 12, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant