import { Badge, Card, CardContent, CardHeader, CardHeaderRight, CardTitle } from '@cognite/aura/components'; import { TodoItemRow } from './TodoItemRow'; import type { TodoList } from './types'; interface TodoPanelProps { todos: TodoList; } export function TodoPanel({ todos }: TodoPanelProps) { if (todos.length === 0) return null; const completedCount = todos.filter((t) => t.status === 'completed').length; const progressPct = Math.round((completedCount / todos.length) * 100); return (
Tasks {completedCount}/{todos.length}
{todos.map((item, i) => ( // Index is safe here: the agent only appends to the end and updates in place — it never reorders or inserts in the middle. // Using content as a key would cause remounts (and animation resets) whenever the agent updates a task title with discovered node names. ))}
); }