The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 22, 23:15 UTC
fix(shared): unwatch, review guide, and task cancel labels read as plain sentences (#19767)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
SG committed
Oct 20, 2026 at 00:16 UTC
181fbb2b464e841c97914b14c7fa9f57598b5e49
3 files changed
+54
-7
packages/client-runtime/src/t3ToolSummary.ts
+8
-4
@@ -405,15 +405,19 @@ export function summarizeT3ToolCalls(
405
const started = outcomes.filter((outcome) => outcome !== "failed").length;
406
const failed = outcomes.length - started;
407
failedCount += failed;
408
- if (outcomes.length > 0 && started === 0) {
408
+ if (outcomes.length === 0) {
409
+ label = phrase(
410
+ "Started writing",
411
+ "start writing",
412
+ `review guides${selected.length === 1 ? "" : ` ${times}`}`,
413
+ );
414
+ } else if (started === 0) {
415
label = `Could not start ${quantity(failed, "review guide")}`;
416
} else {
417
label = phrase(
418
"Started",
419
"start",
414
- outcomes.length === 0
415
- ? `review guides ${times}`
416
- : `${quantity(started, "review guide")}${failed > 0 ? `, ${failed} failed` : ""}`,
420
+ `${quantity(started, "review guide")}${failed > 0 ? `, ${failed} failed` : ""}`,
421
);
422
}
423
break;
packages/client-runtime/src/work-log/presentation.test.ts
+43
@@ -375,6 +375,49 @@ describe("resolveWorkEntryToolPresentation", () => {
375
).toBe(completed);
376
});
377
378
+ it("distinguishes an interrupted unwatch from a completed unwatch", () => {
379
+ const entry = { label: "T3-code.unwatch_pull_request" };
380
+ expect(
381
+ (["inProgress", "stopped", "completed"] as const).map(
382
+ (toolLifecycleStatus) =>
383
+ resolveWorkEntryToolPresentation({ ...entry, toolLifecycleStatus })?.displayName,
384
+ ),
385
+ ).toEqual([
386
+ "Unwatching a pull request",
387
+ "Stopped unwatching a pull request",
388
+ "Stopped watching a pull request",
389
+ ]);
390
+ });
391
+
392
+ it("describes starting review-guide writing in rows and groups without outcomes", () => {
393
+ const entry = {
394
+ id: "guides",
395
+ createdAt: "2026-10-07T00:00:00.000Z",
396
+ tone: "tool",
397
+ label: "T3-code.write_pull_request_guides",
398
+ toolLifecycleStatus: "completed",
399
+ } satisfies WorkLogPresentationEntry;
400
+ expect({
401
+ row: resolveWorkEntryToolPresentation(entry)?.displayName,
402
+ single: summarizeToolGroup([entry]).summary,
403
+ repeated: summarizeToolGroup([entry, { ...entry, id: "guides-2" }]).summary,
404
+ }).toEqual({
405
+ row: "Started writing review guides",
406
+ single: "Started writing review guides",
407
+ repeated: "Started writing review guides 2 times",
408
+ });
409
+ });
410
+
411
+ it("describes delegated-task cancellation as an ongoing action then a request", () => {
412
+ const entry = { label: "T3-code.task_cancel" };
413
+ expect(
414
+ (["inProgress", "completed"] as const).map(
415
+ (toolLifecycleStatus) =>
416
+ resolveWorkEntryToolPresentation({ ...entry, toolLifecycleStatus })?.displayName,
417
+ ),
418
+ ).toEqual(["Canceling a delegated task", "Requested cancellation of a delegated task"]);
419
+ });
420
+
421
it("summarizes workflow stop targets separately from their parent thread", () => {
422
const entry = {
423
id: "workflow-stop",
packages/shared/src/t3McpToolPresentation.ts
+3
-3
@@ -106,12 +106,12 @@ const T3_MCP_TOOLS: Readonly<Record<string, T3McpToolDefinition>> = {
106
"pull-request",
107
),
108
unwatch_pull_request: tool(
109
- ["Stop watching", "Stopping watching", "Stopped watching", "a pull request"],
109
+ ["Stop watching", "Unwatching", "Stopped watching", "a pull request"],
110
"unwatch-pr",
111
"pull-request",
112
),
113
write_pull_request_guides: tool(
114
- ["Write", "Writing", "Started", "review guides"],
114
+ ["Write", "Writing", "Started writing", "review guides"],
115
"write-pr-guides",
116
"pull-request",
117
),
@@ -127,7 +127,7 @@ const T3_MCP_TOOLS: Readonly<Record<string, T3McpToolDefinition>> = {
127
delegate_task: tool(["Delegate", "Delegating", "Delegated", "a child task"], "delegate"),
128
task_status: tool(["Get", "Getting", "Got", "delegated task status"], "task-status"),
129
task_cancel: tool(
130
- ["Cancel", "Canceling", "Requested cancellation of", "delegated task"],
130
+ ["Cancel", "Canceling", "Requested cancellation of", "a delegated task"],
131
"task-cancel",
132
),
133
schedule_task: tool(