From c50fb32610e543dac13b9f39d12ebb58b1db80f0 Mon Sep 17 00:00:00 2001 From: savinay1986 Date: Sat, 21 Mar 2026 20:31:06 +0530 Subject: [PATCH] fix: persist workflow step across browser sessions via localStorage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closing and reopening the browser tab reset the 5-step workflow to Step 1, losing the user's progress even though all project data was safely persisted on the backend. Root cause: `currentStep` in MainView.vue was a plain in-memory Vue ref (ref(1)) with no persistence layer. loadProject() correctly restored currentPhase from the backend project status but never restored currentStep. Fix: - Add a watch() on currentStep that writes to localStorage under key `mirofish_step_{projectId}` on every change - In loadProject(), read back from localStorage after restoring phase — so the user returns to exactly the step they left - In updatePhaseByStatus(), advance currentStep to 2 when status is graph_completed (fallback for first-time reload with no localStorage entry, avoids landing on Step 1 with a built graph) Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/views/MainView.vue | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/MainView.vue b/frontend/src/views/MainView.vue index 8c6a120..9674ffe 100644 --- a/frontend/src/views/MainView.vue +++ b/frontend/src/views/MainView.vue @@ -75,7 +75,7 @@