fix(ui): propagate schema when creating tabs and new queries

Table/data tabs were missing schema in createTab, so the toolbar
"new query" button couldn't inherit schema from the active tab.
Also add schema to NewQueryTarget so resolveNewQueryTarget
propagates it from both sidebar and active tab contexts.
This commit is contained in:
t8y2
2026-05-24 19:11:06 +08:00
parent e83c335a70
commit 7b9a04ff3e
4 changed files with 8 additions and 6 deletions
@@ -494,7 +494,7 @@ async function openData() {
table: node.label,
dbType: config?.db_type,
});
const tabId = queryStore.createTab(node.connectionId, node.database, node.label, "data");
const tabId = queryStore.createTab(node.connectionId, node.database, node.label, "data", node.schema);
console.info("[DBX][openData:tab-created]", { traceId, tabId, elapsed: elapsed() });
queryStore.setExecuting(tabId, true);