EnxDev opened a new pull request, #40433:
URL: https://github.com/apache/superset/pull/40433

   ### SUMMARY
   
   Implements Phase 1 and Phase 2 of the chatbot extension architecture defined 
in the chatbot SIP.
   
   **P1 — Mount point & registration**
   - Extends `ViewContributions` manifest schema with an `app` scope so 
`superset.chatbot` can be declared in `extension.json`
   - Adds `CHATBOT_LOCATION = 'superset.chatbot'` constant and 
`AppViewLocations` structure in `src/views/contributions.ts`
   - Adds host-internal `getViewProvider(location, id)` and 
`getRegisteredViewIds(location)` to `src/core/views` — not exposed on the 
public `@apache-superset/core` API, preserving the `getViews` descriptor-only 
boundary
   - Adds `subscribeToLocation` for reactive re-resolution when the registry 
changes
   - Adds `icon?: string` field to the `View` descriptor (static, set at 
`registerView()` time) and a `ChatbotView` type alias for extension authors
   - Adds `src/core/chatbot/getActiveChatbot` — first-to-register fallback 
policy
   - Adds `ChatbotMount` component: fixed bottom-right, `zIndexPopupBase + 2`, 
host-owned `ErrorBoundary`, reactive via `subscribeToLocation`
   - Mounts `<ChatbotMount />` as a sibling of `<Switch>` inside 
`ExtensionsStartup` so the bubble persists across route changes
   - Host-level `unhandledrejection` isolation in `ExtensionsStartup` covers 
extension async failures
   
   **P2 — Admin & singleton selection**
   - Adds `ExtensionSettings` (singleton row) and `ExtensionEnabled` 
(per-extension flag) SQLAlchemy models
   - Adds Alembic migration `b2c3d4e5f6a7`
   - Adds `GET /api/v1/extensions/settings` and `PUT 
/api/v1/extensions/settings` endpoints
   - `ChatbotMount` fetches `active_chatbot_id` on mount and passes it to 
`getActiveChatbot`
   - `ExtensionsList` shows a "Default chatbot" `Select` picker when more than 
one chatbot is registered
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A — infrastructure only, no visible UI change until a chatbot extension is 
installed.
   
   ### TESTING INSTRUCTIONS
   
   1. Install a chatbot extension that calls `views.registerView({ id: 
'my.chatbot', name: 'My Chatbot' }, 'superset.chatbot', () => <MyBot />)`
   2. Verify the bubble appears fixed at the bottom-right corner across all 
routes
   3. Install two chatbot extensions; verify only one renders at a time
   4. Go to Extensions → set "Default chatbot" → verify the correct one renders
   5. Disable a chatbot via the toggle; verify it stops rendering
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [x] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [x] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
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]

Reply via email to