Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(chat): preserve assistant responses when folding #8903

ClosednateEc(GitHub profile, opens in a new tab)wants to merge 3 commits intomain fromrefs/pull/8903/headopened View on GitHub

Showing 4 changed files with 80 additions and 15 deletions (loading 2).

x
0 of 4 viewed, 4 left
74 additions and 7 deletionsapps/mobile/src/lib/threadActivity.test.tsModified
View file
@@ -1831,7 +1831,74 @@
expect(collapsed[1]).toMatchObject({ type: "turn-fold", label: "Worked for 17s" });
- it("folds assistant messages between the first and terminal messages", () => {
+ it("keeps spawned agents visible after their parent turn settles", () => {
+ const turnId = TurnId.make("turn-spawned-agent");
+ const thread = makeThread({
+ id: ThreadId.make("thread-spawned-agent"),
+ projectId: ProjectId.make("project-1"),
+ title: "Spawned agent",
+ latestTurn: {
+ turnId,
+ state: "completed",
+ requestedAt: "2026-04-01T00:00:00.000Z",
+ startedAt: "2026-04-01T00:00:01.000Z",
+ completedAt: "2026-04-01T00:00:04.000Z",
+ assistantMessageId: MessageId.make("assistant-final"),
+ },
+ messages: [
+ {
+ id: MessageId.make("assistant-final"),
+ role: "assistant",
+ text: "The parent task is complete.",
+ turnId,
+ streaming: false,
+ createdAt: "2026-04-01T00:00:03.000Z",
+ updatedAt: "2026-04-01T00:00:04.000Z",
+ },
+ ],