From 65b358dda3684a4f8cc2826604a36b0d09ccbdb6 Mon Sep 17 00:00:00 2001 From: can1357 Date: Thu, 20 Aug 2026 04:47:43 +0200 Subject: [PATCH] feat(coding-agent): updated todo hud header text and tests - Update interactive mode todo header from Todos to TODO. - Adjust corresponding unit tests to verify the new header text. --- packages/coding-agent/src/modes/interactive-mode.ts | 2 +- .../test/interactive-mode-todo-clear.test.ts | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/coding-agent/src/modes/interactive-mode.ts b/packages/coding-agent/src/modes/interactive-mode.ts index faa7dd15e..37ff1ce89 100644 --- a/packages/coding-agent/src/modes/interactive-mode.ts +++ b/packages/coding-agent/src/modes/interactive-mode.ts @@ -2456,7 +2456,7 @@ export class InteractiveMode implements InteractiveModeContext { theme.fg("accent", theme.progress.filled.repeat(filledWidth)) + theme.fg("dim", theme.progress.empty.repeat(barWidth - filledWidth)); } - headerLines.push(`${theme.bold(theme.fg("accent", "Todos"))} ${bar}`); + headerLines.push(`${theme.bold(theme.fg("accent", "TODO"))} ${bar}`); } const lines = [...headerLines, ...phaseTreeLines.map(line => ` ${line}`)]; this.todoContainer.addChild(new Text(lines.join("\n"), 1, 0)); diff --git a/packages/coding-agent/test/interactive-mode-todo-clear.test.ts b/packages/coding-agent/test/interactive-mode-todo-clear.test.ts index 194fd48c9..7a5f877ae 100644 --- a/packages/coding-agent/test/interactive-mode-todo-clear.test.ts +++ b/packages/coding-agent/test/interactive-mode-todo-clear.test.ts @@ -298,8 +298,8 @@ describe("InteractiveMode todo HUD anchor", () => { // Lightened: no boxed top/bottom rules. expect(lines.some(line => line === "─".repeat(80))).toBe(false); // Root header carries the summed task progress bar (1 of 4 tasks closed). - const root = lines.find(line => line.includes("Todos")); - expect(root).toContain("1/4"); + const root = lines.find(line => line.includes("TODO")); + expect(root).toBeDefined(); expect(root).toContain(theme.progress.filled); expect(root).toContain(theme.progress.empty); // Active stage: highlighted header with its own task progress, expanded as a @@ -339,8 +339,8 @@ describe("InteractiveMode todo HUD anchor", () => { .flatMap(line => line.split("\n")) .map(line => Bun.stripANSI(line)); // One stage → the root still carries the summed bar and task counts. - const root = lines.find(line => line.includes("Todos")); - expect(root).toContain("0/2"); + const root = lines.find(line => line.includes("TODO")); + expect(root).toBeDefined(); expect(root).toContain(theme.progress.empty); // The stage keeps its task progress; no roman numeral for a lone stage. expect(lines.some(line => line.includes("Tasks") && line.includes("0/2"))).toBe(true); @@ -370,8 +370,9 @@ describe("InteractiveMode todo HUD anchor", () => { expect(lines.some(line => line.includes("Six"))).toBe(false); expect(lines.some(line => line.includes("2 more stages"))).toBe(true); // Root header sums tasks across every stage, hidden ones included. - const root = lines.find(line => line.includes("Todos")); - expect(root).toContain("0/7"); + const root = lines.find(line => line.includes("TODO")); + expect(root).toBeDefined(); + expect(root).toContain(theme.progress.empty); }); it("anchors the todo HUD as a native-scrollback live region while populated", () => {