@@ -44,6 +44,7 @@ import {
4444 resolveThreadListV2Status ,
4545 resolveThreadListV2WokeAt ,
4646 threadListV2ListItemsAreEqual ,
47+ threadListV2RowAccessibilityLabel ,
4748 threadHasUnseenCompletion ,
4849 type ThreadListV2ListItem ,
4950} from "./threadListV2" ;
@@ -227,6 +228,38 @@ describe("resolveThreadListV2Status", () => {
227228 ) ;
228229} ) ;
229230
231+ describe ( "threadListV2RowAccessibilityLabel" , ( ) => {
232+ const row = {
233+ title : "Fix login" ,
234+ variant : "card" ,
235+ woke : false ,
236+ statusLabel : undefined ,
237+ timeLabel : "5m" ,
238+ snoozeWakeLabel : undefined ,
239+ providerNameLabel : "Codex" ,
240+ hasQueuedMessages : false ,
241+ regeneratingTitle : false ,
242+ } as const ;
243+
244+ it ( "speaks the status or time the row shows beside its title" , ( ) => {
245+ expect ( threadListV2RowAccessibilityLabel ( { ...row , statusLabel : "Approval" } ) ) . toBe (
246+ "Fix login, Approval, Codex" ,
247+ ) ;
248+ expect ( threadListV2RowAccessibilityLabel ( row ) ) . toBe ( "Fix login, 5m, Codex" ) ;
249+ expect ( threadListV2RowAccessibilityLabel ( { ...row , woke : true , statusLabel : "Done" } ) ) . toBe (
250+ "Fix login, Woke, Codex" ,
251+ ) ;
252+ expect (
253+ threadListV2RowAccessibilityLabel ( {
254+ ...row ,
255+ variant : "slim" ,
256+ statusLabel : "Failed" ,
257+ snoozeWakeLabel : "in 2h" ,
258+ } ) ,
259+ ) . toBe ( "Fix login, in 2h, Codex" ) ;
260+ } ) ;
261+ } ) ;
262+
230263describe ( "resolveThreadListV2SwipeActions" , ( ) => {
231264 it ( "offers snooze for a presented input request and moves it onto the snoozed shelf" , ( ) => {
232265 const raw = makeRawThreadShell ( {
0 commit comments