mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-08 06:30:04 +00:00
## Summary Adds the Pinia store for managing workflow drafts and a composable for tracking open workflow tabs per browser tab. Uses sessionStorage for tab-specific state to support multiple ComfyUI tabs without conflicts. ## Changes - **What**: - `workflowDraftStoreV2.ts` - Pinia store wrapping the LRU cache with save/load/remove operations - `useWorkflowTabState.ts` - Composable for tracking active workflow path and open tabs in sessionStorage (scoped by clientId) - **Why**: Browser tabs need independent workflow state, but the current system uses shared localStorage keys causing tab conflicts ## Review Focus - Store API design in `workflowDraftStoreV2.ts` - Session vs local storage split in `useWorkflowTabState.ts` --- *Part 3 of 4 in the workflow persistence improvements stack* --------- Co-authored-by: Amp <amp@ampcode.com>