Skip to content

feat: Implement chatbot features#3613

Merged
maciaszczykm merged 17 commits into
masterfrom
marcin/prod-4855-implement-chatbot-features
May 27, 2026
Merged

feat: Implement chatbot features#3613
maciaszczykm merged 17 commits into
masterfrom
marcin/prod-4855-implement-chatbot-features

Conversation

@maciaszczykm

@maciaszczykm maciaszczykm commented May 25, 2026

Copy link
Copy Markdown
Member

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

  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have deployed the agent to a test environment and verified that it works as expected (required only when changing agent code).

Plural Flow: console

@linear

linear Bot commented May 25, 2026

Copy link
Copy Markdown

PROD-4855

@maciaszczykm maciaszczykm added the enhancement New feature or request label May 25, 2026
@maciaszczykm
maciaszczykm marked this pull request as ready for review May 26, 2026 11:29
@maciaszczykm maciaszczykm changed the title feat: Implement chatbot features feat: Implement chatbot features [WIP] May 26, 2026
@greptile-apps

greptile-apps Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This 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 WorkbenchChatbots feature flag.

  • New ChatbotConnectionForm and ChatbotForm components handle platform credential entry and per-workbench chatbot configuration; credential fields are correctly masked as password inputs.
  • WorkbenchSidePanel and WorkbenchJobsTable are updated to surface chatbot triggers inline with existing webhook/cron/issue triggers; the feature is gated behind the WorkbenchChatbots flag in all UI entry points.
  • The Workbench.tsx delete-toast severity fix ('danger''success') and the removal of the displaySavedPromptCategory indirection are small, clean improvements bundled in.

Confidence Score: 5/5

The 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).

Important Files Changed

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

Comment thread assets/src/components/workbenches/workbench/chatbots/Chatbots.tsx Outdated
@maciaszczykm

Copy link
Copy Markdown
Member Author

@greptileai

@maciaszczykm maciaszczykm changed the title feat: Implement chatbot features [WIP] feat: Implement chatbot features May 26, 2026
@maciaszczykm
maciaszczykm requested a review from a team May 26, 2026 15:39
@michaeljguarino

michaeljguarino commented May 26, 2026

Copy link
Copy Markdown
Member

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.

@maciaszczykm

Copy link
Copy Markdown
Member Author

@michaeljguarino Added.

Zrzut ekranu 2026-05-27 o 11 19 11

@maciaszczykm

Copy link
Copy Markdown
Member Author

@greptileai

@maciaszczykm
maciaszczykm merged commit 0b3954e into master May 27, 2026
15 checks passed
@maciaszczykm
maciaszczykm deleted the marcin/prod-4855-implement-chatbot-features branch May 27, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants