Merge workflow-related store slices in `workingGraph`
I already mentioned that the complexity of the store with its intertwined slices should be refactored to ease the re-introduction of the undo-redo (and for easier understanding in general).
I already took some decisive actions in !306 (merged), !321 (merged) but there is more to be done in my opinion.
The GraphDetails
of a workflow does not have a single source of truth: it is held both by workingGraph.graph
from workingGraph
slice and by graphInfo
from the graphInfo
slice.
Note that with subgraphs, there is some discrepancy between the two (that I cannot grasp) that is visibly used many times to check if we are in a subgraph. I think this can be done in a more explicit fashion.
Based on that, I wish that workingGraph
would be the single source of truth for all graph-related fields. Even the CurrentWorkflowId
store I introduced in !308 (merged) to restore workflows when switching pages could be simply derived from workingGraph
.
Once this is achieved, I envision to leverage this single source of truth as the basis of the undo-redo via store subscription.