diff --git a/CHANGELOG.md b/CHANGELOG.md index 28e4c08..c918e9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Manual new project button (2026-06-16) + +### Added +- Sidebar **New project** button (`addProject`) - creates a blank project and opens the detail sheet for naming and adding tasks, with no assistant or chat required. + +### Reasoning +- Tasks and subtasks could already be added manually under existing projects via the detail sheet; top-level projects were only reachable through the assistant or transcript flows. + ## Remove sample-data flash on load (2026-06-16) ### Changed diff --git a/index.html b/index.html index a881025..dca73ca 100644 --- a/index.html +++ b/index.html @@ -654,6 +654,9 @@ + diff --git a/src/app/main.js b/src/app/main.js index 553a100..3efad79 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -819,6 +819,15 @@ function addChild(id){ const el=document.getElementById("dSubNew"), v=el.value.t if(findPath(id).length>=3) return; // subtasks can't have children snap(); const n=findPath(id).pop(); n.children.push(T(cap1(v),n.owner,{d:n.due||null})); renderAll(); openDetail(id); } +function addProject(){ + snap(); + const proj=T("New project","fd",{open:true}); + DATA.push(proj); + renderAll(); + openDetail(proj.id); + const ti=document.getElementById("dTitle"); + if(ti){ ti.focus(); ti.select(); } +} function openDetail(id){ const path=findPath(id); if(!path) return; const n=path[path.length-1], leaf=!n.children.length; @@ -1518,7 +1527,7 @@ const _globals = { toggleFlyout, toggleFocus, toggleShowDone, toggleSubs, closeCapture, toggleCapLang, minimizeCapture, sendTurn, restoreCapture, skipKey, saveKey, clearKey, closeTranscript, runTranscript, closeReview, closeTeam, closeSheet, setFilter, setScaleView, ding, toggleDone, openDetail, setZoom, setGView, - toggleExp, updTask, refreshBarMenu, addChild, deleteTask, addCapTask, barDown, barContext, pickSearch, + toggleExp, updTask, refreshBarMenu, addChild, addProject, deleteTask, addCapTask, barDown, barContext, pickSearch, uploadPhoto, removePhoto, rvToggle, rvText, rvOwner, rvDue, rvSize, pushApproved, attachTranscript, doSearch, refreshCard, delCapTask, setTask, setTaskOwner, setTaskSize, setSub, setSubOwner, addSub, delSub, commitCapture, toggleListen, stopListen, renderAll, moveTask, setKeyVal, diff --git a/tests/smoke.test.js b/tests/smoke.test.js index 29f0c06..a3f9aa0 100644 --- a/tests/smoke.test.js +++ b/tests/smoke.test.js @@ -6,6 +6,7 @@ describe("project layout", () => { const html = readFileSync("index.html", "utf8"); expect(html).toContain('