From 609af9549b5e3f05fd181f3124c4c59a7011b41e Mon Sep 17 00:00:00 2001 From: broisnischal Date: Sun, 5 Jul 2026 12:28:41 +0545 Subject: [PATCH 1/2] fix(sql): readable error panel, non-overflowing history tabs, 60s query timeout - Error strip: move the label + 'Fix with AI' action to a header row above a full-width message, and wrap the message with overflow-wrap:anywhere instead of break-all (which chopped ordinary words mid-character). - Query history panel: the History/Saved/Charts tabs overflowed the 224px panel and spilled over the editor toolbar. Widen the panel to w-64, tighten tab padding/gap, and clip the tab group as a safety. - Raise the ad-hoc SQL statement timeout 30s -> 60s so heavier scans (e.g. tables with large TOASTed JSON columns like resume_parsing) finish. - Add an actionable hint under statement-timeout errors. --- src-tauri/src/db/query.rs | 5 +++-- src/lib/components/QueryHistoryPanel.svelte | 10 ++++++---- src/lib/components/SqlConsole.svelte | 21 ++++++++++++++++----- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src-tauri/src/db/query.rs b/src-tauri/src/db/query.rs index 91c13f9b..57652535 100644 --- a/src-tauri/src/db/query.rs +++ b/src-tauri/src/db/query.rs @@ -1731,8 +1731,9 @@ pub async fn execute_sql_on_conn( /// Hard row cap for ad-hoc SQL execution. Prevents OOM on tables with millions of rows. const EXECUTE_SQL_MAX_ROWS: usize = 1_000_000_000; -/// Statement timeout for ad-hoc queries (milliseconds). -const EXECUTE_SQL_TIMEOUT_MS: i64 = 30_000; +/// Statement timeout for ad-hoc queries (milliseconds). Generous enough for +/// heavier scans (e.g. tables with large TOASTed JSON columns) to finish. +const EXECUTE_SQL_TIMEOUT_MS: i64 = 60_000; async fn execute_sql_pg( pool: &sqlx::PgPool, diff --git a/src/lib/components/QueryHistoryPanel.svelte b/src/lib/components/QueryHistoryPanel.svelte index 1127790a..a3a14b8e 100644 --- a/src/lib/components/QueryHistoryPanel.svelte +++ b/src/lib/components/QueryHistoryPanel.svelte @@ -111,11 +111,13 @@ }} /> {#if visible} -