Repository: kestra-io/kestra
Issue: Disable the expand/collapse functionality on the `ForEachItem` subflow or fix the topology view so that child tasks of the subflow are displayed
Labels: bug

### Explain the bug

The expand/collapse is broken on the `ForEachItem`. Technically it could even be disabled as it triggers multiple executions, not task runs. 

![image](https://github.com/kestra-io/kestra/assets/86264395/948d2bbc-829a-4689-aa28-5b3c6a60cc69)





Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/package-lock.json b/ui/package-lock.json
index 58d6050780..5db53a906f 100644
--- a/ui/package-lock.json
+++ b/ui/package-lock.json
@@ -8,7 +8,7 @@
       "name": "kestra",
       "version": "0.1.0",
       "dependencies": {
-        "@kestra-io/ui-libs": "^0.0.29",
+        "@kestra-io/ui-libs": "^0.0.30",
         "@popperjs/core": "npm:@sxzz/popperjs-es@2.11.7",
         "@vue-flow/background": "^1.2.0",
         "@vue-flow/controls": "1.0.6",
@@ -632,9 +632,9 @@
       "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg=="
     },
     "node_modules/@kestra-io/ui-libs": {
-      "version": "0.0.29",
-      "resolved": "https://registry.npmjs.org/@kestra-io/ui-libs/-/ui-libs-0.0.29.tgz",
-      "integrity": "sha512-ZVWQ5k1M0C4ZMCoparMBAOWdtQ0CMKaDdeQz8y/yqNKxtekGl3bOnSFvzwTotGzHhjC+6B77192IgefQTp9faw==",
+      "version": "0.0.30",
+      "resolved": "https://registry.npmjs.org/@kestra-io/ui-libs/-/ui-libs-0.0.30.tgz",
+      "integrity": "sha512-Ni3Dl/wU+SuEbnomUl9qj2RRxnGKTvpt5Zis+EBqf3fC/lvUUDRYRYJWiZtHLk9yC8ZuMfas2NUT6vWzR1M82Q==",
       "peerDependencies": {
         "@vue-flow/background": "^1.2.0",
         "@vue-flow/controls": "1.0.6",
diff --git a/ui/package.json b/ui/package.json
index a8b738bf0b..10baa4a75c 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -11,7 +11,7 @@
     "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs --fix --ignore-path ../.gitignore"
   },
   "dependencies": {
-    "@kestra-io/ui-libs": "^0.0.29",
+    "@kestra-io/ui-libs": "^0.0.30",
     "@popperjs/core": "npm:@sxzz/popperjs-es@2.11.7",
     "@vue-flow/background": "^1.2.0",
     "@vue-flow/controls": "1.0.6",
diff --git a/ui/src/components/executions/Topology.vue b/ui/src/components/executions/Topology.vue
index d4f7b29010..29cd4a1e83 100644
--- a/ui/src/components/executions/Topology.vue
+++ b/ui/src/components/executions/Topology.vue
@@ -26,6 +26,7 @@
     import {mapGetters, mapState} from "vuex";
     import {CLUSTER_PREFIX} from "@kestra-io/ui-libs/src/utils/constants";
     import Utils from "@kestra-io/ui-libs/src/utils/Utils";
+    import STATE from "../../utils/state";
     export default {
         components: {
             LowCodeEditor
@@ -189,10 +190,17 @@
                     return;
                 }
 
-                const executionId = parentExecution.taskRunList
-                    .filter(taskRun => taskRun.taskId === Utils.afterLastDot(subflow) && taskRun.outputs?.executionId)?.[0]?.outputs?.executionId;
+                const taskIdMatchingTaskrun = parentExecution.taskRunList
+                    .filter(taskRun => taskRun.taskId === Utils.afterLastDot(subflow))?.[0];
+                const executionId = taskIdMatchingTaskrun?.outputs?.executionId;
 
                 if(!executionId) {
+                    if(taskIdMatchingTaskrun?.state?.current === STATE.SUCCESS) {
+                        // Generating more than 1 subflow execution, we're not showing anything
+                        this.loadGraph(true);
+                        return;
+                    }
+
                     this.delaySSE(generateGraphOnWaiting, subflow);
                     return;
                 }


Test patch: