Skip to content

Commit d0d1129

Browse files
juliusmarmingecodex
andcommitted
fix(mobile): expose PR details in thread row label
Co-authored-by: codex <[email protected]>
1 parent b4dc215 commit d0d1129

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

‎apps/mobile/src/features/threads/thread-list-items.tsx‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
450450
const timestamp = relativeTime(
451451
thread.latestUserMessageAt ?? thread.updatedAt ?? thread.createdAt,
452452
);
453+
const threadAccessibilityLabel = pr ? `${thread.title}, ${pr.accessibilityLabel}` : thread.title;
453454
const subtitleParts = [props.environmentLabel, thread.branch].filter((part): part is string =>
454455
Boolean(part),
455456
);
@@ -507,12 +508,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
507508
</>
508509
) : null}
509510
{pr !== null ? (
510-
<View
511-
accessible
512-
accessibilityLabel={pr.accessibilityLabel}
513-
accessibilityRole="text"
514-
className="flex-row items-center gap-0.5"
515-
>
511+
<View className="flex-row items-center gap-0.5">
516512
<PullRequestIcon
517513
size={compact ? 13 : 11}
518514
color={selected ? "#ffffff" : pullRequestTintColor(pr.state, colorScheme)}
@@ -533,7 +529,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
533529
compact ? (
534530
<Pressable
535531
accessibilityHint="Swipe left for archive and delete actions"
536-
accessibilityLabel={thread.title}
532+
accessibilityLabel={threadAccessibilityLabel}
537533
accessibilityRole="button"
538534
className="bg-screen"
539535
onPress={() => {
@@ -579,7 +575,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: {
579575
) : (
580576
<Pressable
581577
accessibilityHint="Opens the thread"
582-
accessibilityLabel={thread.title}
578+
accessibilityLabel={threadAccessibilityLabel}
583579
accessibilityRole="button"
584580
accessibilityState={{ selected }}
585581
onHoverIn={() => setHovered(true)}

0 commit comments

Comments
 (0)