Skip to content

Commit eb7b35a

Browse files
test(mobile): a completed render splits the work log into lone-call rows (#21295)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent f7dd1a3 commit eb7b35a

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

‎apps/mobile/src/lib/threadActivity.test.ts‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2820,13 +2820,25 @@ describe("html renders", () => {
28202820
expect(expanded.map((entry) => entry.type)).toEqual([
28212821
"message",
28222822
"run-fold",
2823-
"work-toggle",
2823+
"activity-group",
28242824
"html-render",
2825-
"work-toggle",
2825+
"activity-group",
28262826
"message",
28272827
]);
28282828
expect(expanded[3]).toMatchObject({ type: "html-render", render: page, runId });
2829-
expect(expanded[2]?.continuesWorkLog).toBeUndefined();
2829+
// The render splits the work log, so each command is a lone call with its own group.
2830+
const callIds = [expanded[2], expanded[4]].map((row) =>
2831+
row?.type === "activity-group"
2832+
? row.activities.map((activity) => activity.projectedItem.item.id)
2833+
: [],
2834+
);
2835+
expect(callIds).toEqual([["item-command"], ["item-command-later"]]);
2836+
const groupIds = [expanded[2], expanded[4]].map((row) =>
2837+
row?.type === "activity-group" ? row.activities[0]?.groupStandIn?.groupId : undefined,
2838+
);
2839+
expect(groupIds[0]).toBeDefined();
2840+
expect(groupIds[1]).toBeDefined();
2841+
expect(groupIds[0]).not.toBe(groupIds[1]);
28302842
});
28312843

28322844
it("keeps a render visible and in order when its run folds", () => {

0 commit comments

Comments
 (0)