diff --git a/apps/mobile/src/features/threads/thread-list-items.tsx b/apps/mobile/src/features/threads/thread-list-items.tsx index 87138855956..b08f9e3cc12 100644 --- a/apps/mobile/src/features/threads/thread-list-items.tsx +++ b/apps/mobile/src/features/threads/thread-list-items.tsx @@ -441,10 +441,8 @@ export const ThreadListRow = memo(function ThreadListRow(props: { const iconSubtleColor = useThemeColor("--color-icon-subtle"); const screenColor = useThemeColor("--color-screen"); const drawerColor = useThemeColor("--color-drawer"); - const mutedColor = useThemeColor("--color-foreground-muted"); const pressedBackgroundColor = useThemeColor("--color-subtle"); const selectedBackgroundColor = useThemeColor("--color-user-bubble"); - const selectedMutedColor = useThemeColor("--color-user-bubble-foreground-muted"); const { thread, onSelectThread, onArchiveThread, onDeleteThread } = props; const status = resolveThreadStatus(thread); @@ -452,12 +450,12 @@ export const ThreadListRow = memo(function ThreadListRow(props: { const timestamp = relativeTime( thread.latestUserMessageAt ?? thread.updatedAt ?? thread.createdAt, ); + const threadAccessibilityLabel = pr ? `${thread.title}, ${pr.accessibilityLabel}` : thread.title; const subtitleParts = [props.environmentLabel, thread.branch].filter((part): part is string => Boolean(part), ); const backgroundColor = compact ? screenColor : drawerColor; - const effectiveMuted = selected ? selectedMutedColor : mutedColor; const effectivePressedBackground = selected ? "rgba(255,255,255,0.16)" : pressedBackgroundColor; const effectiveStatus = selected && status @@ -496,12 +494,6 @@ export const ThreadListRow = memo(function ThreadListRow(props: { {subtitleParts.length > 0 ? ( <> - ) : null} {pr !== null ? ( - + { @@ -586,7 +575,7 @@ export const ThreadListRow = memo(function ThreadListRow(props: { ) : ( setHovered(true)} diff --git a/apps/mobile/src/state/thread-pr-presentation.ts b/apps/mobile/src/state/thread-pr-presentation.ts index 118ac00bbf5..601e29fa444 100644 --- a/apps/mobile/src/state/thread-pr-presentation.ts +++ b/apps/mobile/src/state/thread-pr-presentation.ts @@ -7,7 +7,7 @@ export interface ThreadPrPresentation { readonly number: number; readonly state: ThreadPr["state"]; readonly url: string; - /** Compact desktop-style label, e.g. "#3774". */ + /** Compact pull request number label, e.g. "3774". */ readonly label: string; /** Full, provider-aware label for assistive technologies. */ readonly accessibilityLabel: string; @@ -29,7 +29,7 @@ export function presentThreadPr( number: pr.number, state: pr.state, url: pr.url, - label: `#${pr.number}`, + label: String(pr.number), accessibilityLabel: `#${pr.number} ${presentation.longName} ${pr.state}`, textClassName: PR_STATE_TEXT_CLASS[pr.state], }; diff --git a/apps/mobile/src/state/use-thread-pr.test.ts b/apps/mobile/src/state/use-thread-pr.test.ts index 21d388bb407..a355dddcd43 100644 --- a/apps/mobile/src/state/use-thread-pr.test.ts +++ b/apps/mobile/src/state/use-thread-pr.test.ts @@ -13,9 +13,9 @@ const pullRequest: NonNullable = { }; describe("presentThreadPr", () => { - it("uses the compact desktop-style pull request number label", () => { + it("uses the compact pull request number label without a hash prefix", () => { expect(presentThreadPr(pullRequest, undefined)).toMatchObject({ - label: "#3774", + label: "3774", accessibilityLabel: "#3774 pull request merged", textClassName: "text-violet-600 dark:text-violet-400", }); @@ -29,7 +29,7 @@ describe("presentThreadPr", () => { baseUrl: "https://gitlab.com", }), ).toMatchObject({ - label: "#3774", + label: "3774", accessibilityLabel: "#3774 merge request merged", }); });