From 3338bcad6ee5507df5627a6c8d34a7b1a0fe89c3 Mon Sep 17 00:00:00 2001 From: Mark Rai Date: Wed, 25 Mar 2026 11:23:27 -0400 Subject: [PATCH] bugfix: workflow lane add button introduced Signed-off-by: Mark Rai --- internal/httpapi/web/dist/views/projects.js | 13 +++++++++---- internal/httpapi/web/modules/views/projects.ts | 13 +++++++++---- internal/version/version.go | 2 +- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/internal/httpapi/web/dist/views/projects.js b/internal/httpapi/web/dist/views/projects.js index 5d64e81..8c5e25c 100644 --- a/internal/httpapi/web/dist/views/projects.js +++ b/internal/httpapi/web/dist/views/projects.js @@ -110,8 +110,9 @@ function renderWorkflowEditorBody(lanes, listId = "workflowModalLaneList", ghost `).join("")} -
- +
+ +
`; } @@ -183,6 +184,7 @@ function createWorkflowEditorRenderer() { onLanesChange(); }); }); + const ghostAddBtn = container.querySelector("#workflowModalGhostAdd"); if (ghostInput) { const commitGhostLane = () => { const text = (ghostInput.value || "").trim(); @@ -191,6 +193,10 @@ function createWorkflowEditorRenderer() { insertLaneBeforeDone(lanes, text); ghostInput.value = ""; onLanesChange(); + requestAnimationFrame(() => { + const next = container.querySelector(`#${ghostId}`); + next?.focus(); + }); }; ghostInput.addEventListener("keydown", (e) => { if (e.key === "Enter") { @@ -198,8 +204,7 @@ function createWorkflowEditorRenderer() { commitGhostLane(); } }); - ghostInput.addEventListener("input", () => { commitGhostLane(); }); - ghostInput.addEventListener("blur", () => { commitGhostLane(); }); + ghostAddBtn?.addEventListener("click", () => { commitGhostLane(); }); } if (list && typeof Sortable !== "undefined") { sortableInstance = Sortable.create(list, { diff --git a/internal/httpapi/web/modules/views/projects.ts b/internal/httpapi/web/modules/views/projects.ts index 827e2f5..d0908f1 100644 --- a/internal/httpapi/web/modules/views/projects.ts +++ b/internal/httpapi/web/modules/views/projects.ts @@ -131,8 +131,9 @@ function renderWorkflowEditorBody(
`).join("")} -
- +
+ +
`; } @@ -201,6 +202,7 @@ function createWorkflowEditorRenderer() { }); }); + const ghostAddBtn = container.querySelector("#workflowModalGhostAdd") as HTMLButtonElement | null; if (ghostInput) { const commitGhostLane = () => { const text = (ghostInput.value || "").trim(); @@ -208,12 +210,15 @@ function createWorkflowEditorRenderer() { insertLaneBeforeDone(lanes, text); ghostInput.value = ""; onLanesChange(); + requestAnimationFrame(() => { + const next = container.querySelector(`#${ghostId}`) as HTMLInputElement | null; + next?.focus(); + }); }; ghostInput.addEventListener("keydown", (e) => { if (e.key === "Enter") { e.preventDefault(); commitGhostLane(); } }); - ghostInput.addEventListener("input", () => { commitGhostLane(); }); - ghostInput.addEventListener("blur", () => { commitGhostLane(); }); + ghostAddBtn?.addEventListener("click", () => { commitGhostLane(); }); } if (list && typeof Sortable !== "undefined") { diff --git a/internal/version/version.go b/internal/version/version.go index a922c4c..b851cfc 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -8,7 +8,7 @@ package version // // Convention: Update when releasing (e.g., "1.0.0", "1.1.0"); match git tags // (e.g., tag "v1.0.0" should have Version = "1.0.0"). -const Version = "3.5.6" +const Version = "3.5.7" // ExportFormatVersion is the version of the backup/export data format. // Only increment this when the ExportData structure changes in a breaking way.