Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(client-runtime): Read image previews load once the Read finishes #27954

Closedjuliusmarmingewants to merge 8 commits intomain fromrefs/pull/27954/headopened View on GitHub

Showing 2 changed files with 21 additions and 0 deletions.

x
0 of 2 viewed, 2 left
19 additions and 0 deletionspackages/client-runtime/src/work-log/presentation.test.tsModified
View file
@@ -9,6 +9,7 @@
type WorkLogPresentationEntry,
workEntryIndicatesToolFailure,
workEntryDisplayIndicatesToolFailure,
+ workEntryViewedImagePath,
} from "./presentation.js";
​
function commandItem(
@@ -204,3 +205,21 @@
).toBeNull();
});
});
+​
+describe("workEntryViewedImagePath", () => {
+ it("withholds a Read's image preview until the Read has finished", () => {
+ const read: WorkLogPresentationEntry = {
+ id: "read",
+ createdAt: "2026-01-01T00:00:00.000Z",
+ label: "Read",
+ tone: "tool",
+ itemType: "dynamic_tool",
+ viewedImagePath: "/repo/out/later3.png",
+ };
+​
+ expect(workEntryViewedImagePath({ ...read, toolLifecycleStatus: "inProgress" })).toBeNull();
+ expect(workEntryViewedImagePath({ ...read, toolLifecycleStatus: "completed" })).toBe(
+ "/repo/out/later3.png",
+ );
+ });