Open a results tab per document that runs a query #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/per-document-results-tabs"
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
All results shared one slot (
last_outcome), so running a query from a different document replaced the previous document's results.Changes
SqlBuffergets a uniqueid.trigger_querytags each query with the active buffer's id (EngineCommand::ExecuteQuery { sql, source }), and the engine sends it back inEngineEvent::QueryFinished { source, outcome }. Results reach the right document even if you switch tabs or close the document while the query runs.ResultsViewholds aResultTabper source document, shown as a tab strip above the grid. Re-running a query replaces that document's tab. Running from a different document opens a new tab. The finished query's tab comes to the front.GridState, parked while the tab is inactive).×, middle-click, or:clear(active tab). Results tabs stay open when their document is closed.AGENTS.md.Testing
cargo testpasses (21 tests), including 4 newResultsViewtests: new tab vs. replace, separate state per tab, which tab shows after closing one, title sync.🤖 Generated with Claude Code