Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions apps/web/src/components/chat/MessagesTimeline.logic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3640,6 +3640,47 @@ describe("v2 run and attempt history", () => {

expect(rows.map((row) => row.id)).toEqual(["work-entry", "interrupt-result"]);
expect(rows.some((row) => row.kind === "turn-fold")).toBe(false);

// The command the interrupt cut short stays visible with its outcome.
const stoppedRows = deriveMessagesTimelineRows({
timelineEntries: [
{
id: "stopped-command-entry",
kind: "work",
createdAt: "2026-01-01T00:00:01Z",
entry: {
id: "stopped-command",
createdAt: "2026-01-01T00:00:01Z",
runId,
label: "Ran command",
tone: "tool",
itemType: "command_execution",
command: "/bin/bash -lc 'sleep 90 && echo slept'",
toolLifecycleStatus: "stopped",
},
},
{
id: "interrupt-result",
kind: "event",
createdAt: "2026-01-01T00:00:03Z",
projectedItem: interruptEvent("run_interrupt_result") as never,
},
],
latestRun: {
runId,
status: "interrupted",
startedAt: "2026-01-01T00:00:00Z",
completedAt: "2026-01-01T00:00:03Z",
},
isWorking: false,
turnDiffSummaries: [],
supportsConversationRollback: false,
});
expect(stoppedRows.map((row) => row.id)).toEqual(["stopped-command-entry", "interrupt-result"]);
expect(stoppedRows[0]).toMatchObject({
kind: "work",
displayLabel: "sleep 90 && echo slept",
});
});
});

Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/components/chat/MessagesTimeline.logic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ export function workEntryIsVisibleInGroup(
(expandedToolGroupEntry &&
(entry.toolLifecycleStatus === "inProgress" ||
entry.sourceActivityKind === "task.progress")) ||
// A stopped call is an outcome ("Stopped sleep"), not an empty row.
entry.toolLifecycleStatus === "stopped" ||
!workEntryIndicatesToolNeutralStatus(entry)
);
}
Expand Down
Loading