From 132fc1d557e8bbe9ae2fa333a1dffe827a489bba Mon Sep 17 00:00:00 2001 From: Naoyuki Sogo Date: Thu, 12 Mar 2026 22:38:43 +0900 Subject: [PATCH 01/26] Fix restart (#99) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * runProject is allowed when project status is stopped, finished, failed, and unknown * fix loop restart: correctly detect and resume stopped loops - In _loopHandler: detect restart when state is 'running' (not just 'not-started'), since stopped projects leave loop components with state='running' on disk - In _loopHandler restart path: use currentIndex (the interrupted iteration) instead of prevIndex (the already-finished iteration) when looking up the instance directory to resume from - In _PSHandler: same fix — detect restart when state is 'running' or 'not-started' Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: sanitize staged wheel.json state before restart commit When a project restarts, gitCommit was committing execution states (stopped/failed/running) that were staged in *.wheel.json files. Add sanitizeStagedJsonFiles() which, before the restart gitCommit: 1. Finds all staged *.wheel.json files via gitStatus 2. Saves their original content 3. Writes a sanitized version (state set to 'not-started') and re-stages After gitCommit, restoreSanitizedJsonFiles() writes the originals back to the working tree, so: - HEAD has clean 'not-started' state - Index matches HEAD (no staged changes) - Working tree retains original content (currentIndex etc. intact for loop restart logic) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * do not call git add after project state changed when project execution starts * - Change project status color to red when it stopped by task-failed - show failed task list on hover to status field * fix bug * [skip ci] update version number * update document about restarting --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: version-number-updater[bot] --- client/src/components/Workflow.vue | 38 +++- common/allowedOperations.cjs | 8 +- .../3_workflow_screen/1_graphview.md | 37 +++- .../_reference/4_component/03_For.md | 6 + .../_reference/4_component/04_while.md | 6 + .../_reference/4_component/05_Foreach.md | 6 + .../_reference/4_component/06_PS.md | 6 + server/app/core/componentJsonIO.js | 2 +- server/app/core/dispatcher.js | 10 +- server/app/core/projectController.js | 23 +- server/app/core/projectFilesOperator.js | 86 +++++++- server/app/db/version.json | 2 +- server/app/handlers/projectController.js | 10 +- server/test/app/core/projectFilesOperator.js | 206 ++++++++++++++++++ server/test/app/core/restart.js | 13 ++ .../testFiles/restart_for_running_state.tgz | Bin 0 -> 21343 bytes 16 files changed, 422 insertions(+), 37 deletions(-) create mode 100644 server/test/testFiles/restart_for_running_state.tgz diff --git a/client/src/components/Workflow.vue b/client/src/components/Workflow.vue index 695d8440e..2411e62ee 100644 --- a/client/src/components/Workflow.vue +++ b/client/src/components/Workflow.vue @@ -23,15 +23,24 @@ {{ projectJson !== null ? projectJson.name : "" }} - - status: {{ projectState }}{{ isReadOnly }} - + + Failed tasks:
{{ failedTaskPaths.join('\n') }}
+