The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:
TypeScript analyticsbibusiness-intelligencebusinessintelligenceclojuredashboarddatadata-analysisdata-visualizationdatabasemetabasemysqlpostgrespostgresqlreportingslacksql-editorvisualization
Cleanup from #68433 (#68481)
Sloan Sparger48bf58b1621f
diff --git a/e2e/test/scenarios/metabot/transforms-codegen.cy.spec.ts b/e2e/test/scenarios/metabot/transforms-codegen.cy.spec.tsindex 842ac058ec9..81462b104c8 100644--- a/e2e/test/scenarios/metabot/transforms-codegen.cy.spec.ts+++ b/e2e/test/scenarios/metabot/transforms-codegen.cy.spec.ts@@ -60,7 +60,7 @@ const assertEditorDiffState = (opts: { exists: boolean }) => {.should(should);};-const sendCodgeBotMessage = (message: string) => {+const sendCodgenBotMessage = (message: string) => {H.sendMetabotMessage(message);cy.wait("@metabotAgent").its("request.body").should("deep.include", {profile_id: "transforms_codegen",@@ -103,7 +103,7 @@ describe(createMockNativeTransformJSON(null, WRITABLE_DB_ID, "SELECT 1"),),});- sendCodgeBotMessage(+ sendCodgenBotMessage("Create a new native SQL transform that gives me the number 1",);assertSuggestionInSidebar({ newSourcePartial: "SELECT 1" });@@ -122,7 +122,7 @@ describe(createMockNativeTransformJSON(null, WRITABLE_DB_ID, "SELECT 2"),),});- sendCodgeBotMessage("Make this give me the number 2 instead");+ sendCodgenBotMessage("Make this give me the number 2 instead");assertSuggestionInSidebar({oldSourcePartial: "SELECT 1",newSourcePartial: "SELECT 2",@@ -144,7 +144,7 @@ describe(createMockNativeTransformJSON(null, WRITABLE_DB_ID, "SELECT 4"),),});- sendCodgeBotMessage("Make this give me the number 4 instead");+ sendCodgenBotMessage("Make this give me the number 4 instead");assertSuggestionInSidebar({oldSourcePartial: "SELECT 3",newSourcePartial: "SELECT 4",@@ -173,7 +173,7 @@ describe(),),});- sendCodgeBotMessage(+ sendCodgenBotMessage("Create a new native python transform that gives me the number 1",);assertSuggestionInSidebar({@@ -199,7 +199,7 @@ describe(),),});- sendCodgeBotMessage("Make this give me the number 2 instead");+ sendCodgenBotMessage("Make this give me the number 2 instead");assertSuggestionInSidebar({oldSourcePartial: "pd.DataFrame({'value': [1]})",newSourcePartial: "pd.DataFrame({'value': [2]})",@@ -233,7 +233,7 @@ describe(),),});- sendCodgeBotMessage("Make this give me the number 4 instead");+ sendCodgenBotMessage("Make this give me the number 4 instead");assertSuggestionInSidebar({oldSourcePartial: "pd.DataFrame({'value': [3]})",newSourcePartial: "pd.DataFrame({'value': [4]})",@@ -281,7 +281,7 @@ describe(),),});- sendCodgeBotMessage(+ sendCodgenBotMessage("Create a transform that queries the Test Model",);assertSuggestionInSidebar({ newSourcePartial: "SELECT * FROM" });@@ -326,7 +326,7 @@ describe(),});});- sendCodgeBotMessage(+ sendCodgenBotMessage("Update my SQL transform to select 2 instead of 1.",);assertSuggestionInSidebar({@@ -359,7 +359,7 @@ describe(),});});- sendCodgeBotMessage("Make this give me the number 4 instead");+ sendCodgenBotMessage("Make this give me the number 4 instead");assertSuggestionInSidebar({oldSourcePartial: "SELECT 3",newSourcePartial: "SELECT 4",@@ -403,7 +403,7 @@ describe(),});});- sendCodgeBotMessage(+ sendCodgenBotMessage("Update my SQL transform to select 2 instead of 1.",);assertSuggestionInSidebar({@@ -445,7 +445,7 @@ describe(),),});- sendCodgeBotMessage("Make this give me the number 4 instead");+ sendCodgenBotMessage("Make this give me the number 4 instead");assertSuggestionInSidebar({oldSourcePartial: "pd.DataFrame({'value': [3]})",newSourcePartial: "pd.DataFrame({'value': [4]})",diff --git a/enterprise/frontend/src/metabase-enterprise/metabot/state/selectors.ts b/enterprise/frontend/src/metabase-enterprise/metabot/state/selectors.tsindex ca10a262b71..315278e95ac 100644--- a/enterprise/frontend/src/metabase-enterprise/metabot/state/selectors.ts+++ b/enterprise/frontend/src/metabase-enterprise/metabot/state/selectors.ts@@ -3,6 +3,7 @@ import { match } from "ts-pattern";import _ from "underscore";import { getIsEmbedding } from "metabase/selectors/embed";+import { getLocation } from "metabase/selectors/routing";import { Urls } from "metabase-enterprise/urls";import type { TransformId } from "metabase-types/api";@@ -198,8 +199,8 @@ export const getProfileOverride = createSelector();export const getProfile = createSelector(- [getProfileOverride, getDebugMode],- (profileOverride, debugMode) => {+ [getProfileOverride, getDebugMode, getLocation],+ (profileOverride, debugMode, location) => {const isTransformsPage = location.pathname.startsWith(Urls.transformList());return match({ debugMode, isTransformsPage }).with(