Thread progressByTaskId through TaskListPanel and TasksScreen
Progress notifications arrive separately from the Task object, so the parent provides a map of progress data keyed by taskId. TaskListPanel and TasksScreen accept an optional progressByTaskId prop and pass the matching entry to each TaskCard. Updated Mixed story and ConnectedView TasksActive story to demonstrate the progress bar on the active "working" task. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b487279d36
commit
f9f239c8c7
1 changed files with 23 additions and 0 deletions
|
|
@ -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<string, TaskProgress>;
|
||||
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({
|
|||
<TaskCard
|
||||
key={task.taskId}
|
||||
task={task}
|
||||
progress={progressByTaskId?.[task.taskId]}
|
||||
isListExpanded={!compact}
|
||||
onCancel={() => onCancel(task.taskId)}
|
||||
/>
|
||||
|
|
@ -136,6 +140,7 @@ export function TaskListPanel({
|
|||
<TaskCard
|
||||
key={task.taskId}
|
||||
task={task}
|
||||
progress={progressByTaskId?.[task.taskId]}
|
||||
isListExpanded={!compact}
|
||||
onCancel={() => onCancel(task.taskId)}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue