Bug: Using Fix error with AI in SQL editor may delete entire query when switching tabs
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 222
Description
Bug Description
Bug description
In the SQL editor, doing "Fix error with AI" in one tab, then switching to another to work on something else while that ran (very common pattern when one uses AI powered IDEs like cursor), may delete the content of tab where AI is fixing the query when you switch back to it, with no way to undo.
The user has to dig through the query_log to try and recover it.
How to reproduce
- Open multiple tabs in the SQL editor
- Add an error to any tab and run the query to get the "Fix with AI" button
- Click "Fix with AI" and while it's running, switch to another tab
- When it's finished, switch back to the tab AI was fixing
Additional context
From: https://posthoghelp.zendesk.com/agent/tickets/30246 (moved to PostHog: https://us.posthog.com/project/2/support/tickets/31833)
Debug info
null
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the SQL editor by reproducing the multi-tab "Fix with AI" flow: trigger the fix in one tab, switch tabs while it runs, and return when it finishes. Trace how the active tab and query content are handled during the AI response, using query_log only as the reported recovery path. Done means the original query remains intact when switching tabs during the fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100