@xynogen/pix-todo 0.1.23 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/todo.test.ts +4 -4
- package/src/todo.ts +2 -4
package/package.json
CHANGED
package/src/todo.test.ts
CHANGED
|
@@ -819,7 +819,7 @@ describe("todo card layout", () => {
|
|
|
819
819
|
|
|
820
820
|
expect(rendered).toContain("1. alpha");
|
|
821
821
|
expect(rendered).toContain("[muted]○[/]");
|
|
822
|
-
expect(rendered).not.toContain("[success]✓[/] [toolTitle]<b>todo</b>[/]");
|
|
822
|
+
expect(rendered).not.toContain("[success]✓ [/] [toolTitle]<b>todo</b>[/]");
|
|
823
823
|
});
|
|
824
824
|
|
|
825
825
|
test("failed todo actions render their exact error", async () => {
|
|
@@ -860,7 +860,7 @@ describe("todo card layout", () => {
|
|
|
860
860
|
expect(result.details).toBeDefined();
|
|
861
861
|
expect(lines).toHaveLength(1);
|
|
862
862
|
expect(lines[0]?.trimEnd()).toBe(
|
|
863
|
-
"[success]✓[/] [toolTitle]<b>todo</b>[/] [muted]#2 todo renderer[/] [dim]·[/] [dim]1/2 done[/]",
|
|
863
|
+
"[success]✓ [/] [toolTitle]<b>todo</b>[/] [muted]#2 todo renderer[/] [dim]·[/] [dim]1/2 done[/]",
|
|
864
864
|
);
|
|
865
865
|
});
|
|
866
866
|
});
|
|
@@ -891,7 +891,7 @@ describe("renderResult snapshot isolation", () => {
|
|
|
891
891
|
describe("renderTodoSummaryLine (collapsed one-liner)", () => {
|
|
892
892
|
test("empty list renders a compact tool row", () => {
|
|
893
893
|
expect(renderTodoSummaryLine([], tagTheme)).toBe(
|
|
894
|
-
"[success]✓[/] [toolTitle]<b>todo</b>[/] [muted]empty[/]",
|
|
894
|
+
"[success]✓ [/] [toolTitle]<b>todo</b>[/] [muted]empty[/]",
|
|
895
895
|
);
|
|
896
896
|
});
|
|
897
897
|
|
|
@@ -901,7 +901,7 @@ describe("renderTodoSummaryLine (collapsed one-liner)", () => {
|
|
|
901
901
|
{ id: 2, text: "b", status: "in_progress" },
|
|
902
902
|
];
|
|
903
903
|
expect(renderTodoSummaryLine(items, tagTheme)).toBe(
|
|
904
|
-
"[success]✓[/] [toolTitle]<b>todo</b>[/] [muted]#2 b[/] [dim]·[/] [dim]1/2 done[/]",
|
|
904
|
+
"[success]✓ [/] [toolTitle]<b>todo</b>[/] [muted]#2 b[/] [dim]·[/] [dim]1/2 done[/]",
|
|
905
905
|
);
|
|
906
906
|
});
|
|
907
907
|
});
|
package/src/todo.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
13
13
|
import { Text } from "@earendil-works/pi-tui";
|
|
14
14
|
import { icon } from "@xynogen/pix-pretty/icon-catalog";
|
|
15
|
-
import { formatCollapsedToolRow } from "@xynogen/pix-pretty/utils";
|
|
15
|
+
import { dotJoin, formatCollapsedToolRow } from "@xynogen/pix-pretty/utils";
|
|
16
16
|
import { type CollapseState, tickCollapse } from "@xynogen/pix-runtime/collapse";
|
|
17
17
|
import { once } from "@xynogen/pix-runtime/once";
|
|
18
18
|
import { Type } from "typebox";
|
|
@@ -64,9 +64,7 @@ export function renderTodoSummaryLine(items: TodoItem[], theme: TodoTheme): stri
|
|
|
64
64
|
const done = items.filter((t) => t.status === "done").length;
|
|
65
65
|
const active = items.find((t) => t.status === "in_progress");
|
|
66
66
|
const blocked = items.filter((t) => t.status === "blocked").length;
|
|
67
|
-
const meta = [`${done}/${items.length} done`, blocked > 0
|
|
68
|
-
.filter(Boolean)
|
|
69
|
-
.join(" · ");
|
|
67
|
+
const meta = dotJoin([`${done}/${items.length} done`, blocked > 0 && `${blocked} blocked`]);
|
|
70
68
|
const target = active
|
|
71
69
|
? `#${active.id} ${active.text}`
|
|
72
70
|
: done === items.length
|