fix(web): stop marking mixed tool runs as failed (#7893)

This commit is contained in:
Theo Browne authored and GitHub committed 2026-08-22 04:18:27 -07:00
1 parent 11f051373e
commit ce91284f83
7 files changed
+230 -6

No files matched your search

@@ -220,6 +220,40 @@ describe("projectActivityPayload", () => {
}
});
it("preserves failed stored tool outcomes for web and mobile clients", () => {
const activities = [
makeActivity("failed-command", "command_execution", {
item: {
command: "vp test run",
exitCode: 1,
status: "failed",
},
}),
makeActivity("failed-mcp", "mcp_tool_call", {
item: {
server: "simulator",
tool: "build",
arguments: {},
status: "failed",
},
}),
];
for (const activity of activities) {
const projected = projectActivityPayload(activity);
expect(projected.payload).toMatchObject({ status: "failed" });
const [webEntry] = deriveWorkLogEntries([projected]);
expect(webEntry?.toolLifecycleStatus).toBe("failed");
const [mobileGroup] = buildThreadFeed(makeThread([projected]));
expect(mobileGroup).toMatchObject({ type: "activity-group" });
if (mobileGroup?.type === "activity-group") {
expect(mobileGroup.activities[0]?.status).toBe("failure");
}
}
});
it("projects snapshot and event transports without mutating their sources", () => {
const activity = fixtures[0]!;
const thread = makeThread([activity]);