project task view movement

This commit is contained in:
Ian Gulliver
2026-10-16 10:58:39 -07:00
parent fa143367d0
commit 07780b8701
4 changed files with 22 additions and 6 deletions
+9 -2
View File
@@ -100,6 +100,13 @@ function nested(active) {
}
return out;
}
const busyStates = new Set(["running", "reviewing", "merging", "discarding"]);
function stateMark(s) {
if (s !== undefined && busyStates.has(s)) {
return h("span", { class: "spinner", title: s });
}
return h("span", { class: `dot ${s ?? "none"}`, title: s ?? "no session" });
}
function tasksBlock(active) {
if (active.length === 0) {
return h("p", { class: "empty-row" }, "No active tasks.");
@@ -114,7 +121,7 @@ function tasksBlock(active) {
e.preventDefault();
focusTask(task.id);
},
}, task.parent_task_id !== undefined && h("span", { class: "subtask-mark", title: `Subtask of ${findTask(task.parent_task_id)?.title ?? task.parent_task_id}` }, "↳"), h("span", { class: `dot ${ts ?? "none"}`, title: ts ?? "no session" }), h("span", { class: "task-title task-name" }, task.title), count > 0 && h("span", { class: "badge", title: "inbox items" }, count), task.merge_queued_at !== undefined && h("span", { class: "task-state warn", title: "Waiting for the merge in progress in this project to finish" }, "merge held"), task.merging_into_parent && h("span", { class: "task-state warn", title: "Waiting for the parent task's agent to merge it" }, "merging into parent"), h("span", { class: "task-state" }, ts ?? "no agent")));
}, task.parent_task_id !== undefined && h("span", { class: "subtask-mark", title: `Subtask of ${findTask(task.parent_task_id)?.title ?? task.parent_task_id}` }, "↳"), stateMark(ts), h("span", { class: "task-title task-name" }, task.title), count > 0 && h("span", { class: "badge", title: "inbox items" }, count), task.merge_queued_at !== undefined && h("span", { class: "task-state warn", title: "Waiting for the merge in progress in this project to finish" }, "merge held"), task.merging_into_parent && h("span", { class: "task-state warn", title: "Waiting for the parent task's agent to merge it" }, "merging into parent"), h("span", { class: "task-state" }, ts ?? "no agent")));
}));
}
function todoBlock(project, todo, active, starting, start) {
@@ -153,7 +160,7 @@ function todoBlock(project, todo, active, starting, start) {
e.preventDefault();
focusTask(task.id);
},
}, h("span", { class: `dot ${sess?.state ?? "none"}`, title: sess?.state ?? "no session" }), sess?.state ?? "no agent");
}, stateMark(sess?.state), sess?.state ?? "no agent");
}
else {
const busy = starting.has(`${project.id}\n${item.title}`);