-
+
{isFetching && !comments && (
@@ -44,39 +309,116 @@ export function IssueDetailActivitySection({
)}
- {comments && comments.length === 0 && (
-
No comments yet.
+ {visibleItems.length === 0 && comments && (
+
No activity yet.
)}
- {comments && comments.length > 0 && (
+ {visibleItems.length > 0 && (
- {comments.map((comment, index) => (
-
-
- {comment.author ? (
-

{
+ const previousType =
+ index > 0 ? visibleItems[index - 1].type : null;
+ const nextType =
+ index < visibleItems.length - 1
+ ? visibleItems[index + 1].type
+ : null;
+ const isConsecutiveEvent =
+ item.type === "event" && previousType === "event";
+ const isLastInEventRun =
+ item.type === "event" && nextType !== "event";
+
+ const row = (() => {
+ if (item.type === "comment") {
+ const comment = item.data;
+ return (
+
+
+ {comment.author ? (
+

+ ) : (
+
+ )}
+
+ {comment.author?.login ?? "Unknown"}
+
+
+ {formatRelativeTime(comment.createdAt)}
+
+
+
+ {comment.body}
+
+
+ );
+ }
+
+ const event = item.data;
+ const icon = getIssueEventIcon(event);
+ const description = getIssueEventDescription(event);
+ const isCrossRef =
+ event.event === "cross-referenced" ||
+ event.event === "referenced";
+ const hasActorAvatar = !isCrossRef && event.actor?.avatarUrl;
+
+ if (!description) return null;
+
+ return (
+
+ {hasActorAvatar ? (
+

+ ) : (
+
+ {icon}
+
+ )}
+
+ {description}
+
+ {event.createdAt && (
+
+ {formatRelativeTime(event.createdAt)}
+
+ )}
+
+ );
+ })();
+
+ return (
+ <>
+ {index === loadMoreIndex && (
+
- ) : (
-
)}
-
- {comment.author?.login ?? "Unknown"}
-
-
- {formatRelativeTime(comment.createdAt)}
-
-
-
- {comment.body}
-
-
- ))}
+ {row}
+ >
+ );
+ })}
)}
@@ -86,3 +428,307 @@ export function IssueDetailActivitySection({
);
}
+
+// ── Load more divider ───────────────────────────────────────────────
+
+function LoadMoreDivider({
+ hiddenCount,
+ hasMorePages,
+ isPending,
+ onLoadMore,
+}: {
+ hiddenCount: number;
+ hasMorePages?: boolean;
+ isPending?: boolean;
+ onLoadMore: () => void;
+}) {
+ const label =
+ hiddenCount > 0
+ ? `${hiddenCount}${hasMorePages ? "+" : ""} more ${hiddenCount === 1 && !hasMorePages ? "item" : "items"}`
+ : "Load more";
+
+ return (
+
@@ -230,11 +239,13 @@ function AccessList({
) : null}
- {target.installed
+ {target.status === "installed"
? target.scope === "selected"
? "Installed · selected repositories"
: "Installed"
- : "Not installed"}
+ : target.status === "not-installed"
+ ? "Not installed"
+ : "Check installation status on GitHub"}
{target.type === "personal" ? " · personal" : " · org"}
@@ -242,12 +253,12 @@ function AccessList({
{target.href ? (
No activity yet.
- )}
+ {comments &&
+ commits &&
+ comments.length === 0 &&
+ commits.length === 0 &&
+ (!events || events.length === 0) && (
+ No activity yet.
+ )}