@@ -11,14 +11,22 @@ import {
1111 THREAD_LIST_V2_SIDEBAR_ROW_STYLE ,
1212 THREAD_LIST_V2_SIDEBAR_ROW_CONTAINER_STYLE ,
1313} from "../threads/thread-list-v2-row-appearance" ;
14- import { PullRequestAvatar , PullRequestDiffStats } from "./PullRequestPresentation" ;
14+ import {
15+ PullRequestAvatar ,
16+ PullRequestConflictBadge ,
17+ PullRequestDiffStats ,
18+ } from "./PullRequestPresentation" ;
1519import {
1620 pullRequestLabelColor ,
1721 pullRequestListReviewStatus ,
1822 pullRequestListRowsAreEqual ,
1923 type EnvironmentPullRequestListEntry ,
2024} from "./pullRequestList" ;
21- import { pullRequestChecksStatus , pullRequestStatus } from "./pullRequestStatus" ;
25+ import {
26+ pullRequestChecksStatus ,
27+ pullRequestConflict ,
28+ pullRequestStatus ,
29+ } from "./pullRequestStatus" ;
2230import { PullRequestGlyph } from "./pullRequestGlyphs" ;
2331
2432export const PullRequestListRow = memo (
@@ -48,6 +56,7 @@ export const PullRequestListRow = memo(
4856 ? "text-drawer-foreground-muted"
4957 : "text-foreground-tertiary" ;
5058 const status = pullRequestStatus ( item ) ;
59+ const conflict = pullRequestConflict ( item ) ;
5160 const review = pullRequestListReviewStatus ( item ) ;
5261 const checks = item . checksState ? pullRequestChecksStatus ( item . checksState ) : null ;
5362 return (
@@ -61,7 +70,7 @@ export const PullRequestListRow = memo(
6170 < Pressable
6271 accessibilityRole = "button"
6372 accessibilityState = { { selected : props . selected , busy : props . busy } }
64- accessibilityLabel = { `Pull request ${ item . number } , ${ item . title } , ${ status . label } , by ${ item . author ?. login ?? "unknown author" } ${ review ? `, ${ review . accessibleLabel } ` : "" } ${ item . checksState ? `, checks ${ item . checksState } ` : "" } ${ item . stack ? `, stack ${ item . stack . position } of ${ item . stack . size } ` : "" } ${ item . labels . length ? `, ${ item . labels . map ( ( label ) => label . name ) . join ( ", " ) } ` : "" } , ${ item . additions } additions, ${ item . deletions } deletions` }
73+ accessibilityLabel = { `Pull request ${ item . number } , ${ item . title } , ${ status . label } ${ conflict ? `, ${ conflict . label . toLowerCase ( ) } ` : "" } , by ${ item . author ?. login ?? "unknown author" } ${ review ? `, ${ review . accessibleLabel } ` : "" } ${ item . checksState ? `, checks ${ item . checksState } ` : "" } ${ item . stack ? `, stack ${ item . stack . position } of ${ item . stack . size } ` : "" } ${ item . labels . length ? `, ${ item . labels . map ( ( label ) => label . name ) . join ( ", " ) } ` : "" } , ${ item . additions } additions, ${ item . deletions } deletions` }
6574 accessibilityHint = "Double tap to open. Touch and hold for quick actions."
6675 onPress = { ( ) => props . onSelect ( item ) }
6776 disabled = { props . busy }
@@ -75,8 +84,19 @@ export const PullRequestListRow = memo(
7584 props . busy && "opacity-50" ,
7685 ) }
7786 >
78- < View className = { props . sidebar ? "pt-0.5" : "pt-2.5" } >
87+ < View className = { cn ( "self-start" , props . sidebar ? "pt-0.5" : "pt-2.5" ) } >
7988 < SymbolView name = { status . icon } size = { 20 } tintColorClassName = { status . tint } />
89+ { conflict ? (
90+ < PullRequestConflictBadge
91+ surfaceClassName = {
92+ props . selected
93+ ? "text-thread-selected"
94+ : props . sidebar
95+ ? "text-drawer"
96+ : "text-screen"
97+ }
98+ />
99+ ) : null }
80100 </ View >
81101 < View
82102 className = { cn (
0 commit comments