From 362a4488485633c10f76d743fd123c99c3eee682 Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Wed, 17 Jun 2026 09:58:03 +0200 Subject: [PATCH] docs(model): clarify the switchTo last-good reset comment --- src/composables/useMacroplan.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/composables/useMacroplan.ts b/src/composables/useMacroplan.ts index b91fea9..f0e5027 100644 --- a/src/composables/useMacroplan.ts +++ b/src/composables/useMacroplan.ts @@ -119,8 +119,9 @@ export function useMacroplan() { // Persist the whole library on any change (best-effort, like the old autosave). watch(lib, (l) => save(l), { deep: true }) - // Switching plans drops the prior render so a broken target shows its own - // error/empty state, not the previous plan's grid. + // Reset last-good to the target plan's current parse (null if it's broken), + // so switching to a broken plan shows its own error/empty state rather than + // the previous plan's grid. function switchTo(id: string): void { lib.value.activeId = id lastGood.value = parsed.value.plan