Skip to content

fix(sql): readable error panel, non-overflowing history tabs, 60s query timeout - #22

Closed
broisnees wants to merge 2 commits into
masterfrom
feat/sql-editor-ux-timeout
Closed

broisnees wants to merge 2 commits into
masterfrom
feat/sql-editor-ux-timeout

Conversation

@broisnees

Copy link
Copy Markdown
Collaborator

Fixes reported while running heavy queries in the SQL editor.

1. Query timeout on large tables

SELECT * FROM resume_parsing was cancelled by the 30s ad-hoc statement timeout. Verified via the stroke MCP: that table is only 746 rows but 429 MB — the weight is two jsonb columns (resume, response) stored in TOAST, so SELECT * detoasts ~429 MB. Row count isn't the issue (a LIMIT wouldn't help — 746 is already tiny).

  • Raised the ad-hoc statement timeout 30s → 60s (EXECUTE_SQL_TIMEOUT_MS in src-tauri/src/db/query.rs) so heavier scans finish.
  • Added an actionable hint under statement-timeout errors, guiding toward selecting specific columns / adding a LIMIT on wide-column tables.

2. Error panel layout (was cramped, words chopped mid-character)

The error strip used break-all, which split ordinary words ("can/celing", "sta/tement"), and the "Fix with AI" button crowded the text. Now the label + action sit on a header row above a full-width message that wraps with overflow-wrap:anywhere (breaks only when a token truly can't fit).

3. History/Saved/Charts tabs overflowing

The three icon+label tabs + hide button exceeded the 224px (w-56) panel and spilled over the editor toolbar. Widened the panel to w-64, tightened tab padding/gap, and clipped the tab group as a safety.

Files

  • src-tauri/src/db/query.rs — timeout 30s → 60s
  • src/lib/components/SqlConsole.svelte — error panel + timeout hint
  • src/lib/components/QueryHistoryPanel.svelte — tab strip fit

Verification

Applied live in a running tauri dev session: frontend HMR updated both components with no compile errors; the query.rs change triggered a Rust rebuild (14.5s) and the app restarted on the 60s timeout.

Separate from #20 (sidebar) and #21 (DML/pane); disjoint files.

…ry 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.
@changeset-bot

changeset-bot Bot commented Jul 5, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4fa8c98

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

The dialog is opened programmatically from Monaco (Cmd+S); bits-ui's
default escape-to-close didn't fire reliably through that focus path in
the WebKit/Tauri webview. Handle Escape explicitly on the name input.
@broisnees

Copy link
Copy Markdown
Collaborator Author

Added a commit: Escape now closes the Save query dialog. It's opened programmatically from Monaco (⌘S), and bits-ui's default escape-to-close wasn't firing through that focus path in the WebKit/Tauri webview — now handled explicitly on the name input. Folded here since it shares SqlConsole.svelte with this PR.

@broisnees

Copy link
Copy Markdown
Collaborator Author

Superseded by combined minor-release PR #36 (same changes, rolled up). Closing to keep a single merge.

@broisnees broisnees closed this Jul 5, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant