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

   ### SUMMARY
   
   Chat becomes a first-class contribution type instead of piggybacking on the 
view registry, following the decision to drop the view-based approach 
(`views.registerView(...)` at the `core.chatbot` location).
   
   **Public API (`@apache-superset/core`)**
   - New `chat` namespace (with `./chat` subpath export): 
`registerChat(descriptor, trigger, panel)`, `getChat()`, 
`open()`/`close()`/`isOpen()`, `getMode()`/`setMode()` (`'floating' | 
'panel'`), and lifecycle events (`onDidRegisterChat`, `onDidUnregisterChat`, 
`onDidOpen`, `onDidClose`, `onDidChangeMode`, `onDidResizePanel`).
   - Manifest schema: `contributions.chat` added; the `app.chatbot` view 
location and `AppLocation` scope are removed.
   
   **Host**
   - New chat registry in `src/core/chat` implementing the API with singleton 
resolution per RFC ยง4.3: the most-recently-registered chat is active, and 
disposing it falls back to the previous registration. Exposed to extensions on 
`window.superset.chat`.
   - `ChatbotMount` is renamed to `ChatMount` and driven by the registry: 
floating mode renders the extension-owned trigger bubble plus the panel while 
open; panel mode hides the trigger and docks the open panel on the right edge 
as an interim stand-in until the host grows a real header/footer layout slot 
and resizer chrome (`onDidResizePanel` is exposed but only fires once that 
chrome exists).
   - The chatbot-era view-registry helpers (`subscribeToRegistry`, 
`getRegistryVersion`, `getViewProvider`, `getRegisteredViewIds`) are removed, 
returning the views registry to its descriptor-only surface.
   
   **Compatibility with `EXTENSION_DENYLIST` (#40668)**: enforcement is 
id/version-based and applied in `get_extensions()` upstream of everything the 
frontend consumes, so a denylisted chat extension is never served, never 
registers, and the mount renders nothing. The backend `Manifest` model 
validates manifests carrying `contributions.chat` unchanged.
   
   Extension migration: replace `views.registerView({...}, 'core.chatbot', 
provider)` with `chat.registerChat({ id, name }, () => <Trigger />, () => 
<Panel />)` and drive visibility with `chat.open()`/`chat.close()`.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   N/A โ€” no visual change unless a chat extension is installed.
   
   ### TESTING INSTRUCTIONS
   
   1. `npm run test -- src/core/chat src/components/ChatMount src/core/views 
src/extensions` (33 tests).
   2. Manual: with `ENABLE_EXTENSIONS` on, load an extension that calls 
`chat.registerChat(...)` โ€” the trigger bubble appears bottom-right; 
`chat.open()` mounts the panel above it; `chat.setMode('panel')` docks the 
panel to the right edge and hides the trigger; disposing the registration 
removes the mount.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [x] Required feature flags: `ENABLE_EXTENSIONS`
   - [x] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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
   - [x] Removes existing feature or API
   
   ๐Ÿค– Generated with [Claude Code](https://claude.com/claude-code)


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