This is an automated email from the ASF dual-hosted git repository.

EnxDev pushed a commit to branch chat-prototype
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 793ffb3d80c829656968239883281040c490c9bb
Author: Enzo Martellucci <[email protected]>
AuthorDate: Mon May 25 16:43:18 2026 +0200

    feat(extensions): show toast on load failure and export ChatbotView type
---
 .../packages/superset-core/src/contributions/index.ts     |  3 +++
 .../packages/superset-core/src/views/index.ts             | 15 +++++++++++++++
 superset-frontend/src/extensions/ExtensionsLoader.ts      |  6 ++++++
 3 files changed, 24 insertions(+)

diff --git 
a/superset-frontend/packages/superset-core/src/contributions/index.ts 
b/superset-frontend/packages/superset-core/src/contributions/index.ts
index 787f10261b5..42dddd90647 100644
--- a/superset-frontend/packages/superset-core/src/contributions/index.ts
+++ b/superset-frontend/packages/superset-core/src/contributions/index.ts
@@ -18,8 +18,11 @@
  */
 
 import { View } from '../views';
+import type { ChatbotView } from '../views';
 import { Menu } from '../menus';
 
+export type { ChatbotView };
+
 export type SqlLabLocation =
   | 'leftSidebar'
   | 'rightSidebar'
diff --git a/superset-frontend/packages/superset-core/src/views/index.ts 
b/superset-frontend/packages/superset-core/src/views/index.ts
index ceb9e7fba25..c3a6ce9baa6 100644
--- a/superset-frontend/packages/superset-core/src/views/index.ts
+++ b/superset-frontend/packages/superset-core/src/views/index.ts
@@ -81,6 +81,21 @@ export declare function registerView(
   provider: () => ReactElement,
 ): Disposable;
 
+/**
+ * Narrowed descriptor for chatbot contributions (`superset.chatbot` location).
+ *
+ * Extension authors should use this type when calling `registerView` for the
+ * chatbot area. It is identical to {@link View} but makes the registration
+ * intent explicit and allows future narrowing (e.g. required `icon`).
+ *
+ * @example
+ * ```typescript
+ * const chatbot: ChatbotView = { id: 'my_ext.chatbot', name: 'My Chatbot', 
icon: 'Bubble' };
+ * views.registerView(chatbot, 'superset.chatbot', () => <ChatbotApp />);
+ * ```
+ */
+export type ChatbotView = View;
+
 /**
  * Retrieves all views registered at a specific location.
  *
diff --git a/superset-frontend/src/extensions/ExtensionsLoader.ts 
b/superset-frontend/src/extensions/ExtensionsLoader.ts
index 7b1f1564424..cd99a27dce2 100644
--- a/superset-frontend/src/extensions/ExtensionsLoader.ts
+++ b/superset-frontend/src/extensions/ExtensionsLoader.ts
@@ -17,8 +17,11 @@
  * under the License.
  */
 import { SupersetClient } from '@superset-ui/core';
+import { t } from '@apache-superset/core/translation';
 import { logging } from '@apache-superset/core/utils';
 import type { common as core } from '@apache-superset/core';
+import { addDangerToast } from 'src/components/MessageToasts/actions';
+import { store } from 'src/views/store';
 
 type Extension = core.Extension;
 
@@ -100,6 +103,9 @@ class ExtensionsLoader {
         `Failed to initialize extension ${extension.name}\n`,
         error,
       );
+      store.dispatch(
+        addDangerToast(t('Extension "%s" failed to load.', extension.name)),
+      );
     }
   }
 

Reply via email to