From 73d0edb87372e6aeb5ac53d5dcfe9ded9259fe8f Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 5 Jan 2026 16:01:41 +0100 Subject: [PATCH] refactor: move setIsGenerationRunning(false) outside if block MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address PR review feedback - ensure isGenerationRunning is always reset to false when generation is not running, even if api.specRegeneration is not available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../src/components/views/spec-view/hooks/use-spec-loading.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/ui/src/components/views/spec-view/hooks/use-spec-loading.ts b/apps/ui/src/components/views/spec-view/hooks/use-spec-loading.ts index d90c3148..52826020 100644 --- a/apps/ui/src/components/views/spec-view/hooks/use-spec-loading.ts +++ b/apps/ui/src/components/views/spec-view/hooks/use-spec-loading.ts @@ -28,8 +28,9 @@ export function useSpecLoading() { setIsLoading(false); return; } - setIsGenerationRunning(false); } + // Always reset when generation is not running (handles edge case where api.specRegeneration might not be available) + setIsGenerationRunning(false); const result = await api.readFile(`${currentProject.path}/.automaker/app_spec.txt`);