feedback-to-code/mozzarella huggingface dataset:
Repository: kestra-io/kestra
Issue: [Topology - Task Editor] Task validation tooltip is unreadable while in Light Editor / Theme
Labels: bug
enhancement

### Expected Behavior

We should be able to read tooltip even in Light theme

### Actual Behaviour

![image](https://user-images.githubusercontent.com/37618489/236160158-f4a66da2-02b5-47d8-b38a-5ab132f390f9.png)
![image](https://user-images.githubusercontent.com/37618489/236160423-2003e0e5-7c1b-4c68-a558-af100509996f.png)


### Steps To Reproduce

Light mode editor
Go to Topology
Edit a task
Tooltip is unreadable

### Environment Information

- Kestra Version: 0.9.0-SNAPSHOT

### Example flow

_No response_

Issue comments:

Pull request review comments:
Tooltip are always dark even on light theme. 
Please just add some style for the text 
prefect :+1: 

Patch that resolved the issue:
diff --git a/ui/src/components/flows/ValidationError.vue b/ui/src/components/flows/ValidationError.vue
index 7a169d62a9..91efd35cfc 100644
--- a/ui/src/components/flows/ValidationError.vue
+++ b/ui/src/components/flows/ValidationError.vue
@@ -37,6 +37,10 @@
         max-width: 40vw;
         white-space: pre-wrap;
         background: transparent;
+        color: var(--bs-gray-100);
+        html.dark & {
+            color: var(--bs-gray-900);
+        }
         padding: 0;
     }
 


Test patch:
Repository: kestra-io/kestra
Issue: Validate If task return 500 instead of 422
Labels: bug

### Expected Behavior

When writing a flow, if a write a `If task` and there is no `then` properties, it return 500 instead of 422.

This lead to a pop-up spamming.

### Actual Behaviour

It should return 422 and not be displayed in a pop-up but only in the tooltip.

### Steps To Reproduce

Write if task

### Environment Information

- Kestra Version: 0.8.1

### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/core/src/main/java/io/kestra/core/tasks/flows/If.java b/core/src/main/java/io/kestra/core/tasks/flows/If.java
index b0153d71a9..f23b1c9319 100644
--- a/core/src/main/java/io/kestra/core/tasks/flows/If.java
+++ b/core/src/main/java/io/kestra/core/tasks/flows/If.java
@@ -129,7 +129,7 @@ public GraphCluster tasksTree(Execution execution, TaskRun taskRun, List<String>
     public List<Task> allChildTasks() {
         return Stream
             .concat(
-                this.then.stream(),
+                this.then != null ? this.then.stream() : Stream.empty(),
                 Stream.concat(
                     this._else != null ? this._else.stream() : Stream.empty(),
                     this.errors != null ? this.errors.stream() : Stream.empty())


Test patch:
Repository: kestra-io/kestra
Issue: Documentation does not appear correctly in editor
Labels: bug

### Expected Behavior

When I'm writing a task, I should be able to see the task documentation (if doc view is selected) 

### Actual Behaviour

If my cursor is at the end of the task, documentation is not displayed
![image](https://github.com/kestra-io/kestra/assets/37600690/09f74e16-1dc3-4827-a4c0-c46c504e479f)


### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version: 0.8.1


### Example flow

_No response_

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 23c3c184c5..fdd6cda190 100644
--- a/ui/src/utils/yamlUtils.js
+++ b/ui/src/utils/yamlUtils.js
@@ -163,7 +163,7 @@ export default class YamlUtils {
     static getTaskType(source, position) {
         const lineCounter = new LineCounter();
         const yamlDoc = yaml.parseDocument(source, {lineCounter});
-        if (yamlDoc.contents && yamlDoc.contents.items && yamlDoc.contents.items.find(e => e.key.value === "tasks")) {
+        if (yamlDoc.contents && yamlDoc.contents.items && yamlDoc.contents.items.find(e => ["tasks", "triggers", "errors"].includes(e.key.value))) {
             const cursorIndex = lineCounter.lineStarts[position.lineNumber - 1] + position.column;
             if (yamlDoc.contents) {
                 for (const item of yamlDoc.contents.items) {
@@ -179,14 +179,16 @@ export default class YamlUtils {
     static _getTaskType(element, cursorIndex, previousTaskType) {
         let taskType = previousTaskType
         for (const item of element.items) {
+            // Every -1 & +1 allows catching cursor
+            // that is just behind or just after a task
             if (item instanceof Pair) {
-                if (item.key.value === "type" && element.range[0] <= cursorIndex && element.range[1] >= cursorIndex) {
+                if (item.key.value === "type" && element.range[0]-1 <= cursorIndex && element.range[1]+1 >= cursorIndex) {
                     taskType = item.value.value
                 }
-                if ((item.value instanceof YAMLSeq || item.value instanceof YAMLMap) && item.value.range[0] <= cursorIndex && item.value.range[1] >= cursorIndex) {
+                if ((item.value instanceof YAMLSeq || item.value instanceof YAMLMap) && item.value.range[0]-1 <= cursorIndex && item.value.range[1]+1 >= cursorIndex) {
                     taskType = this._getTaskType(item.value, cursorIndex, taskType)
                 }
-            } else if (item.range[0] <= cursorIndex && item.range[1] >= cursorIndex) {
+            } else if (item.range[0]-1 <= cursorIndex && item.range[1]+1 >= cursorIndex) {
                 if (item.items instanceof Array) {
                     taskType = this._getTaskType(item, cursorIndex)
                 }


Test patch:
Repository: kestra-io/kestra
Issue: Flow Save button is red now
Labels: bug

![image](https://github.com/kestra-io/kestra/assets/2064609/4d23679a-8b60-413f-9bb0-ca367b0a897e)
Actually, if the flow have no unsaved change, the button is red.
The button:
- should be purple without any change 
- should be red if there is an error 
- should display a proper tooltip with the error message if any 

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/graph/Topology.vue b/ui/src/components/graph/Topology.vue
index e8292207bf..c2dec6824a 100644
--- a/ui/src/components/graph/Topology.vue
+++ b/ui/src/components/graph/Topology.vue
@@ -1180,7 +1180,7 @@
                     size="large"
                     @click="save"
                     v-if="isAllowedEdit"
-                    :type="flowError || !haveChange ? 'danger' : 'primary'"
+                    :type="flowError ? 'danger' : 'primary'"
                     :disabled="!haveChange"
                     class="edit-flow-save-button"
                 >


Test patch:
Repository: kestra-io/kestra
Issue: UI - No outputs displayed after selecting a task then clearing the select
Labels: bug

### Expected Behavior

All outputs are displayed after selecting a task then clearing the select.

### Actual Behaviour

When you goes to the outputs tab of an execution and select one task, the list of outputs is filter with the tasks outputs, When you clear the select no outputs are shown. All outputs should have been displayed instead.

![screen-capture](https://github.com/kestra-io/kestra/assets/1819009/86e2829b-a509-461a-ac6b-adb44460027d)


### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version:
- Operating System (OS / Docker / Kubernetes):
- Java Version (If not docker):


### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/executions/ExecutionOutput.vue b/ui/src/components/executions/ExecutionOutput.vue
index a2eb80b9a3..113c6979e2 100644
--- a/ui/src/components/executions/ExecutionOutput.vue
+++ b/ui/src/components/executions/ExecutionOutput.vue
@@ -8,6 +8,7 @@
                     :persistent="false"
                     v-model="filter"
                     @input="onSearch"
+                    @clear="onClear"
                     :placeholder="$t('display output for specific task') + '...'"
                 >
                     <el-option
@@ -134,6 +135,9 @@
                     this.$router.push(newRoute);
                 }
             },
+            onClear() {
+                this.filter = undefined;
+            },
             onDebugExpression(taskRunId, expression) {
                 this.$http.post(`/api/v1/executions/${this.execution.id}/eval/${taskRunId}`, expression, {
                     headers: {


Test patch:
Repository: kestra-io/kestra
Issue: Themes/Editor discrepancies
Labels: bug

### Expected Behavior

_No response_

### Actual Behaviour

when Theme = light and editor=dark, editor is not dark

<img width="1101" alt="Screenshot 2023-05-19 at 11 41 00" src="https://github.com/kestra-io/kestra/assets/46634684/9f4ec602-2b30-4e5f-a7dc-1a19c502269c">


### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version: 0.9.0
- Operating System (OS / Docker / Kubernetes): docker
- Java Version (If not docker):


### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/inputs/Editor.vue b/ui/src/components/inputs/Editor.vue
index 74687420c9..c4b340968d 100644
--- a/ui/src/components/inputs/Editor.vue
+++ b/ui/src/components/inputs/Editor.vue
@@ -357,6 +357,7 @@
 </script>
 
 <style lang="scss">
+    @import "../../styles/layout/root-dark.scss";
 
     .ks-editor {
         width: 100%;
@@ -439,14 +440,14 @@
 
     .custom-dark-vs-theme {
         .monaco-editor, .monaco-editor-background {
-            background-color: var(--input-bg);
-            --vscode-editor-background: var(--input-bg);
-            --vscode-breadcrumb-background: var(--input-bg);
-            --vscode-editorGutter-background: var(--input-bg);
+            background-color: $input-bg;
+            --vscode-editor-background: $input-bg;
+            --vscode-breadcrumb-background: $input-bg;
+            --vscode-editorGutter-background: $input-bg;
         }
 
         .monaco-editor .margin {
-            background-color: var(--input-bg);
+            background-color: $input-bg;
         }
     }
 


Test patch:
Repository: kestra-io/kestra
Issue: bug with vertical/horizontal topology in editor
Labels: bug

### Expected Behavior

_No response_

### Actual Behaviour

Some rendering bug when switching view
https://github.com/kestra-io/kestra/assets/46634684/d8a563cf-5b2f-47a9-8274-589c9686f217



### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version: 0.9.0
- Operating System (OS / Docker / Kubernetes): Docker
- Java Version (If not docker):


### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/package.json b/ui/package.json
index 023e92e2da..17551e15cd 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -11,7 +11,7 @@
   },
   "dependencies": {
     "@vue-flow/controls": "^1.0.6",
-    "@vue-flow/core": "1.20.0",
+    "@vue-flow/core": "1.14.3",
     "ansi-to-html": "^0.7.2",
     "axios": "^1.4.0",
     "bootstrap": "^5.2.3",


Test patch:
Repository: kestra-io/kestra
Issue: Exporting flows and templates from the Settings page works but generates a JS error 
Labels: bug

### Expected Behavior

No JS error on the console.

### Actual Behaviour

When exporting flow or templates from the Settings page, the export works but there is exceptions in the JS console.

![image](https://github.com/kestra-io/kestra/assets/1819009/92b1707f-db01-487f-a1e6-eb3ef2fb50a7)


### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version: 0.9.0-SNAPSHOT
- Operating System (OS / Docker / Kubernetes):
- Java Version (If not docker):


### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/settings/Settings.vue b/ui/src/components/settings/Settings.vue
index 6ed9e248ba..bf80a6d923 100644
--- a/ui/src/components/settings/Settings.vue
+++ b/ui/src/components/settings/Settings.vue
@@ -153,7 +153,21 @@
                 this.editorDocumentation = value;
                 this.$toast().saved();
 
-            }
+            },
+            exportFlows() {
+                return this.$store
+                    .dispatch("flow/exportFlowByQuery", {})
+                    .then(_ => {
+                        this.$toast().success(this.$t("flows exported"));
+                    })
+            },
+            exportTemplates() {
+                return this.$store
+                    .dispatch("template/exportTemplateByQuery", {})
+                    .then(_ => {
+                        this.$toast().success(this.$t("templates exported"));
+                    })
+            },
         },
         computed: {
             ...mapGetters("core", ["guidedProperties"]),
@@ -187,20 +201,6 @@
             canReadTemplates() {
                 return this.user && this.user.isAllowed(permission.TEMPLATE, action.READ);
             },
-            exportFlows() {
-                return this.$store
-                    .dispatch("flow/exportFlowByQuery", {})
-                    .then(_ => {
-                        this.$toast().success(this.$t("flows exported"));
-                    })
-            },
-            exportTemplates() {
-                return this.$store
-                    .dispatch("template/exportTemplateByQuery", {})
-                    .then(_ => {
-                        this.$toast().success(this.$t("templates exported"));
-                    })
-            },
         }
     };
 </script>


Test patch:
Repository: kestra-io/kestra
Issue: Template ctrl+s not working


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/templates/TemplateEdit.vue b/ui/src/components/templates/TemplateEdit.vue
index aa647d6a61..074194ff15 100644
--- a/ui/src/components/templates/TemplateEdit.vue
+++ b/ui/src/components/templates/TemplateEdit.vue
@@ -1,6 +1,6 @@
 <template>
     <div>
-        <editor @on-save="save" v-model="content" schema-type="template" lang="yaml" @update:model-value="onChange($event)" @cursor="updatePluginDocumentation" />
+        <editor @save="save" v-model="content" schema-type="template" lang="yaml" @update:model-value="onChange($event)" @cursor="updatePluginDocumentation" />
         <bottom-line v-if="canSave || canDelete">
             <ul>
                 <li>


Test patch:
Repository: kestra-io/kestra
Issue: Editor Panel resize must be constrain 
Labels: bug

![image](https://github.com/kestra-io/kestra/assets/2064609/9a4b8849-eb4d-44bb-9f4b-55b25b527a65)
![image](https://github.com/kestra-io/kestra/assets/2064609/a5de36f6-0799-4cf9-9e23-860c4d78c140)

We shouldn't allow such edge case resize, don't allow less than 200 px large 

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/graph/Topology.vue b/ui/src/components/graph/Topology.vue
index 7512eea7ef..89349eb09f 100644
--- a/ui/src/components/graph/Topology.vue
+++ b/ui/src/components/graph/Topology.vue
@@ -936,7 +936,14 @@
         let blockWidthPercent = (blockWidth / parentWidth) * 100;
 
         document.onmousemove = function onMouseMove(e) {
-            editorWidthPercentage.value = (blockWidthPercent + ((e.clientX - dragX) / parentWidth) * 100) + "%"
+            const percent = (blockWidthPercent + ((e.clientX - dragX) / parentWidth) * 100);
+            if(percent > 75 ){
+                editorWidthPercentage.value = 75 + "%";
+            } else if(percent < 25){
+                editorWidthPercentage.value = 25 + "%";
+            } else {
+                editorWidthPercentage.value = percent + "%";
+            }
         }
 
         document.onmouseup = () => {


Test patch:
Repository: kestra-io/kestra
Issue: Long time loading task source & form
Labels: bug
frontend

### Expected Behavior

Fast task edit loading

### Actual Behaviour

Usage of Monaco editor instead of traditional input combined with the fact that now each Monaco editor has his own schema loaded independently leads to multiple useless queries of "/plugin", adding delay to the component :
![image](https://github.com/kestra-io/kestra/assets/37600690/cd6a2f70-2a45-4a53-a510-51554683f26a)


### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version: 0.9.0


### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/inputs/Editor.vue b/ui/src/components/inputs/Editor.vue
index c4b340968d..7b3005beca 100644
--- a/ui/src/components/inputs/Editor.vue
+++ b/ui/src/components/inputs/Editor.vue
@@ -193,7 +193,6 @@
             }
         },
         created() {
-            this.$store.dispatch("plugin/list");
             this.editorDocumentation = localStorage.getItem("editorDocumentation") !== "false" && this.navbar;
         },
         methods: {


Test patch:
Repository: kestra-io/kestra
Issue: File inputs no longer working in production mode
Labels: bug
frontend

### Expected Behavior

File inputs should be displayed

### Actual Behaviour

File inputs are not displayed with an undefined error in console (due to `this.` usage in template)

### Steps To Reproduce

Create a flow with a file inputs
Create a new execution
File inputs are not displayed

### Environment Information

- Kestra Version: 0.9.0-SNAPSHOT

### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/flows/FlowRun.vue b/ui/src/components/flows/FlowRun.vue
index 99001427eb..ea2584bf03 100644
--- a/ui/src/components/flows/FlowRun.vue
+++ b/ui/src/components/flows/FlowRun.vue
@@ -58,9 +58,9 @@
                             type="file"
                             @change="onFileChange(input, $event)"
                             autocomplete="off"
-                            :style="{display: typeof(this.inputs[input.name]) === 'string' && this.inputs[input.name].startsWith('kestra:///') ? 'none': ''}"
+                            :style="{display: typeof(inputs[input.name]) === 'string' && inputs[input.name].startsWith('kestra:///') ? 'none': ''}"
                         >
-                        <label v-if="typeof(this.inputs[input.name]) === 'string' && this.inputs[input.name].startsWith('kestra:///')"
+                        <label v-if="typeof(inputs[input.name]) === 'string' && inputs[input.name].startsWith('kestra:///')"
                                :for="input.name+'-file'">Kestra Internal Storage File</label>
                     </div>
                 </div>


Test patch:
Repository: kestra-io/kestra
Issue: Host somewhere the tutorial/guided tour data file

### Feature description

Both the guided tour inside the UI and the tutorial on the website use a data file from the French OpenData website: https://www.data.gouv.fr/fr/datasets/r/d33eabc9-e2fd-4787-83e5-a5fcfb5af66d

Unfortunately, this file may not be available everywhere; we have reports from users that cannot access it while we can access it simultaneously.

We may want to host this file by ourself, or rely on a different data set.

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/ui/src/components/onboarding/VueTour.vue b/ui/src/components/onboarding/VueTour.vue
index 1179b59b5e..5bdaa45d4f 100644
--- a/ui/src/components/onboarding/VueTour.vue
+++ b/ui/src/components/onboarding/VueTour.vue
@@ -310,7 +310,7 @@
                         "  # " + this.$t("onboarding-flow.inputsDetails2") + "\n" +
                         "  - name: csvUrl\n" +
                         "    type: STRING\n" +
-                        "    defaults: https://www.data.gouv.fr/fr/datasets/r/d33eabc9-e2fd-4787-83e5-a5fcfb5af66d",
+                        "    defaults: https://gist.githubusercontent.com/tchiotludo/2b7f28f4f507074e60150aedb028e074/raw/6b6348c4f912e79e3ffccaf944fd019bf51cba30/conso-elec-gaz-annuelle-par-naf-agregee-region.csv",
                     "# " + this.$t("onboarding-flow.tasks1") + "\n" +
                         "# " + this.$t("onboarding-flow.tasks2") + "\n" +
                         "# " + this.$t("onboarding-flow.tasks3") + "\n" +


Test patch:
Repository: kestra-io/kestra
Issue: MySQL repo - /daily displays an error message saying it misses a full text index when searching a flow
Labels: bug

### Expected Behavior

_No response_

### Actual Behaviour

Go to Flow list and start typing something.
Once you have typed at least 3 characters (see #1502 for the current full text limitation), an error message talking about full-text index missing appears.

### Steps To Reproduce

_No response_

### Environment Information

- Kestra Version: 0.10.0-SNAPSHOT

### Example flow

_No response_

Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/jdbc-mysql/src/main/java/io/kestra/repository/mysql/MysqlExecutionRepositoryService.java b/jdbc-mysql/src/main/java/io/kestra/repository/mysql/MysqlExecutionRepositoryService.java
index cff8542a14..367450e30e 100644
--- a/jdbc-mysql/src/main/java/io/kestra/repository/mysql/MysqlExecutionRepositoryService.java
+++ b/jdbc-mysql/src/main/java/io/kestra/repository/mysql/MysqlExecutionRepositoryService.java
@@ -16,7 +16,7 @@ public static Condition findCondition(AbstractJdbcRepository<Execution> jdbcRepo
         List<Condition> conditions = new ArrayList<>();
 
         if (query != null) {
-            conditions.add(jdbcRepository.fullTextCondition(Arrays.asList("namespace", "id"), query));
+            conditions.add(jdbcRepository.fullTextCondition(Arrays.asList("namespace", "flow_id", "id"), query));
         }
 
         if (labels != null) {


Test patch: