Skip to content

Commit 1d690b4

Browse files
saphidclaudemaria-rcks
authored
fix(mobile): thread rows show when a title is regenerating (#26835)
Co-authored-by: SAPHID <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: maria-rcks <[email protected]>
1 parent 1a3f145 commit 1d690b4

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

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

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
695695
? { ...workingLabel, label: "Goal" }
696696
: workingLabel) ?? (isUnread ? DONE_STATUS_LABEL : undefined);
697697
const recede = shouldRecedeThreadRow({ status, selected });
698+
const isRegeneratingTitle = thread.titleRegeneration != null;
699+
const rowAccessibilityLabel = `${thread.title}${props.hasQueuedMessages ? ", messages queued to send" : ""}${isRegeneratingTitle ? ", regenerating title" : ""}`;
698700
const timeLabel = props.timeLabel;
699701

700702
const visitThread = useAtomCommand(threadEnvironment.visit, { reportFailure: false });
@@ -845,7 +847,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
845847
{ id: "rename", title: "Rename", image: "square.and.pencil" },
846848
...buildThreadTitleRegenerationMenuItems({
847849
supported: props.titleRegenerationSupported,
848-
isRegenerating: thread.titleRegeneration != null,
850+
isRegenerating: isRegeneratingTitle,
849851
}),
850852
...(canTurnIntoProject
851853
? [
@@ -858,12 +860,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
858860
]
859861
: []),
860862
],
861-
[
862-
canTurnIntoProject,
863-
props.titleRegenerationSupported,
864-
thread.runtime,
865-
thread.titleRegeneration,
866-
],
863+
[canTurnIntoProject, props.titleRegenerationSupported, thread.runtime, isRegeneratingTitle],
867864
);
868865
const snoozableCardMenuActions = useMemo<MenuAction[]>(
869866
() => [
@@ -1079,6 +1076,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
10791076
selected
10801077
? selectedThreadRowColors.foregroundClassName
10811078
: rowAppearance.foregroundClassName,
1079+
isRegeneratingTitle && "opacity-55",
10821080
)}
10831081
numberOfLines={2}
10841082
>
@@ -1299,9 +1297,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
12991297
interactionOpacity={rowAppearance.interactionOpacity}
13001298
className={rowAppearance.className}
13011299
accessibilityHint={swipeAccessibilityHint}
1302-
accessibilityLabel={
1303-
props.hasQueuedMessages ? `${thread.title}, messages queued to send` : thread.title
1304-
}
1300+
accessibilityLabel={rowAccessibilityLabel}
13051301
accessibilityRole="button"
13061302
accessibilityState={{ selected }}
13071303
accessibilityActions={rowAccessibilityActions}
@@ -1332,9 +1328,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
13321328
interactionClassName={rowAppearance.interactionClassName}
13331329
interactionOpacity={rowAppearance.interactionOpacity}
13341330
accessibilityHint={swipeAccessibilityHint}
1335-
accessibilityLabel={
1336-
props.hasQueuedMessages ? `${thread.title}, messages queued to send` : thread.title
1337-
}
1331+
accessibilityLabel={rowAccessibilityLabel}
13381332
accessibilityRole="button"
13391333
accessibilityState={{ selected }}
13401334
className={rowAppearance.className}
@@ -1370,6 +1364,7 @@ export const ThreadListV2Row = memo(function ThreadListV2Row(props: {
13701364
selected
13711365
? selectedThreadRowColors.foregroundClassName
13721366
: rowAppearance.mutedForegroundClassName,
1367+
isRegeneratingTitle && "opacity-55",
13731368
)}
13741369
numberOfLines={1}
13751370
>

0 commit comments

Comments
 (0)