From 2042b1d4a14aabc9c5ce78de130f795850725148 Mon Sep 17 00:00:00 2001 From: Alan Daniel Date: Tue, 14 Apr 2026 20:48:21 -0400 Subject: [PATCH] feat: show activity cards side panel on pulls and issues pages Render RepoActivityCards (Pull Requests, Issues, Discussions) into the SidePanelPortal on the pulls and issues list pages, matching the repo overview layout. Also ensure the "View all" link always appears in activity cards even when there are no open items. --- .../components/repo/repo-activity-cards.tsx | 12 +- .../_protected/$owner/$repo/issues.index.tsx | 111 +++++++++-------- .../routes/_protected/$owner/$repo/pulls.tsx | 115 ++++++++++-------- 3 files changed, 135 insertions(+), 103 deletions(-) diff --git a/apps/dashboard/src/components/repo/repo-activity-cards.tsx b/apps/dashboard/src/components/repo/repo-activity-cards.tsx index 6c79c42..5dabe90 100644 --- a/apps/dashboard/src/components/repo/repo-activity-cards.tsx +++ b/apps/dashboard/src/components/repo/repo-activity-cards.tsx @@ -158,13 +158,15 @@ function ActivityCard({
{!items ? ( - ) : items.length === 0 ? ( -

- No open {title.toLowerCase()} -

) : ( <> - {items.map(renderItem)} + {items.length === 0 ? ( +

+ No open {title.toLowerCase()} +

+ ) : ( + items.map(renderItem) + )} -
-
-

Issues

-

- {totalLabel != null ? ( - {totalLabel} open · - ) : null} - - {owner}/{repo} - -

-
- - - - {query.isLoading ? ( -
- -
- ) : ( -
- {filtered.length === 0 && ( -

- No issues found. -

- )} - {filtered.map((issue) => ( -
+
+
+
+

Issues

+

+ {totalLabel != null ? ( + {totalLabel} open · + ) : null} + - -

- ))} + {owner}/{repo} + +

- )} - + + + {query.isLoading ? ( +
+ +
+ ) : ( +
+ {filtered.length === 0 && ( +

+ No issues found. +

+ )} + {filtered.map((issue) => ( +
+ +
+ ))} +
+ )} + + +
-
+ {repoData && ( + + + + )} + ); } diff --git a/apps/dashboard/src/routes/_protected/$owner/$repo/pulls.tsx b/apps/dashboard/src/routes/_protected/$owner/$repo/pulls.tsx index a842d9b..a030af2 100644 --- a/apps/dashboard/src/routes/_protected/$owner/$repo/pulls.tsx +++ b/apps/dashboard/src/routes/_protected/$owner/$repo/pulls.tsx @@ -13,8 +13,10 @@ import { useRepoListFilters, } from "#/components/filters"; import { DashboardContentLoading } from "#/components/layouts/dashboard-content-loading"; +import { SidePanelPortal } from "#/components/layouts/dashboard-side-panel"; import { Pagination } from "#/components/pagination"; import { PullRequestRow } from "#/components/pulls/pull-request-row"; +import { RepoActivityCards } from "#/components/repo/repo-activity-cards"; import { githubPullsFromRepoQueryOptions, githubRepoOverviewQueryOptions, @@ -99,61 +101,74 @@ function RepoPullsPage() { ); const totalLabel = overviewQuery.data?.openPullCount; + const repoData = overviewQuery.data; return ( -
-
-
-

- Pull Requests -

-

- {totalLabel != null ? ( - {totalLabel} open · - ) : null} - - {owner}/{repo} - -

-
- - - - {query.isLoading ? ( -
- -
- ) : ( -
- {filtered.length === 0 && ( -

- No pull requests found. -

- )} - {filtered.map((pr) => ( -
+
+
+
+

+ Pull Requests +

+

+ {totalLabel != null ? ( + {totalLabel} open · + ) : null} + - -

- ))} + {owner}/{repo} + +

- )} - + + + {query.isLoading ? ( +
+ +
+ ) : ( +
+ {filtered.length === 0 && ( +

+ No pull requests found. +

+ )} + {filtered.map((pr) => ( +
+ +
+ ))} +
+ )} + + +
-
+ {repoData && ( + + + + )} + ); }