@@ -7,6 +7,7 @@ import { todoItemSchema } from "../src/data/status.ts";
77import { workspaceAgentTodoFromItem } from "../src/features/personal-workspace/personal-workspace-model.ts" ;
88import { ContextDrawer } from "../src/features/personal-workspace/context-drawer.tsx" ;
99import { WorkspaceI18nProvider } from "../src/features/personal-workspace/i18n.tsx" ;
10+ import { RunRow } from "../src/features/personal-workspace/cards/run-row.tsx" ;
1011
1112// A Goal's default executor is not evidence that a Todo has been claimed.
1213// Exercise the real consumers, including retained history and stale labels.
5657 assert . ok ( drawer . includes ( `<dt>${ owner } </dt><dd>${ expected } </dd>` ) , "A stale display label cannot invent an absent claim" ) ;
5758 assert . equal ( todo . claimedBy , claim , "Rendering never mutates the source claim" ) ;
5859 }
60+ const todo = { todoId : "run-task" , text : "Inspect execution" , done : false , status : "open" } ;
61+ const goal = { goalId : "run-goal" , title : "Execution facts" , agentTodos : [ todo ] } ;
62+ for ( const [ status , en , zh ] of [
63+ [ "queued" , "Scheduled" , "已安排" ] , [ "running" , "Running" , "执行中" ] ,
64+ [ "waiting" , "Waiting" , "等待条件" ] , [ "failed" , "Needs review" , "需检查" ] ,
65+ [ "interrupted" , "Interrupted" , "已中断" ] , [ "completed" , "Completed" , "已完成" ] ,
66+ ] ) {
67+ const run = { todoId : todo . todoId , goalId : goal . goalId , status, title : todo . text , agentLabel : "Worker" } ;
68+ const board = render ( GoalTasksView , { goal, items : [ { kind : "run" , id : "execution" , run} ] , userTodos : [ ] , onSelect ( ) { } } ) ;
69+ const timeline = render ( RunRow , { run, onSelect ( ) { } } ) ;
70+ const expected = locale === "en" ? en : zh ;
71+ assert . ok ( board . includes ( `personal-task-session-status">${ expected } </span>` ) , `Task cards preserve ${ status } ` ) ;
72+ assert . ok ( timeline . includes ( expected ) , `Timeline and task cards agree for ${ status } ` ) ;
73+ }
5974 }
6075} finally {
6176 if ( originalWindow === undefined ) delete globalThis . window ;
0 commit comments