mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-05 01:50:27 +08:00
Fixed the issue where accessing the React frontend via ccw view with a URL path parameter would load a different workspace due to localStorage rehydration race condition. Root cause: zustand persist's onRehydrateStorage callback automatically called switchWorkspace with the cached projectPath before AppShell could process the URL parameter. Changes: - workflowStore.ts: Remove automatic switchWorkspace from onRehydrateStorage - AppShell.tsx: Centralize initialization logic with clear priority order: * Priority 1: URL ?path= parameter (explicit user intent) * Priority 2: localStorage fallback (implicit cache) * Added isWorkspaceInitialized state lock to prevent duplicate execution Fixes: URL showing ?path=/new/path but loading /old/path from cache