Portal Community

Two Stores, Separation of Concerns

StorePackageResponsibility
flowObserverPanelStoreflow-observer-corePanel UI state: active tab, dimensions, docked/floating, tab registry
executionStoreflow-observer-coreLive execution data: node statuses, logs, inspector data, timing

Why Two Stores?

Panel UI state and execution data change at different rates and for different reasons:

Package Boundary

// Tab components import from flow-observer-core ONLY
// They do NOT import from flow-studio-services directly

// Correct:
import { useFlowObserverPanelStore } from '@flow-observer-core/stores/flowObserverPanelStore';
import { useExecutionStore }          from '@flow-observer-core/stores/executionStore';

// Incorrect — breaks the package boundary:
import { useWorkflowStore } from '@flow-studio-services/stores/workflowStore';

Data Flow

[Backend SignalR Hub]
       │
       │ NodeStatusChanged, NodeLogEmitted, ExecutionCompleted
       ▼
[useExecutionSignalR hook]
       │ writes to both stores:
       ├──► executionStore.setNodeStatus(...)
       ├──► executionStore.appendLog(...)
       └──► designerModeStore.setNodeStatus(...)   ← canvas overlay sync