@devries-cameron20 / t3code Mirror · read-only / commits / 05d3cc94b2
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 08:30 UTC

fix(web): collapsing a timeline review thread no longer hits Unresolve (#38141)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Jakub Eichner committed Nov 17, 2026 at 15:11 UTC 05d3cc94b2bd4aad3b035dd3e61e45299fcf40f0
1 file changed +50 -52
apps/web/src/components/pullRequest/PullRequestTimelineTab.tsx
+50 -52
@@ -236,6 +236,7 @@ function ConversationCard({
236 reactions,
237 showPath = true,
238 reply = false,
239 + resolveButton = null,
240 }: {
241 event: PullRequestTimelineEvent;
242 editable: PullRequestComment | null;
@@ -245,6 +246,7 @@ function ConversationCard({
246 showPath?: boolean;
247 /** A reply goes with its conversation, from the card that heads it. */
248 reply?: boolean;
249 + resolveButton?: ReactNode;
250 }) {
251 const canReact = reactions.canReact(event);
252 const [editing, setEditing] = useState(false);
@@ -304,6 +306,7 @@ function ConversationCard({
306 {editable !== null && !editing ? (
307 <PullRequestEditButton aria-label="Edit comment" onClick={() => setEditing(true)} />
308 ) : null}
309 + {resolveButton}
310 {event.body && event.comment && !reply ? (
311 <AddToChatButton comment={event.comment} reactions={reactions} />
312 ) : null}
@@ -477,60 +480,46 @@ function ReviewThreadEvent({
480 fallback={<MessageSquareIcon className="size-3.5" />}
481 muted={!expanded}
482 />
480 - <div className="flex min-w-0 items-center gap-1">
481 - <button
482 - type="button"
483 - className="flex min-w-0 flex-1 items-center gap-2 px-2 py-2 text-left text-2xs text-muted-foreground hover:text-foreground"
484 - aria-expanded={expanded}
485 - onClick={() => setExpanded((current) => !current)}
486 - >
487 - {thread.path === null ? (
488 - <span className="min-w-0 truncate">Overview</span>
489 - ) : (
490 - <>
491 - <FileCode2Icon aria-hidden className="size-3 shrink-0" />
492 - <span className="min-w-0 truncate font-mono">
493 - {thread.line === null ? thread.path : `${thread.path}:${thread.line}`}
494 - </span>
495 - </>
496 - )}
497 - {thread.isResolved ? (
498 - <span className="inline-flex shrink-0 items-center gap-1 font-medium text-success-foreground">
499 - <CircleCheckIcon aria-hidden className="size-3" />
500 - Resolved
501 - </span>
502 - ) : null}
503 - {dismissed ? <span className="shrink-0 font-medium">Review dismissed</span> : null}
504 - {thread.isOutdated ? <span className="shrink-0 font-medium">Outdated</span> : null}
505 - {expanded ? null : (
506 - <span className="shrink-0">
507 - · {event.actor?.login ?? "ghost"}
508 - {replyCount > 0 ? (
509 - <>
510 - {" "}
511 - · {replyCount.toLocaleString()} {replyCount === 1 ? "reply" : "replies"}
512 - </>
513 - ) : null}
483 + <button
484 + type="button"
485 + className="flex w-full min-w-0 items-center gap-2 px-2 py-2 text-left text-2xs text-muted-foreground hover:text-foreground"
486 + aria-expanded={expanded}
487 + onClick={() => setExpanded((current) => !current)}
488 + >
489 + {thread.path === null ? (
490 + <span className="min-w-0 truncate">Overview</span>
491 + ) : (
492 + <>
493 + <FileCode2Icon aria-hidden className="size-3 shrink-0" />
494 + <span className="min-w-0 truncate font-mono">
495 + {thread.line === null ? thread.path : `${thread.path}:${thread.line}`}
496 </span>
515 - )}
516 - <ChevronDownIcon
517 - aria-hidden
518 - className={cn(
519 - "ml-auto size-3.5 shrink-0 transition-transform",
520 - expanded && "rotate-180",
521 - )}
522 - />
523 - </button>
524 - {expanded ? (
525 - <PullRequestResolveThreadButton
526 - environmentId={reactions.environmentId}
527 - reference={reactions.reference}
528 - detail={detail}
529 - thread={thread}
530 - onRefresh={reactions.onRefresh}
531 - />
497 + </>
498 + )}
499 + {thread.isResolved ? (
500 + <span className="inline-flex shrink-0 items-center gap-1 font-medium text-success-foreground">
501 + <CircleCheckIcon aria-hidden className="size-3" />
502 + Resolved
503 + </span>
504 ) : null}
533 - </div>
505 + {dismissed ? <span className="shrink-0 font-medium">Review dismissed</span> : null}
506 + {thread.isOutdated ? <span className="shrink-0 font-medium">Outdated</span> : null}
507 + {expanded ? null : (
508 + <span className="shrink-0">
509 + · {event.actor?.login ?? "ghost"}
510 + {replyCount > 0 ? (
511 + <>
512 + {" "}
513 + · {replyCount.toLocaleString()} {replyCount === 1 ? "reply" : "replies"}
514 + </>
515 + ) : null}
516 + </span>
517 + )}
518 + <ChevronDownIcon
519 + aria-hidden
520 + className={cn("ml-auto size-3.5 shrink-0 transition-transform", expanded && "rotate-180")}
521 + />
522 + </button>
523 {expanded ? (
524 <>
525 <ConversationCard
@@ -540,6 +529,15 @@ function ReviewThreadEvent({
529 onOpen={onOpen}
530 reactions={reactions}
531 showPath={false}
532 + resolveButton={
533 + <PullRequestResolveThreadButton
534 + environmentId={reactions.environmentId}
535 + reference={reactions.reference}
536 + detail={detail}
537 + thread={thread}
538 + onRefresh={reactions.onRefresh}
539 + />
540 + }
541 />
542 {thread.replies.length > 0 ? (
543 <div className="ml-2 space-y-1 border-l border-border/60 pl-3">