Open Schema and History queries in their own tab #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/schema-history-own-tab"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Schema tab buttons (
▶ SELECT * LIMIT 100,SUMMARIZE,DESCRIBE) and History's▶ Load & Run/Load into Editorcalledset_texton the active editor, replacing whatever document was open. #7 fixed the same problem for data file queries.Fix
open_generated_tab_in(buffers, title, sql, ...), shared by all generated queries:SqlBuffer::is_generatedmarks tabs QryDuck created. User buffers are never reused, even when the title matches.ResultsAction::RunQuickSql(sql)/ReplaceEditorSql(sql)becameRunInTab { title, sql }/OpenInTab { title, sql }:<table>.sql.history.sql.query_data_file) use the same helper.AGENTS.md.The only remaining
set_texton a user document is:ereloading the file from disk.Testing
cargo testpasses (35 tests), including 3 new tests: edited generated tabs are never overwritten, a user buffer with the same title isn't reused, and the untouched scratch buffer is replaced.🤖 Generated with Claude Code