Self-hosted, sharable kanban for humans and agents. One 4.7 MB binary, 5 MB of RAM, 10 to 60 tokens per agent reply, starts in 3 ms, zero setup.
Rust ai-agentsclaude-codeclicodexcoding-agentskanbanlocal-firstmcpmcp-servermodel-context-protocolproductivityproject-managementraspberry-pirustself-hostedsqlitetask-manager
Move a task to another project from its panel
emanuele-em6965a8a11e9b
diff --git a/src/app.js b/src/app.jsindex 75817bf..43f1897 100644--- a/src/app.js+++ b/src/app.js@@ -563,9 +563,8 @@ async function refreshTask() {const { task, comments } = data;panelTask = task;$("#p-key").textContent = key(task);- $("#p-project").replaceChildren(el("span", { class: "tag" },- el("span", { class: "dot", style: `background:${projectColor(task.project)}` }), task.project));- // Never overwrite what is being typed.+ // Never overwrite what is being typed or picked.+ if (!$("#p-project").contains(document.activeElement)) renderProjectPick(task);for (const [field, value] of [[$("#p-title"), task.title], [$("#p-desc"), task.description]]) {if (document.activeElement !== field) { field.value = value; fit(field); }}@@ -584,6 +583,21 @@ async function refreshTask() {}));}+// The project tag doubles as a picker that moves the task to another project.+function renderProjectPick(task) {+ const projects = state.board ? state.board.projects.map((p) => p.slug) : [];+ if (!projects.includes(task.project)) projects.push(task.project);+ const select = el("select", { title: "Project", "aria-label": "Project" },+ ...projects.map((slug) => el("option", { value: slug }, slug)));+ select.value = task.project;+ select.addEventListener("change", () => {+ try { localStorage.setItem("kanzo.newTaskProject", select.value); } catch {}+ patchTask({ project: select.value });+ });+ $("#p-project").replaceChildren(el("label", { class: "tag project-pick" },+ el("span", { class: "dot", style: `background:${projectColor(task.project)}` }), select));+}+// Textareas grow with their text instead of scrolling.function fit(t) {t.style.height = "auto";diff --git a/src/index.html b/src/index.htmlindex 33e1544..9a03bd9 100644--- a/src/index.html+++ b/src/index.html@@ -149,6 +149,14 @@ header .sub a { color: inherit; }z-index: 10;}.panel.shown { transform: none; }+/* The project, shown as a tag; picking another one moves the task. */+.panel .project-pick { position: relative; }+.panel .project-pick select {+ appearance: none; -webkit-appearance: none; border: 0; background: none; padding: 0 2px 0 0; margin: 0;+ font-size: inherit; color: inherit; cursor: pointer; outline: none; field-sizing: content;+}+.panel .project-pick:hover, .panel .project-pick:focus-within { border-color: var(--faint); }+.panel .top select { width: auto; padding: 2px 6px; font-size: 12.5px; }.panel .top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }.panel .top .key { color: var(--muted); }.panel .top .spacer { flex: 1; }diff --git a/src/mcp.rs b/src/mcp.rsindex eb03513..c100e35 100644--- a/src/mcp.rs+++ b/src/mcp.rs@@ -326,8 +326,10 @@ impl Kanzo {.run(move |_, store| {let before = args.id.find(store)?;let status = args.status.map(|s| s.trim().to_ascii_lowercase());- let after = store- .update_task(before.id, TaskPatch { title: args.title, description: args.description, status })?;+ let after = store.update_task(+ before.id,+ TaskPatch { title: args.title, description: args.description, status, project_id: None },+ )?;let moved = if before.status != after.status {format!(", {} -> {}", before.status, after.status)} else {diff --git a/src/store.rs b/src/store.rsindex 469af02..0fa9703 100644--- a/src/store.rs+++ b/src/store.rs@@ -99,6 +99,8 @@ pub struct TaskPatch {pub title: Option<String>,pub description: Option<String>,pub status: Option<String>,+ /// Moves the task to this project (by id).+ pub project_id: Option<i64>,}pub struct Store {@@ -413,6 +415,12 @@ impl Store {params![title, id],)?;}+ if let Some(p) = patch.project_id {+ c.execute(+ &format!("UPDATE tasks SET project_id = ?1, updated_at = {NOW} WHERE id = ?2 AND project_id <> ?1"),+ params![p, id],+ )?;+ }if let Some(d) = &patch.description {c.execute(&format!("UPDATE tasks SET description = ?1, updated_at = {NOW} WHERE id = ?2"),@@ -678,6 +686,10 @@ mod tests {assert_eq!((t.title.as_str(), t.status.as_str()), ("Fix login bug", "review"));assert!(s.update_task(t.id, TaskPatch { status: Some("nope".into()), ..Default::default() }).is_err());assert!(s.update_task(t.id, TaskPatch { title: Some(" ".into()), ..Default::default() }).is_err());+ let web = s.create_project("web", "", None).unwrap();+ let moved = s.update_task(t.id, TaskPatch { project_id: Some(web.id), ..Default::default() }).unwrap();+ assert_eq!((moved.key(), moved.status.as_str()), (format!("web#{}", t.id), "review"));+ let t = s.update_task(t.id, TaskPatch { project_id: Some(p.id), ..Default::default() }).unwrap();s.add_comment(t.id, "claude-code", "Done, see PR").unwrap();s.add_comment(t.id, "", "thanks").unwrap();diff --git a/src/web.rs b/src/web.rsindex 8f37058..79b8955 100644--- a/src/web.rs+++ b/src/web.rs@@ -311,11 +311,13 @@ struct Patch {title: Option<String>,description: Option<String>,status: Option<String>,+ project: Option<String>,}async fn update_task(State(home): Shared, Path(id): Path<i64>, Json(p): Json<Patch>) -> Response {with_store(home, move |_, s| {- s.update_task(id, TaskPatch { title: p.title, description: p.description, status: p.status })+ let project_id = p.project.map(|slug| s.find_project(&slug)).transpose()?.map(|p| p.id);+ s.update_task(id, TaskPatch { title: p.title, description: p.description, status: p.status, project_id })}).await}