mirror of
https://github.com/supabase/supabase.git
synced 2026-10-11 20:35:07 +03:00
## Problem In the Logs Explorer, clicking the Run button after editing the SQL did not execute the latest query. It ran a stale version. Pressing Cmd+Enter ran the correct, latest query. The Run button's handler read the query from the `editorValue` React state, which can lag behind the most recent keystroke. Cmd+Enter works because Monaco's keybinding reads the live value directly off the editor instance. ## Fix `handleRun` now reads the live value from the editor instance (`editorRef.current.getValue()`), falling back to `editorValue`. This makes the Run button consistent with the Cmd+Enter keybinding. ## How to test - Open the Logs Explorer (Project > Logs > query/explorer). - Type or edit a SQL query in the editor. - Without clicking elsewhere, click the Run button. - Expected result: the query that runs reflects your latest edit, matching the behavior of Cmd+Enter. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Fixed an issue in the logs explorer where SQL queries would not execute with the most recent code changes you've typed. The query runner now uses the latest content from the editor to ensure your most recent edits are run. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>