Skip to content

Commit 5b7b2d0

Browse files
authored
feat(ui): collapse completed turn work behind a "Worked for X" rollup (#105012)
* feat(ui): collapse completed turn work behind a worked-for rollup * test(ui): add a completed work turn to the mock chat history * fix(ui): keep search matches visible instead of folding them into the work rollup * fix(ui): keep attachment-only final replies outside the work rollup * chore(ui): translate workRun locale keys and cover renderWorkGroupSummary mock * fix(ui): satisfy strict index access in the work rollup pass
1 parent 02f88c2 commit 5b7b2d0

68 files changed

Lines changed: 846 additions & 128 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

scripts/control-ui-mock-dev.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,41 @@ function buildScrollableChatHistory(baseTime: number): unknown[] {
704704
);
705705
}
706706

707+
// Completed work turn: commentary + tool results ahead of the final reply
708+
// exercise the collapsed "Worked for X" rollup at the end of the thread.
709+
const workTurnBase = baseTime + 37 * 60_000;
710+
messages.push(
711+
chatHistoryMessage(
712+
"user",
713+
"Mock work request: refactor the render guard and rerun the suite.",
714+
workTurnBase,
715+
),
716+
chatHistoryMessage(
717+
"assistant",
718+
"Checking the guard implementation before editing.",
719+
workTurnBase + 5_000,
720+
),
721+
{
722+
role: "toolResult",
723+
toolCallId: "mock-work-read",
724+
toolName: "read",
725+
content: [{ type: "text", text: "Read ui/src/pages/chat/chat-thread.ts (120 lines)." }],
726+
timestamp: workTurnBase + 12_000,
727+
},
728+
{
729+
role: "toolResult",
730+
toolCallId: "mock-work-exec",
731+
toolName: "exec",
732+
content: [{ type: "text", text: "pnpm test chat-thread — 12 passed." }],
733+
timestamp: workTurnBase + 95_000,
734+
},
735+
chatHistoryMessage(
736+
"assistant",
737+
"Refactored the render guard and reran the suite; all 12 tests pass.",
738+
workTurnBase + 172_000,
739+
),
740+
);
741+
707742
return messages;
708743
}
709744

ui/src/i18n/.i18n/ar.meta.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/src/i18n/.i18n/ar.tm.jsonl

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ui/src/i18n/.i18n/de.meta.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)