From 931b20edbbef15184029675b71b685c212315c33 Mon Sep 17 00:00:00 2001 From: Alan Daniel Date: Fri, 10 Apr 2026 23:41:10 -0400 Subject: [PATCH] Fix merged PRs showing red closed icon in search-based views The GitHub Search API returns merged_at inside pull_request sub-object, not at the top level. Extract it before passing to mapPullSummary. --- apps/dashboard/src/lib/github.functions.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/dashboard/src/lib/github.functions.ts b/apps/dashboard/src/lib/github.functions.ts index 947f1f7..7a28dc2 100644 --- a/apps/dashboard/src/lib/github.functions.ts +++ b/apps/dashboard/src/lib/github.functions.ts @@ -537,7 +537,13 @@ function mapPullSearchItems(items: SearchItem[]) { return null; } - return mapPullSummary(item, repository); + return mapPullSummary( + { + ...item, + merged_at: item.pull_request?.merged_at ?? null, + }, + repository, + ); }) .filter((item): item is PullSummary => Boolean(item)); }