feat(extensions): adds chatbot P1-P2#40433
Conversation
|
Bito Automatic Review Skipped - Branch Excluded |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
6a07ad2 to
222023d
Compare
222023d to
f298e14
Compare
692772c to
a4ddc83
Compare
- Add `app` scope and `AppLocation` type to `ViewContributions` manifest schema - Add host-internal `getViewProvider` and `getRegisteredViewIds` accessors to the views registry - Add `getActiveChatbot` resolver with first-to-register fallback policy - Mount `ChatbotMount` in the app shell (fixed bottom-right, persists across routes
…settings (SIP P1+P2)
…sList - settings.py: @transaction() replaces manual db.session.commit(); strict isinstance(enabled, bool) guard prevents "false" string coercion; active_chatbot_id validated as non-empty string before assignment - ExtensionsList: Switch checked falls back to true (not stale API field); chatbotExtensions useMemo reacts to registry changes via subscribeToLocation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a4ddc83 to
69bd1f2
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## chat-prototype #40433 +/- ##
=================================================
Coverage ? 67.71%
=================================================
Files ? 1852
Lines ? 77104
Branches ? 24705
=================================================
Hits ? 52210
Misses ? 24894
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
aac4597 to
69bd1f2
Compare
SUMMARY
Implements Phase 1 and Phase 2 of the chatbot extension architecture defined in the chatbot SIP.
P1 — Mount point & registration
ViewContributionsmanifest schema with anappscope sosuperset.chatbotcan be declared inextension.jsonCHATBOT_LOCATION = 'superset.chatbot'constant andAppViewLocationsstructure insrc/views/contributions.tsgetViewProvider(location, id)andgetRegisteredViewIds(location)tosrc/core/views— not exposed on the public@apache-superset/coreAPI, preserving thegetViewsdescriptor-only boundarysubscribeToLocationfor reactive re-resolution when the registry changesicon?: stringfield to theViewdescriptor (static, set atregisterView()time) and aChatbotViewtype alias for extension authorssrc/core/chatbot/getActiveChatbot— first-to-register fallback policyChatbotMountcomponent: fixed bottom-right,zIndexPopupBase + 2, host-ownedErrorBoundary, reactive viasubscribeToLocation<ChatbotMount />as a sibling of<Switch>insideExtensionsStartupso the bubble persists across route changesunhandledrejectionisolation inExtensionsStartupcovers extension async failuresP2 — Admin & singleton selection
ExtensionSettings(singleton row) andExtensionEnabled(per-extension flag) SQLAlchemy modelsb2c3d4e5f6a7GET /api/v1/extensions/settingsandPUT /api/v1/extensions/settingsendpointsChatbotMountfetchesactive_chatbot_idon mount and passes it togetActiveChatbotExtensionsListshows a "Default chatbot"Selectpicker when more than one chatbot is registeredBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A — infrastructure only, no visible UI change until a chatbot extension is installed.
TESTING INSTRUCTIONS
views.registerView({ id: 'my.chatbot', name: 'My Chatbot' }, 'superset.chatbot', () => <MyBot />)ADDITIONAL INFORMATION