fix: use i18n strings for chatbox todo snapshot card

This commit is contained in:
Xiaohan-Tian
2026-06-03 17:09:54 -07:00
parent ad1e0c2aa8
commit 42fdcebd42
2 changed files with 5 additions and 5 deletions
@@ -190,7 +190,7 @@ describe('AssistantMessage', () => {
/>
);
expect(screen.getByLabelText('Agent task checklist snapshot')).toBeInTheDocument();
expect(screen.getByLabelText('Agent task checklist')).toBeInTheDocument();
expect(screen.getByText('Task Checklist')).toBeInTheDocument();
expect(screen.getByText('1/2 completed')).toBeInTheDocument();
expect(screen.getByText('Working on: Writing harmony')).toBeInTheDocument();
+4 -4
View File
@@ -222,16 +222,16 @@ const AssistantMessage: React.FC<AssistantMessageProps> = ({
const activeTodo = todoSnapshot.find(todo => todo.status === 'in_progress') ?? null;
return (
<section className="chatbox-todo-card" aria-label="Agent task checklist snapshot">
<section className="chatbox-todo-card" aria-label={t('chatbox.todo.ariaLabel')}>
<div className="chatbox-todo-card-header">
<h4>Task Checklist</h4>
<h4>{t('chatbox.todo.title')}</h4>
<span className="chatbox-todo-count">
{counts.completed}/{counts.total} completed
{t('chatbox.todo.count', { completed: counts.completed, total: counts.total })}
</span>
</div>
{activeTodo && (
<div className="chatbox-todo-active">
Working on: {activeTodo.activeText || activeTodo.text}
{t('chatbox.todo.active', { task: activeTodo.activeText || activeTodo.text })}
</div>
)}
<ul className="chatbox-todo-list">