feat: Implement chatbot features#3613
Conversation
Greptile SummaryThis PR implements the chatbot trigger feature for workbenches, enabling Slack and Microsoft Teams channels to trigger workbench runs. It adds backend support for the Teams connection type (tenant ID field, GraphQL input/output types) and a full frontend CRUD surface including connection management, per-workbench chatbot configuration, job-result display, and a
Confidence Score: 5/5The change is safe to merge; all credential fields are masked, the feature is opt-in via flag, and the backend schema additions are additive. No logic errors were found in the core chatbot create/edit/delete flows. Sensitive tokens are masked, draft-state round-trips are handled correctly, and refetch queries keep the cache consistent after mutations. The two findings are non-blocking UX polish items. assets/src/components/workbenches/workbench/chatbots/Chatbots.tsx (empty-state flicker) and assets/src/routes/workbenchesRoutes.tsx (routes not gated by feature flag).
|
| Filename | Overview |
|---|---|
| assets/src/components/workbenches/workbench/chatbots/ChatbotConnectionForm.tsx | New form for creating Slack/Teams platform connections; sensitive fields correctly masked with type=password; draft-state round-trip for back-navigation is implemented. |
| assets/src/components/workbenches/workbench/chatbots/ChatbotForm.tsx | New create/edit form for workbench chatbots; correctly guards form interactions during loading; handleSave keying on chatbot object (not mode) is safe because the skeleton prevents interaction while loading. |
| assets/src/components/workbenches/workbench/chatbots/Chatbots.tsx | Chatbot list with delete and edit actions; minor flicker risk in empty-state when connections query hasn't resolved yet. |
| assets/src/routes/workbenchesRoutes.tsx | Four new chatbot routes registered unconditionally; feature flag only gates UI entry points, not the routes themselves. |
| assets/src/components/workbenches/workbench/chatbots/ChatbotDeleteModal.tsx | Simple delete-confirmation modal; refetches both WorkbenchChatbots and WorkbenchTriggersSummary on success. |
| assets/src/components/workbenches/workbench/chatbots/utils.tsx | Utility functions for mapping ChatProviderConnectionType to icons and labels; clean and straightforward. |
| assets/src/components/workbenches/workbench/WorkbenchSidePanel.tsx | Adds chatbots section to the side panel, correctly gated by WorkbenchChatbots feature flag; shows up to 30 chatbots from WorkbenchTriggersSummary query. |
| assets/src/components/workbenches/workbench/Workbench.tsx | Adds Chatbots menu item (feature-flagged) and corrects delete-toast severity from 'danger' to 'success'. |
| assets/src/components/workbenches/workbench/job/WorkbenchJobTriggerChatbot.tsx | New trigger card showing chatbot message details on the job result page; handles null chatbotMessage gracefully. |
| assets/src/components/flows/FeatureFlagContext.tsx | Adds WorkbenchChatbots feature flag, FEATURE_FLAG_LABELS map, and a helper to avoid repeating display strings in the confirmation modal. |
| lib/console/schema/chat_connection.ex | Adds tenant_id field to the Teams embedded schema and includes it in the changeset cast. |
| lib/console/graphql/deployments/integration.ex | Adds Teams input/output types for the GraphQL schema including clientId, clientSecret, and tenantId fields. |
Reviews (3): Last reviewed commit: "add feature flag" | Re-trigger Greptile
…plement-chatbot-features
|
be sure to feature flag this before merging, there's a decent amount of work on the backend still needed here, and will want to ensure its available as one unit. |
|
@michaeljguarino Added.
|

Needed to do some backend changes to allow using Microsoft Teams too, see: 3af4cda.
Test Plan
Test environment: https://console.your-env.onplural.sh/
Checklist
Plural Flow: console