Skip to content

Commit 1e8276a

Browse files
committed
fix(web): key task dismissal to the active turn
Pass the resolved session-active Tasks turn into ChatComposer so session-local dismissal cannot target a stale latestTurnId.
1 parent 82f78bc commit 1e8276a

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6834,6 +6834,7 @@ function ChatViewContent(props: ChatViewProps) {
68346834
respondingRequestIds={respondingRequestIds}
68356835
showPlanFollowUpPrompt={showPlanFollowUpPrompt}
68366836
activeProposedPlan={activeProposedPlan}
6837+
activeTasksTurnId={activeComposerTasks ? activePlanTurnId : null}
68376838
activeTasksProgress={activeComposerTasksProgress}
68386839
activeTaskSteps={activeComposerTaskSteps}
68396840
runtimeMode={runtimeMode}

‎apps/web/src/components/chat/ChatComposer.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ export interface ChatComposerProps {
591591
// Plan
592592
showPlanFollowUpPrompt: boolean;
593593
activeProposedPlan: Thread["proposedPlans"][number] | null;
594+
activeTasksTurnId: TurnId | null;
594595
activeTasksProgress: ComposerTasksProgress | null;
595596
activeTaskSteps: readonly ComposerTaskStep[] | null;
596597

@@ -689,6 +690,7 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
689690
respondingRequestIds,
690691
showPlanFollowUpPrompt,
691692
activeProposedPlan,
693+
activeTasksTurnId,
692694
activeTasksProgress,
693695
activeTaskSteps,
694696
runtimeMode,
@@ -2388,7 +2390,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
23882390
const toggleTasksDrawer = useCallback(() => {
23892391
setIsTasksDrawerOpen((open) => !open);
23902392
}, []);
2391-
const activeTasksTurnId = activeThread?.latestTurn?.turnId ?? null;
23922393
const tasksDismissedForActiveTurn =
23932394
activeTasksTurnId !== null && dismissedTasksTurnId === activeTasksTurnId;
23942395
const visibleTasksProgress = tasksDismissedForActiveTurn ? null : activeTasksProgress;

0 commit comments

Comments
 (0)