Skip to content

Commit 368965a

Browse files
add comment about introduced updateActiveTree frontend only action
1 parent 777f39f commit 368965a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

frontend/javascripts/viewer/model/sagas/volume/update_actions.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,17 @@ export function updateActiveNode(tracing: {
474474
} as const;
475475
}
476476

477+
// Should never be sent to the backend as the backend does neither understand this action
478+
// nor does it have the property activeTreeId for a skeletonTracing.
479+
// Only used to correctly keep track of the active tree property during rebasing.
480+
// Reason: There is a mismatch between the frontend store actions and the update actions.
481+
// The store action createTree also sets the activeNodeId and activeTreeId, but the update action createTree does not.
482+
// If we would change that via also applying activeNodeId and activeTreeId for createTree update actions
483+
// this breaks the deleteEdge store action: This store action maps to the following update actions:
484+
// createTree, moveTreeComponents, deleteEdge. Where the createTree update action should not
485+
// set activeNodeId and activeTreeId when applied. Therefore, this action tracks whether the activeTreeId should change.
486+
// Tracking of activeNodeId is already handled by updateActiveNode (see above). This action is understood by the backend.
487+
// So no problem there.
477488
export function updateActiveTree(tracing: {
478489
tracingId: string;
479490
activeTreeId: number | null | undefined;

0 commit comments

Comments
 (0)