interface StoryTodos { storyId: string; storyName: string | null; items: string[]; } interface TodoPanelProps { todos: StoryTodos[]; isTodoLoading: boolean; todoError: string | null; lastTodoRefresh: Date | null; onRefresh: () => void; } const formatTimestamp = (value: Date | null): string => { if (!value) return "\u2014"; return value.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", second: "2-digit", }); }; export function TodoPanel({ todos, isTodoLoading, todoError, lastTodoRefresh, onRefresh, }: TodoPanelProps) { const totalTodos = todos.reduce((sum, s) => sum + s.items.length, 0); return (
Story TODOs
{totalTodos} remaining
Updated {formatTimestamp(lastTodoRefresh)}
{isTodoLoading ? (
Loading story TODOs...
) : todoError ? (
{todoError}
) : totalTodos === 0 ? (
All acceptance criteria complete.
) : (
{todos .filter((s) => s.items.length > 0) .map((story) => (
{todos.length > 1 && (
{story.storyName ?? story.storyId}
)}
    {story.items.map((item) => (
  • {item}
  • ))}
))}
)}
); }