@xynogen/pix-todo 0.1.24 → 0.1.26
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 +2 -2
- package/src/todo.test.ts +7 -0
- package/src/todo.ts +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xynogen/pix-todo",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "Pi tool — durable execution checklist (todo)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@xynogen/pix-data": "^0.4.3",
|
|
38
38
|
"@xynogen/pix-pretty": "^1.11.2",
|
|
39
|
-
"@xynogen/pix-runtime": "^0.
|
|
39
|
+
"@xynogen/pix-runtime": "^0.7.0",
|
|
40
40
|
"typebox": "^1.1.38"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
package/src/todo.test.ts
CHANGED
|
@@ -895,6 +895,13 @@ describe("renderTodoSummaryLine (collapsed one-liner)", () => {
|
|
|
895
895
|
);
|
|
896
896
|
});
|
|
897
897
|
|
|
898
|
+
test("uses warning status when work is blocked", () => {
|
|
899
|
+
const items: TodoItem[] = [{ id: 1, text: "Need approval", status: "blocked" }];
|
|
900
|
+
expect(renderTodoSummaryLine(items, tagTheme)).toBe(
|
|
901
|
+
"[warning]⚠ [/] [toolTitle]<b>todo</b>[/] [muted]checklist[/] [dim]·[/] [dim]0/1 done · 1 blocked[/]",
|
|
902
|
+
);
|
|
903
|
+
});
|
|
904
|
+
|
|
898
905
|
test("renders active work and progress in one row", () => {
|
|
899
906
|
const items: TodoItem[] = [
|
|
900
907
|
{ id: 1, text: "a", status: "done" },
|
package/src/todo.ts
CHANGED
|
@@ -70,7 +70,10 @@ export function renderTodoSummaryLine(items: TodoItem[], theme: TodoTheme): stri
|
|
|
70
70
|
: done === items.length
|
|
71
71
|
? "complete"
|
|
72
72
|
: "checklist";
|
|
73
|
-
|
|
73
|
+
// Blocked work with nothing active is not a success — surface the warning glyph
|
|
74
|
+
// (text meta already names the block count) so status is not color-only.
|
|
75
|
+
const status = blocked > 0 && !active && done !== items.length ? "warning" : "success";
|
|
76
|
+
return formatCollapsedToolRow(theme, "todo", target, meta, status);
|
|
74
77
|
}
|
|
75
78
|
|
|
76
79
|
/** Colored checklist for the TUI: glyphs tinted by status, active row bold. */
|