rfellows commented on code in PR #11822:
URL: https://github.com/apache/nifi/pull/11822#discussion_r4329922090


##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/connectors/state/connector-canvas/connector-canvas.reducer.ts:
##########
@@ -71,21 +124,43 @@ export const connectorCanvasReducer = createReducer(
             processGroupId,
             parentProcessGroupId,
             breadcrumb,
-            labels,
-            funnels,
-            inputPorts,
-            outputPorts,
-            remoteProcessGroups,
-            processGroups,
-            processors,
-            connections,
+            labels: processComponentCollection(labels, state.labels, 
state.addedCache, state.removedCache),
+            funnels: processComponentCollection(funnels, state.funnels, 
state.addedCache, state.removedCache),
+            inputPorts: processComponentCollection(inputPorts, 
state.inputPorts, state.addedCache, state.removedCache),
+            outputPorts: processComponentCollection(
+                outputPorts,
+                state.outputPorts,
+                state.addedCache,
+                state.removedCache
+            ),
+            remoteProcessGroups: processComponentCollection(
+                remoteProcessGroups,
+                state.remoteProcessGroups,
+                state.addedCache,
+                state.removedCache
+            ),
+            processGroups: processComponentCollection(
+                processGroups,
+                state.processGroups,
+                state.addedCache,
+                state.removedCache
+            ),
+            processors: processComponentCollection(processors, 
state.processors, state.addedCache, state.removedCache),
+            connections: processComponentCollection(
+                connections,
+                state.connections,
+                state.addedCache,
+                state.removedCache
+            ),
+            addedCache: [],
+            removedCache: [],

Review Comment:
   **Non-blocking; a follow-up is reasonable:** `removedCache` protects 
optimistically moved components from the first stale flow response, but this 
clears every tombstone after that response even if the move request remains 
active. A second refresh could then restore the component in its source group, 
and `moveCanvasComponentsSuccess` only clears `saving`.
   
   The connector canvas currently keeps `canEdit` disabled, so this sequence 
cannot yet be exercised through the production UI. Before editing is enabled, 
could we either retain each tombstone until a post-move snapshot confirms that 
the component is absent, or track this reconciliation case for the effort that 
enables editing? A reducer test covering `move → stale load → stale load → move 
success` would capture the case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to