diff --git a/clients/web/src/components/groups/TaskListPanel/TaskListPanel.tsx b/clients/web/src/components/groups/TaskListPanel/TaskListPanel.tsx index 1096081c..c512f7fa 100644 --- a/clients/web/src/components/groups/TaskListPanel/TaskListPanel.tsx +++ b/clients/web/src/components/groups/TaskListPanel/TaskListPanel.tsx @@ -10,10 +10,12 @@ import { } from "@mantine/core"; import type { Task, TaskStatus } from "@modelcontextprotocol/sdk/types.js"; import { TaskCard } from "../TaskCard/TaskCard"; +import type { TaskProgress } from "../TaskCard/TaskCard"; import { ListToggle } from "../../elements/ListToggle/ListToggle"; export interface TaskListPanelProps { tasks: Task[]; + progressByTaskId?: Record; searchText: string; statusFilter?: TaskStatus; onCancel: (taskId: string) => void; @@ -67,6 +69,7 @@ function matchesFilters( export function TaskListPanel({ tasks, + progressByTaskId, searchText, statusFilter, onCancel, @@ -115,6 +118,7 @@ export function TaskListPanel({ onCancel(task.taskId)} /> @@ -136,6 +140,7 @@ export function TaskListPanel({ onCancel(task.taskId)} /> diff --git a/clients/web/src/components/screens/TasksScreen/TasksScreen.stories.tsx b/clients/web/src/components/screens/TasksScreen/TasksScreen.stories.tsx index 1f6883a0..cea894b0 100644 --- a/clients/web/src/components/screens/TasksScreen/TasksScreen.stories.tsx +++ b/clients/web/src/components/screens/TasksScreen/TasksScreen.stories.tsx @@ -53,6 +53,13 @@ const sampleTasks: Task[] = [ export const Mixed: Story = { args: { tasks: sampleTasks, + progressByTaskId: { + d0b22eba71fa36229ce5c4dfadeaa7de: { + progress: 650, + total: 1000, + message: "Processing records...", + }, + }, }, }; diff --git a/clients/web/src/components/screens/TasksScreen/TasksScreen.tsx b/clients/web/src/components/screens/TasksScreen/TasksScreen.tsx index b6a0730c..b0fe9a1d 100644 --- a/clients/web/src/components/screens/TasksScreen/TasksScreen.tsx +++ b/clients/web/src/components/screens/TasksScreen/TasksScreen.tsx @@ -3,9 +3,11 @@ import { Card, Flex, Stack } from "@mantine/core"; import type { Task, TaskStatus } from "@modelcontextprotocol/sdk/types.js"; import { TaskControls } from "../../groups/TaskControls/TaskControls"; import { TaskListPanel } from "../../groups/TaskListPanel/TaskListPanel"; +import type { TaskProgress } from "../../groups/TaskCard/TaskCard"; export interface TasksScreenProps { tasks: Task[]; + progressByTaskId?: Record; onRefresh: () => void; onClearCompleted: () => void; onCancel: (taskId: string) => void; @@ -30,6 +32,7 @@ const SidebarCard = Card.withProps({ export function TasksScreen({ tasks, + progressByTaskId, onRefresh, onClearCompleted, onCancel, @@ -52,6 +55,7 @@ export function TasksScreen({