feedback-to-code/mozzarella huggingface dataset:
Repository: kestra-io/kestra
Issue: Subtract one (the flow itself) from the Flow Dependencies count
Labels: bug

### Explain the bug

the subflow here has 2 dependencies, not 3:

![image](https://github.com/kestra-io/kestra/assets/86264395/ecf5a01a-3d6c-4bb6-a706-47a9390a6eb2)

we shouldn't count the flow itself (the child flow)

### Environment Information

- Kestra Version: 0.13.0

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/flows/FlowRoot.vue b/ui/src/components/flows/FlowRoot.vue
index 1091f9af1d..d92249e9ae 100644
--- a/ui/src/components/flows/FlowRoot.vue
+++ b/ui/src/components/flows/FlowRoot.vue
@@ -197,7 +197,7 @@
                         name: "dependencies",
                         component: FlowDependencies,
                         title: this.$t("dependencies"),
-                        count: this.depedenciesCount
+                        count: this.depedenciesCount===0?0:this.depedenciesCount-1
                     })
                 }
                 return tabs;


Test patch:
Repository: kestra-io/kestra
Issue: Namespace files structure doesn't starts with a leading '/'. Inconsistency with storage's current structure
Labels: bug

### Explain the bug

See [here](https://user-images.githubusercontent.com/37618489/281166071-ab889fc4-0c05-46c9-830f-5ed1bf2640a0.png)

### Environment Information

- Kestra Version:
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/core/src/main/java/io/kestra/core/storages/StorageInterface.java b/core/src/main/java/io/kestra/core/storages/StorageInterface.java
index 2d2ab16b1d..9ebeb93b57 100644
--- a/core/src/main/java/io/kestra/core/storages/StorageInterface.java
+++ b/core/src/main/java/io/kestra/core/storages/StorageInterface.java
@@ -163,10 +163,10 @@ default String cachePrefix(String namespace, String flowId, String taskId, @Null
     }
 
     default String namespaceFilePrefix(String namespace) {
-        return String.join("/", List.of(
+        return fromParts(
             namespace,
             "files"
-        ));
+        );
     }
 
     default Optional<String> extractExecutionId(URI path) {


Test patch:
diff --git a/core/src/test/java/io/kestra/core/storage/StorageInterfaceTest.java b/core/src/test/java/io/kestra/core/storage/StorageInterfaceTest.java
index 914d1068eb..271ff95162 100644
--- a/core/src/test/java/io/kestra/core/storage/StorageInterfaceTest.java
+++ b/core/src/test/java/io/kestra/core/storage/StorageInterfaceTest.java
@@ -86,6 +86,6 @@ void outputPrefix() {
     void namespaceFilePrefix() {
         var prefix = storageInterface.namespaceFilePrefix("io.namespace");
         assertThat(prefix, notNullValue());
-        assertThat(prefix, is("io.namespace/files"));
+        assertThat(prefix, is("/io.namespace/files"));
     }
 }
Repository: kestra-io/kestra
Issue: [UI] Add a better error message when trying to create a flow file with the wrong extension e.g. `flow.py`
Labels: enhancement

### Feature description

Currently, if you add a flow in the `_flows` directory:
1.  Without any extension e.g. "myflow" -- it works - kestra will create a flow "myflow" and will add it as a file `myflow.yml`
2. With the wrong extension e.g. "myflow.py" or "myflow.txt", it will create the flow properly "myflow.yml" but it will also show an error page, even though the flow gets added correctly:

![image](https://github.com/kestra-io/kestra/assets/86264395/2307287b-60e8-498b-9df1-f03ec94770c1)

So we need to either:
1. Display an error message that only ".yml" extension is allowed when adding files to the `_flows` directory
2. Fix the API response to avoid the error page 

Issue comments:
@brian-mulier-p just a comment that if we don't make this one in 0.13.0 it's fine, just an edge case 


Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/namespace/Editor.vue b/ui/src/components/namespace/Editor.vue
index 046c74829f..6442817617 100644
--- a/ui/src/components/namespace/Editor.vue
+++ b/ui/src/components/namespace/Editor.vue
@@ -70,9 +70,12 @@
             window.addEventListener("message", (event) => {
                 const message = event.data;
                 if (message.type === "kestra.tabFileChanged") {
-                    const path = `/${this.namespace}/_flows/`;
-                    if (message.filePath.path.startsWith(path)) {
-                        this.flow = message.filePath.path.split(path)[1].replace(".yml", "");
+                    const flowsFolderPath = `/${this.namespace}/_flows/`;
+                    const filePath = message.filePath.path;
+                    if (filePath.startsWith(flowsFolderPath)) {
+                        const fileName = filePath.split(flowsFolderPath)[1];
+                        // trim the eventual extension
+                        this.flow = fileName.split(".")[0];
                     } else {
                         this.flow = null;
                     }


Test patch:
Repository: kestra-io/kestra
Issue: Handle Request Aborted 
Labels: bug


If you click too quickly on tabs from the Flow page, you see this error :  

![image](https://github.com/kestra-io/kestra/assets/2064609/a1250957-8ef2-4577-8cab-37cc61a5c55e)

Should be hidden

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/utils/axios.js b/ui/src/utils/axios.js
index 0823d23947..227e84bb37 100644
--- a/ui/src/utils/axios.js
+++ b/ui/src/utils/axios.js
@@ -72,7 +72,7 @@ export default (callback, store, router) => {
         response => {
             return response
         }, errorResponse => {
-            if (errorResponse.code && (errorResponse.code === "ECONNABORTED" || errorResponse.code === "ERR_BAD_RESPONSE")) {
+            if (errorResponse?.code === "ERR_BAD_RESPONSE") {
                 store.dispatch("core/showMessage", {
                     response: errorResponse,
                     content: errorResponse,


Test patch:
Repository: kestra-io/kestra
Issue: Namespace File Editor should keep track of the previously selected namespace if there was one
Labels: bug
frontend
good first issue

### Explain the bug

Currently it always select the first namespace available unless we have a default namespace setting set up.
It can be annoying when you try to debug as you may need to reload the page sometimes and it fails to retrieve the previously selected namespace.
I think if we have a RestoreUrl saved for editor it should take it instead of selecting the first namespace.

### Environment Information

- Kestra Version:
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:
Hello, if issue #2476is currently unassigned or available, please consider assigning it to me.
Hello @prajwalgh, thank's for contributing, I assigned you :)
Hello @prajwalgh do you manage to do it or do you need any help ?

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/namespace/Editor.vue b/ui/src/components/namespace/Editor.vue
index 6442817617..3863e66645 100644
--- a/ui/src/components/namespace/Editor.vue
+++ b/ui/src/components/namespace/Editor.vue
@@ -41,11 +41,13 @@
     import RestoreUrl from "../../mixins/restoreUrl";
     import {apiUrl} from "override/utils/route";
     import {mapState} from "vuex";
+    import {storageKeys} from "../../utils/constants";
 
     export default {
         mixins: [RouteContext, RestoreUrl],
         methods: {
             namespaceUpdate(namespace) {
+                localStorage.setItem(storageKeys.LATEST_NAMESPACE, namespace);
                 this.$router.push({
                     params: {
                         namespace
@@ -85,7 +87,7 @@
             });
 
             // Setup namespace
-            const namespace = localStorage.getItem("defaultNamespace");
+            const namespace = localStorage.getItem(storageKeys.LATEST_NAMESPACE) ? localStorage.getItem(storageKeys.LATEST_NAMESPACE) : localStorage.getItem(storageKeys.DEFAULT_NAMESPACE);
             if (namespace) {
                 this.namespaceUpdate(namespace);
             } else if (this.namespaces?.length > 0) {
diff --git a/ui/src/utils/constants.js b/ui/src/utils/constants.js
index d7657ef368..2d0cc18b2d 100644
--- a/ui/src/utils/constants.js
+++ b/ui/src/utils/constants.js
@@ -28,7 +28,9 @@ export const storageKeys = {
     DISPLAY_EXECUTIONS_COLUMNS: "displayExecutionsColumns",
     DISPLAY_FLOW_EXECUTIONS_COLUMNS: "displayFlowExecutionsColumns",
     SELECTED_TENANT: "selectedTenant",
-    EXECUTE_FLOW_BEHAVIOUR: "executeFlowBehaviour"
+    EXECUTE_FLOW_BEHAVIOUR: "executeFlowBehaviour",
+    DEFAULT_NAMESPACE: "defaultNamespace",
+    LATEST_NAMESPACE: "latestNamespace"
 }
 
 export const executeFlowBehaviours = {


Test patch:
Repository: kestra-io/kestra
Issue: Remove "Accounts" setting at the bottom left


Issue comments:

Pull request review comments:
Put it in a file for more readability 
I moved them to a variable

Patch that resolved the issue:
diff --git a/ui/public/init.js b/ui/public/init.js
index cdcba07d10..00c31d271a 100644
--- a/ui/public/init.js
+++ b/ui/public/init.js
@@ -30,6 +30,31 @@ const extensionsToFetch = Object.entries(versionByExtensionIdToFetch).map(([exte
 }));
 
 // used to configure VSCode startup
+const sidebarTabs = [
+    {"id": "workbench.view.explorer", "pinned": true, "visible": true, "order": 0},
+    {"id": "workbench.view.search", "pinned": true, "visible": true, "order": 1},
+    {"id": "workbench.view.scm", "pinned": false, "visible": false, "order": 2},
+    {"id": "workbench.view.debug", "pinned": false,"visible": false,"order": 3},
+    {"id": "workbench.view.extensions", "pinned": true,"visible": true,"order": 4},
+    {"id": "workbench.view.remote", "pinned": false,"visible": false,"order": 4},
+    {"id": "workbench.view.extension.test", "pinned": false,"visible": false,"order": 6},
+    {"id": "workbench.view.extension.references-view", "pinned": false,"visible": false,"order": 7},
+    {"id": "workbench.panel.chatSidebar", "pinned": false,"visible": false,"order": 100},
+    {"id": "userDataProfiles", "pinned": false, "visible": false},
+    {"id": "workbench.view.sync", "pinned": false,"visible": false},
+    {"id": "workbench.view.editSessions", "pinned": false, "visible": false}
+];
+
+const bottomBarTabs = [
+    {"id":"workbench.panel.markers", "pinned": false,"visible": false,"order": 0},
+    {"id":"workbench.panel.output", "pinned": false,"visible": false,"order": 1},
+    {"id":"workbench.panel.repl", "pinned": false,"visible": false,"order": 2},
+    {"id":"terminal", "pinned": false,"visible": false,"order": 3},
+    {"id":"workbench.panel.testResults", "pinned": false,"visible": false,"order": 3},
+    {"id":"~remote.forwardedPortsContainer", "pinned": false,"visible": false,"order": 5},
+    {"id":"refactorPreview", "pinned": false,"visible": false}
+];
+
 window.product = {
     productConfiguration: {
         nameShort: "Kestra VSCode",
@@ -77,5 +102,17 @@ window.product = {
         "workbench.colorTheme": THEME === "dark" ? "Sweet Dracula" : "Default Light Modern",
         // provide the Kestra root URL to extension
         "kestra.api.url": KESTRA_API_URL
+    },
+    profile: {
+        name: "Kestra VSCode",
+        contents: JSON.stringify({
+            globalState: JSON.stringify({
+                "storage": {
+                    "workbench.activity.pinnedViewlets2": sidebarTabs,
+                    "workbench.activity.showAccounts": "false",
+                    "workbench.panel.pinnedPanels": bottomBarTabs
+                }
+            })
+        })
     }
 };
\ No newline at end of file


Test patch:
Repository: kestra-io/kestra
Issue: Disable the Run + Debug (Ctrl + Shift + D) icon on the left sidebar


Issue comments:

Pull request review comments:
Put it in a file for more readability 
I moved them to a variable

Patch that resolved the issue:
diff --git a/ui/public/init.js b/ui/public/init.js
index cdcba07d10..00c31d271a 100644
--- a/ui/public/init.js
+++ b/ui/public/init.js
@@ -30,6 +30,31 @@ const extensionsToFetch = Object.entries(versionByExtensionIdToFetch).map(([exte
 }));
 
 // used to configure VSCode startup
+const sidebarTabs = [
+    {"id": "workbench.view.explorer", "pinned": true, "visible": true, "order": 0},
+    {"id": "workbench.view.search", "pinned": true, "visible": true, "order": 1},
+    {"id": "workbench.view.scm", "pinned": false, "visible": false, "order": 2},
+    {"id": "workbench.view.debug", "pinned": false,"visible": false,"order": 3},
+    {"id": "workbench.view.extensions", "pinned": true,"visible": true,"order": 4},
+    {"id": "workbench.view.remote", "pinned": false,"visible": false,"order": 4},
+    {"id": "workbench.view.extension.test", "pinned": false,"visible": false,"order": 6},
+    {"id": "workbench.view.extension.references-view", "pinned": false,"visible": false,"order": 7},
+    {"id": "workbench.panel.chatSidebar", "pinned": false,"visible": false,"order": 100},
+    {"id": "userDataProfiles", "pinned": false, "visible": false},
+    {"id": "workbench.view.sync", "pinned": false,"visible": false},
+    {"id": "workbench.view.editSessions", "pinned": false, "visible": false}
+];
+
+const bottomBarTabs = [
+    {"id":"workbench.panel.markers", "pinned": false,"visible": false,"order": 0},
+    {"id":"workbench.panel.output", "pinned": false,"visible": false,"order": 1},
+    {"id":"workbench.panel.repl", "pinned": false,"visible": false,"order": 2},
+    {"id":"terminal", "pinned": false,"visible": false,"order": 3},
+    {"id":"workbench.panel.testResults", "pinned": false,"visible": false,"order": 3},
+    {"id":"~remote.forwardedPortsContainer", "pinned": false,"visible": false,"order": 5},
+    {"id":"refactorPreview", "pinned": false,"visible": false}
+];
+
 window.product = {
     productConfiguration: {
         nameShort: "Kestra VSCode",
@@ -77,5 +102,17 @@ window.product = {
         "workbench.colorTheme": THEME === "dark" ? "Sweet Dracula" : "Default Light Modern",
         // provide the Kestra root URL to extension
         "kestra.api.url": KESTRA_API_URL
+    },
+    profile: {
+        name: "Kestra VSCode",
+        contents: JSON.stringify({
+            globalState: JSON.stringify({
+                "storage": {
+                    "workbench.activity.pinnedViewlets2": sidebarTabs,
+                    "workbench.activity.showAccounts": "false",
+                    "workbench.panel.pinnedPanels": bottomBarTabs
+                }
+            })
+        })
     }
 };
\ No newline at end of file


Test patch:
Repository: kestra-io/kestra
Issue: Disable the Version Control extension by default


Issue comments:

Pull request review comments:
Put it in a file for more readability 
I moved them to a variable

Patch that resolved the issue:
diff --git a/ui/public/init.js b/ui/public/init.js
index cdcba07d10..00c31d271a 100644
--- a/ui/public/init.js
+++ b/ui/public/init.js
@@ -30,6 +30,31 @@ const extensionsToFetch = Object.entries(versionByExtensionIdToFetch).map(([exte
 }));
 
 // used to configure VSCode startup
+const sidebarTabs = [
+    {"id": "workbench.view.explorer", "pinned": true, "visible": true, "order": 0},
+    {"id": "workbench.view.search", "pinned": true, "visible": true, "order": 1},
+    {"id": "workbench.view.scm", "pinned": false, "visible": false, "order": 2},
+    {"id": "workbench.view.debug", "pinned": false,"visible": false,"order": 3},
+    {"id": "workbench.view.extensions", "pinned": true,"visible": true,"order": 4},
+    {"id": "workbench.view.remote", "pinned": false,"visible": false,"order": 4},
+    {"id": "workbench.view.extension.test", "pinned": false,"visible": false,"order": 6},
+    {"id": "workbench.view.extension.references-view", "pinned": false,"visible": false,"order": 7},
+    {"id": "workbench.panel.chatSidebar", "pinned": false,"visible": false,"order": 100},
+    {"id": "userDataProfiles", "pinned": false, "visible": false},
+    {"id": "workbench.view.sync", "pinned": false,"visible": false},
+    {"id": "workbench.view.editSessions", "pinned": false, "visible": false}
+];
+
+const bottomBarTabs = [
+    {"id":"workbench.panel.markers", "pinned": false,"visible": false,"order": 0},
+    {"id":"workbench.panel.output", "pinned": false,"visible": false,"order": 1},
+    {"id":"workbench.panel.repl", "pinned": false,"visible": false,"order": 2},
+    {"id":"terminal", "pinned": false,"visible": false,"order": 3},
+    {"id":"workbench.panel.testResults", "pinned": false,"visible": false,"order": 3},
+    {"id":"~remote.forwardedPortsContainer", "pinned": false,"visible": false,"order": 5},
+    {"id":"refactorPreview", "pinned": false,"visible": false}
+];
+
 window.product = {
     productConfiguration: {
         nameShort: "Kestra VSCode",
@@ -77,5 +102,17 @@ window.product = {
         "workbench.colorTheme": THEME === "dark" ? "Sweet Dracula" : "Default Light Modern",
         // provide the Kestra root URL to extension
         "kestra.api.url": KESTRA_API_URL
+    },
+    profile: {
+        name: "Kestra VSCode",
+        contents: JSON.stringify({
+            globalState: JSON.stringify({
+                "storage": {
+                    "workbench.activity.pinnedViewlets2": sidebarTabs,
+                    "workbench.activity.showAccounts": "false",
+                    "workbench.panel.pinnedPanels": bottomBarTabs
+                }
+            })
+        })
     }
 };
\ No newline at end of file


Test patch:
Repository: kestra-io/kestra
Issue: Warning text not visible on light theme
Labels: bug

### Explain the bug



![Image](https://github.com/kestra-io/kestra/assets/37600690/b23b2afc-038d-4065-8592-737e82454ab8)



### Environment Information

- Kestra Version: 0.13.0


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/styles/layout/element-plus-overload.scss b/ui/src/styles/layout/element-plus-overload.scss
index fcf09728e3..9b40df713a 100644
--- a/ui/src/styles/layout/element-plus-overload.scss
+++ b/ui/src/styles/layout/element-plus-overload.scss
@@ -413,11 +413,6 @@ form.ks-horizontal {
 
     &.is-dark {
         color: var(--bs-gray-100);
-        html:not(.dark) & {
-            * {
-                color: var(--bs-gray-100);
-            }
-        }
 
         background: var(--bs-gray-900);
         border: 1px solid var(--bs-border-color);


Test patch:
Repository: kestra-io/kestra
Issue: Executions Page : Flow and namespace is missing
Labels: bug
backport-needed

![image](https://github.com/kestra-io/kestra/assets/2064609/a094382a-e049-46bd-9154-8309e9bf7355)

On the execution page, the flow and namespace is missing and lead to unusable page.
Probably because I change the default cols on the flow > executions page

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/executions/Executions.vue b/ui/src/components/executions/Executions.vue
index fec85193cf..9be24c6be4 100644
--- a/ui/src/components/executions/Executions.vue
+++ b/ui/src/components/executions/Executions.vue
@@ -447,7 +447,7 @@
         },
         methods: {
             onDisplayColumnsChange(event) {
-                localStorage.setItem("displayExecutionsColumns", event);
+                localStorage.setItem(this.storageKey, event);
                 this.displayColumns = event;
             },
             displayColumn(column) {
@@ -608,4 +608,4 @@
             },
         }
     };
-</script>
\ No newline at end of file
+</script>


Test patch:
Repository: kestra-io/kestra
Issue: Mark FlowCondition as deprecated.
Labels: backend
enhancement

### Feature description

Deprecate https://kestra.io/plugins/core/conditions/io.kestra.core.models.conditions.types.flowcondition

preferred option: https://kestra.io/plugins/core/conditions/io.kestra.core.models.conditions.types.executionflowcondition

Issue comments:
It is already deprecated and displayed as it inside the Kestra UI, see https://preview-oss.kestra.io/ui/plugins/io.kestra.core.models.conditions.types.FlowCondition



![Image](https://github.com/kestra-io/kestra/assets/1819009/84bccd8e-1621-4bf3-a016-aca9459e03d3)



But for an unknown reason, on the website the deprecated icon is not shown, see https://kestra.io/plugins/core/conditions/io.kestra.core.models.conditions.types.flowcondition



![Image](https://github.com/kestra-io/kestra/assets/1819009/7f08e0a0-e371-4258-8c79-55623f7374a8)



Ey! So far in my findings I see that the website FE is taking the title `.md` tag value so in this example it'll only show "FlowCondition" instead of "FlowCondition- 🔒 Deprecated".

```
---
title: FlowCondition
editLink: false

description: "Condition for a specific flow. Note that this condition is deprecated, use `ExecutionFlowCondition` instead."

icon: PHN2Zy...
---


<h1>
    <img width="25" src="..." alt="FlowCondition" /> FlowCondition- 🔒 Deprecated
</h1>
```

So title should have the same content as the h1.
Thanks, it explains the behavior, on our side, we didn't add the 'deprecated' flag on the MD title.
I'll have a look.

Pull request review comments:

Patch that resolved the issue:
diff --git a/core/src/main/resources/docs/task.hbs b/core/src/main/resources/docs/task.hbs
index 042d0b91db..e07e06666d 100644
--- a/core/src/main/resources/docs/task.hbs
+++ b/core/src/main/resources/docs/task.hbs
@@ -1,5 +1,5 @@
 ---
-title: {{shortName}}
+title: {{shortName}} {{~#if deprecated }} - 🔒 Deprecated{{~/if}}
 editLink: false
 {{#if docDescription}}
 description: {{ json docDescription }}
@@ -109,7 +109,7 @@ icon: {{ icon }}
 {{~/inline~}}
 {{!-- {{                 Main doc                 }} --}}
 <h1>
-    {{#if icon ~}}<img width="25" src="data:image/svg+xml;base64,{{icon}}" alt="{{shortName}}" />{{/if }} {{shortName}} {{~#if deprecated }}- 🔒 Deprecated{{~/if}}
+    {{#if icon ~}}<img width="25" src="data:image/svg+xml;base64,{{icon}}" alt="{{shortName}}" />{{/if }} {{shortName}} {{~#if deprecated }} - 🔒 Deprecated{{~/if}}
 </h1>
 
 ```yaml


Test patch:
Repository: kestra-io/kestra
Issue: Upon flow creation, not having "tasks" property and trying to add it crashes upon writing the last 's'
Labels: bug
frontend
quick-win

### Explain the bug

[Screencast from 27-12-2023 09:42:58.webm](https://github.com/kestra-io/kestra/assets/37618489/c63f5561-81d1-4e51-83b3-bd32703ffaf0)


### Environment Information

- Kestra Version: 0.14.0-SNAPSHOT
- Operating System and Java Version (if not using Kestra Docker image):


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/utils/yamlUtils.js b/ui/src/utils/yamlUtils.js
index e816ac8279..9e6a90ae9a 100644
--- a/ui/src/utils/yamlUtils.js
+++ b/ui/src/utils/yamlUtils.js
@@ -533,7 +533,7 @@ export default class YamlUtils {
 
     static flowHaveTasks(source) {
         const tasks = yaml.parseDocument(source).contents.items.find(item => item.key.value === "tasks");
-        return tasks && tasks.value.items && tasks.value.items.length >= 1;
+        return tasks?.value?.items?.length >= 1;
     }
 
     static deleteMetadata(source, metadata) {


Test patch: