Skip to content

fix(frontend): show the waiter while SQL Studio runs a query - #457

Merged
polterguy merged 1 commit into
masterfrom
feat/sql-busy-indicator
Nov 25, 2026
Merged

polterguy merged 1 commit into
masterfrom
feat/sql-busy-indicator

Conversation

@EbubeEvan

@EbubeEvan EbubeEvan commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

A slow query in SQL Studio gave almost no sign it was running: the Run button's label just changed to "Running…". SQL Studio now shows the same full-screen waiter as the Playground and every other slow action on the page while a query runs.

It also ignores a second run while one is still going. Ctrl+Enter in the editor skips the disabled Run button, so before this it could send the same query again.

Changes

  • pages/Sql.tsx: show AiWaiter while execution.busy is true.
  • hooks/useSqlExecution.ts: a ref stops a second execute() call while a run is in progress.
  • Tests: the waiter appears during a run and goes away with the results, and a second call during a run sends no request. Both fail without the fix.

Test plan

  • vitest run src/features/sql: 153 passed
  • ESLint, Prettier and tsc clean
  • Manual: run a slow query in SQL Studio and check the waiter shows, then clears

🤖 Generated with Claude Code

Checked

  • dotnet build magic.sln passes, which includes the analyzer rules, and dotnet test magic.sln passes
  • cd frontend && npm run build && npm run test passes, if the frontend changed
  • The README of the plugin is updated, if a slot, or the way one is used, changed
  • backend/files/config/appsettings.json is not part of the change

A slow query only swapped the Run button's label to "Running…", which is
easy to miss. SQL Studio now shows the same full-screen waiter as the
Playground and every other round-trip on the page.

Also ignore a second run while one is in flight: Ctrl+Enter in the editor
bypasses the disabled Run button and used to send the query again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EbubeEvan
EbubeEvan requested a review from polterguy as a code owner November 25, 2026 18:56
@sonarqubecloud

Copy link
Copy Markdown

@polterguy
polterguy merged commit 2ee22d5 into master Nov 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants