rusackas commented on code in PR #41285:
URL: https://github.com/apache/superset/pull/41285#discussion_r4154935224
##########
superset-frontend/src/core/sqlLab/index.ts:
##########
@@ -440,7 +487,7 @@ const onDidCloseTab: typeof sqlLabApi.onDidCloseTab = (
action.queryEditor.dbId ?? 0,
action.queryEditor.catalog,
action.queryEditor.schema,
- true, // closed
+ { closed: true, backendId: resolveBackendId(action.queryEditor) },
Review Comment:
This one's intentional, not a regression. resolveBackendId already returns
undefined for a tab that's still local-only (no tabViewId yet), same as every
other Tab construction site here. Falling back to the editor id would bring
back the exact bug sadpandajoe flagged earlier in this PR.
##########
superset-frontend/src/core/sqlLab/index.ts:
##########
@@ -557,6 +605,9 @@ const createTab: typeof sqlLabApi.createTab = async (
inheritedValues.queryLimit ?? common?.conf?.DEFAULT_SQLLAB_LIMIT,
autorun: false,
name,
+ ...(options?.northPaneViewId && {
+ northPaneViewId: options.northPaneViewId,
+ }),
Review Comment:
northPaneViewId isn't meant to live on the returned Tab. It's carried on the
queryEditor's own redux state, and SqlEditor reads it from there to pick which
view to render, covered in sqlLab.test.ts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]