@@ -18,6 +18,7 @@ import {
1818 type OrchestrationV2TurnItem ,
1919} from "@t3tools/contracts" ;
2020import { deriveThreadCheckpointSummaries } from "@t3tools/client-runtime/state/thread-checkpoints" ;
21+ import { summarizeToolGroup } from "@t3tools/client-runtime/work-log/presentation" ;
2122import { getReviewSectionIdForCheckpoint } from "../features/review/reviewModel" ;
2223import * as DateTime from "effect/DateTime" ;
2324import { describe , expect , it } from "vite-plus/test" ;
@@ -596,6 +597,24 @@ describe("buildThreadFeed", () => {
596597 expect ( items [ 0 ] ) . toMatchObject ( { output : rawOutput } ) ;
597598 } ) ;
598599
600+ it ( "counts every file of a multi-file patch" , ( ) => {
601+ const item : OrchestrationV2TurnItem = {
602+ ...base ( "multi-file-change" , "2026-06-20T00:00:04.000Z" , 3 ) ,
603+ type : "file_change" ,
604+ fileName : "src/a.ts" ,
605+ changes : [
606+ { operation : "update" , path : "src/a.ts" } ,
607+ { operation : "add" , path : "src/b.ts" } ,
608+ { operation : "update" , path : "src/renamed.ts" , oldPath : "src/original.ts" } ,
609+ ] ,
610+ } ;
611+ const activity = buildThreadFeed ( [ projected ( item , 0 ) ] ) . flatMap ( ( entry ) =>
612+ entry . type === "activity-group" ? entry . activities : [ ] ,
613+ ) [ 0 ] ! ;
614+ expect ( workEntryRowLabel ( activity . workEntry ) ) . toBe ( "src/a.ts +2 more" ) ;
615+ expect ( summarizeToolGroup ( [ activity . workEntry ] ) . summary ) . toBe ( "Changed 3 files" ) ;
616+ } ) ;
617+
599618 it ( "anchors feedback before later committed turns" , ( ) => {
600619 const laterUser = {
601620 ...userMessage ( "2026-08-29T00:00:05.000Z" ) ,
0 commit comments