From 23991bcc9ed5e6fecef4a2867674398c7ef68708 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 23 Oct 2025 10:49:39 +0000 Subject: [PATCH 1/4] text input prevent immediate propagation --- frontend/src/lib/components/text_input/TextInput.svelte | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/lib/components/text_input/TextInput.svelte b/frontend/src/lib/components/text_input/TextInput.svelte index bcc5ab3bc0..a4b4679873 100644 --- a/frontend/src/lib/components/text_input/TextInput.svelte +++ b/frontend/src/lib/components/text_input/TextInput.svelte @@ -69,6 +69,9 @@ unifiedHeight ? ButtonType.UnifiedHeightClasses[size] : '', className )} + onpointerdown={(e) => { + e.stopImmediatePropagation() + }} bind:this={inputEl} bind:value /> From b5ce75e3d259c21530332aafbd89b47da0a41438 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 23 Oct 2025 10:54:25 +0000 Subject: [PATCH 2/4] docs: add critical warning against SELECT * in worker queries (#6916) Never use SELECT * in queries that workers might execute to ensure backwards compatibility when workers are running behind API server version. New database columns would break outdated workers. Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: windmill-internal-app[bot] --- backend/rust-best-practices.mdc | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/rust-best-practices.mdc b/backend/rust-best-practices.mdc index bdbdb0d24d..2df01d98bf 100644 --- a/backend/rust-best-practices.mdc +++ b/backend/rust-best-practices.mdc @@ -65,6 +65,7 @@ When generating code, especially involving `serde`, `sqlx`, and `tokio`, priorit ### SQLx Optimizations (Database Interaction) +- **CRITICAL - Never Use `SELECT *` in Worker-Executed Queries:** For any query that can potentially be executed by workers, **always** explicitly list the specific columns you need instead of using `SELECT *`. This is essential for backwards compatibility: when workers are running behind the API server version (common in distributed deployments), adding new columns to database tables will cause outdated workers to fail when they try to deserialize rows with unexpected columns. Always use explicit column lists like `SELECT id, workspace_id, path, created_at FROM table` instead of `SELECT * FROM table`. - **Select Only Necessary Columns:** In `SELECT` queries, list specific column names rather than using `SELECT *`. This reduces data transferred from the database and the work needed for hydration/deserialization. - **Batch Operations:** For multiple `INSERT`, `UPDATE`, or `DELETE` statements, prefer executing them in a single query if the database and driver support it efficiently (e.g., `INSERT INTO ... VALUES (...), (...), ...`). This minimizes round trips to the database. - **Avoid N+1 Queries:** Do not loop through results of one query and execute a separate query for each item (e.g., fetching users, then querying for each user's profile in a loop). Instead, use JOINs or a single query with an `IN` clause to fetch related data efficiently. From f06f3bca852969a41e029d3a61bbfd96901b6a2c Mon Sep 17 00:00:00 2001 From: Diego Imbert <70353967+diegoimbert@users.noreply.github.com> Date: Thu, 23 Oct 2025 13:21:15 +0200 Subject: [PATCH 3/4] fix regression bug, toggle button height in input transform form (#6918) --- frontend/src/lib/components/InputTransformForm.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/InputTransformForm.svelte b/frontend/src/lib/components/InputTransformForm.svelte index 0f18081134..39f0b751ca 100644 --- a/frontend/src/lib/components/InputTransformForm.svelte +++ b/frontend/src/lib/components/InputTransformForm.svelte @@ -19,7 +19,7 @@ import type { PropPickerWrapperContext } from './flows/propPicker/PropPickerWrapper.svelte' import { codeToStaticTemplate, getDefaultExpr } from './flows/utils' import SimpleEditor from './SimpleEditor.svelte' - import { Button } from '$lib/components/common' + import { Button, ButtonType } from '$lib/components/common' import ToggleButtonGroup from '$lib/components/common/toggleButton-v2/ToggleButtonGroup.svelte' import ToggleButton from '$lib/components/common/toggleButton-v2/ToggleButton.svelte' import { tick } from 'svelte' @@ -553,9 +553,10 @@ /> {/if} -
+
{ if (e.detail == propertyType) return const staticTemplate = isStaticTemplate(inputCat) From 073ddbab3a9ca652208d59cdeafb79386fe2e4da Mon Sep 17 00:00:00 2001 From: Diego Imbert <70353967+diegoimbert@users.noreply.github.com> Date: Thu, 23 Oct 2025 13:22:00 +0200 Subject: [PATCH 4/4] fix broken sql completion (#6919) --- frontend/src/lib/components/Editor.svelte | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/components/Editor.svelte b/frontend/src/lib/components/Editor.svelte index 4f78e491b3..527bbc45bd 100644 --- a/frontend/src/lib/components/Editor.svelte +++ b/frontend/src/lib/components/Editor.svelte @@ -492,12 +492,18 @@ if (typeof newSchemaRes === 'string') { const resourcePath = newSchemaRes.replace('$res:', '') dbSchema = $dbSchemas[resourcePath] - if (lang === 'graphql' && dbSchema === undefined) { - await getDbSchemas(lang, resourcePath, $workspaceStore, $dbSchemas, (e) => { - console.error('error getting graphql db schema', e) - }) - dbSchema = $dbSchemas[resourcePath] + if (dbSchema === undefined) { + if (lang === 'graphql') { + await getDbSchemas('graphql', resourcePath, $workspaceStore, $dbSchemas, (e) => { + console.error('error getting graphql db schema', e) + }) + } else if (lang === 'sql') { + await getDbSchemas(scriptLang ?? '', resourcePath, $workspaceStore, $dbSchemas, (e) => { + console.error(`error getting SQL (${scriptLang}) db schema`, e) + }) + } } + dbSchema = $dbSchemas[resourcePath] } else { dbSchema = undefined }