@devries-cameron20 / t3code-1 / commits / 990e9e06e5
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(web): preserve handoffs before superseded attempt folds (#26333)

Yash Singh committed Oct 28, 2026 at 02:41 UTC 990e9e06e59c9b06317670a08ff0dca5859cb7d8
2 files changed +12
apps/web/src/components/chat/MessagesTimeline.logic.test.ts
+11
@@ -2642,6 +2642,15 @@ describe("v2 run and attempt history", () => {
2642 completedAt: null,
2643 };
2644 const timelineEntries = [
2645 + {
2646 + id: "context-handoff-entry",
2647 + kind: "event" as const,
2648 + createdAt: "2026-01-01T00:00:00Z",
2649 + attempt: supersededAttempt,
2650 + projectedItem: {
2651 + item: { type: "handoff", runId },
2652 + } as never,
2653 + },
2654 {
2655 id: "initial-user-entry",
2656 kind: "message" as const,
@@ -2744,6 +2753,7 @@ describe("v2 run and attempt history", () => {
2753
2754 const collapsedRows = deriveMessagesTimelineRows(common);
2755 expect(collapsedRows.map((row) => row.id)).toEqual([
2756 + "context-handoff-entry",
2757 "initial-user-entry",
2758 `attempt-fold:${supersededAttemptId}`,
2759 "superseded-thread-created-entry",
@@ -2762,6 +2772,7 @@ describe("v2 run and attempt history", () => {
2772 expandedAttemptIds: new Set([supersededAttemptId]),
2773 });
2774 expect(expandedRows.map((row) => row.id)).toEqual([
2775 + "context-handoff-entry",
2776 "initial-user-entry",
2777 `attempt-fold:${supersededAttemptId}`,
2778 "superseded-assistant-entry",
apps/web/src/components/chat/MessagesTimeline.logic.ts
+1
@@ -770,6 +770,7 @@ function deriveSupersededAttemptFolds(
770 completeAttemptIds.has(entry.attempt.id) ||
771 unfoldedRunIds.has(entry.attempt.runId) ||
772 (entry.kind === "message" && entry.message.role === "user") ||
773 + (entry.kind === "event" && entry.projectedItem.item.type === "handoff") ||
774 entry.kind === "html-render" ||
775 entry.kind === "mcp-app" ||
776 timelineEntryIsPersistentResourceCard(entry) ||