@@ -47,6 +47,7 @@ import { PullRequestMarkdown } from "./PullRequestMarkdown";
4747import { PullRequestMoreReplies } from "./PullRequestMoreReplies" ;
4848import { PullRequestMarkdownEditor } from "./PullRequestMarkdownEditor" ;
4949import { PullRequestReactionBar } from "./PullRequestReactions" ;
50+ import { PullRequestResolveThreadButton } from "./PullRequestResolveThreadButton" ;
5051import {
5152 PullRequestActorAvatar ,
5253 PullRequestDiffStat ,
@@ -375,9 +376,11 @@ function ReviewThreadEvent({
375376 cwd,
376377 onOpen,
377378 reactions,
379+ detail,
378380} : {
379381 event : PullRequestTimelineEvent ;
380382 thread : PullRequestTimelineThread ;
383+ detail : PullRequestDetailView ;
381384 editable : ReadonlyMap < string , PullRequestComment > ;
382385 cwd : string ;
383386 onOpen : ( url : string ) => void ;
@@ -395,40 +398,58 @@ function ReviewThreadEvent({
395398 fallback = { < MessageSquareIcon className = "size-3.5" /> }
396399 muted = { ! expanded }
397400 />
398- < button
399- type = "button"
400- 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"
401- aria-expanded = { expanded }
402- onClick = { ( ) => setExpanded ( ( current ) => ! current ) }
403- >
404- < FileCode2Icon aria-hidden className = "size-3 shrink-0" />
405- < span className = "min-w-0 truncate font-mono" >
406- { thread . line === null ? thread . path : `${ thread . path } :${ thread . line } ` }
407- </ span >
408- { thread . isResolved ? (
409- < span className = "inline-flex shrink-0 items-center gap-1 font-medium text-success-foreground" >
410- < CircleCheckIcon aria-hidden className = "size-3" />
411- Resolved
412- </ span >
413- ) : null }
414- { dismissed ? < span className = "shrink-0 font-medium" > Review dismissed</ span > : null }
415- { thread . isOutdated ? < span className = "shrink-0 font-medium" > Outdated</ span > : null }
416- { expanded ? null : (
417- < span className = "shrink-0" >
418- · { event . actor ?. login ?? "ghost" }
419- { replyCount > 0 ? (
420- < >
421- { " " }
422- · { replyCount . toLocaleString ( ) } { replyCount === 1 ? "reply" : "replies" }
423- </ >
424- ) : null }
425- </ span >
426- ) }
427- < ChevronDownIcon
428- aria-hidden
429- className = { cn ( "ml-auto size-3.5 shrink-0 transition-transform" , expanded && "rotate-180" ) }
401+ < div className = "flex min-w-0 items-center gap-1" >
402+ < button
403+ type = "button"
404+ 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"
405+ aria-expanded = { expanded }
406+ onClick = { ( ) => setExpanded ( ( current ) => ! current ) }
407+ >
408+ { thread . path === null ? (
409+ < span className = "min-w-0 truncate" > Overview</ span >
410+ ) : (
411+ < >
412+ < FileCode2Icon aria-hidden className = "size-3 shrink-0" />
413+ < span className = "min-w-0 truncate font-mono" >
414+ { thread . line === null ? thread . path : `${ thread . path } :${ thread . line } ` }
415+ </ span >
416+ </ >
417+ ) }
418+ { thread . isResolved ? (
419+ < span className = "inline-flex shrink-0 items-center gap-1 font-medium text-success-foreground" >
420+ < CircleCheckIcon aria-hidden className = "size-3" />
421+ Resolved
422+ </ span >
423+ ) : null }
424+ { dismissed ? < span className = "shrink-0 font-medium" > Review dismissed</ span > : null }
425+ { thread . isOutdated ? < span className = "shrink-0 font-medium" > Outdated</ span > : null }
426+ { expanded ? null : (
427+ < span className = "shrink-0" >
428+ · { event . actor ?. login ?? "ghost" }
429+ { replyCount > 0 ? (
430+ < >
431+ { " " }
432+ · { replyCount . toLocaleString ( ) } { replyCount === 1 ? "reply" : "replies" }
433+ </ >
434+ ) : null }
435+ </ span >
436+ ) }
437+ < ChevronDownIcon
438+ aria-hidden
439+ className = { cn (
440+ "ml-auto size-3.5 shrink-0 transition-transform" ,
441+ expanded && "rotate-180" ,
442+ ) }
443+ />
444+ </ button >
445+ < PullRequestResolveThreadButton
446+ environmentId = { reactions . environmentId }
447+ reference = { reactions . reference }
448+ detail = { detail }
449+ thread = { thread }
450+ onRefresh = { reactions . onRefresh }
430451 />
431- </ button >
452+ </ div >
432453 { expanded ? (
433454 < >
434455 < ConversationCard
@@ -694,6 +715,7 @@ export function PullRequestTimelineTab({
694715 < ReviewThreadEvent
695716 event = { event }
696717 thread = { event . thread }
718+ detail = { detail }
697719 editable = { editable }
698720 cwd = { detail . workspaceRoot }
699721 onOpen = { openOnHost }
0 commit comments