Skip to content

[feat] Add Microsoft Teams to the channel setup screen - #8235

Merged
mmabrouk merged 21 commits into
release/v0.129.0from
feat/teams-channel-setup
Nov 17, 2026
Merged

mmabrouk merged 21 commits into
release/v0.129.0from
feat/teams-channel-setup

Conversation

@mmabrouk

@mmabrouk mmabrouk commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Context

An agent can answer in Slack, Telegram and WhatsApp, but not in Microsoft Teams. The backend PR #8234 (the base of this one) adds the Teams adapter. Replies and approval cards come in a separate delivery PR. This PR adds the part people see: the Teams row on the agent's Channels card, the setup screen that connects a Teams bot, and a docs page.

What the user sees

  1. The agent's Channels card lists Microsoft Teams with a Teams logo, after WhatsApp.
  2. Choosing it opens a setup screen with four steps and no "Agenta bot or your own bot" choice. Teams has only the user's own bot, as WhatsApp does.
  3. The user pastes three values and clicks "Connect bot". The backend checks them with Microsoft. If Microsoft refuses, the screen shows the backend's message and keeps the values.
  4. After connect, the screen shows the messaging endpoint with a Copy button, a "Download Teams app" button, and the install steps. "Done" closes the screen.
  5. Later, the manage view of the connection shows the same endpoint and download button under "Teams app". A rejected secret shows "Microsoft rejected the client secret" and an "Update token" form for a new secret.

Changes

The setup screen lives in the package @agenta/settings-ui (a shared library of React components, like a Python package that both apps import). The /m app only passes it data.

Platform lists. A frontend "union type" is a fixed list of allowed strings, like a Python Literal. ChannelPlatform was "slack" | "telegram" | "whatsapp" and is now ... | "teams". Several tables of labels are typed Record<ChannelPlatform, string>, which is like a dict that the type checker forces to have one key per platform. I turned a few if slack ... elif whatsapp ... else telegram chains into these tables, so a missing Teams label is a type error instead of silently showing the Telegram text. The Discord setup PR makes the same change in the same shape, so the two PRs conflict only on the added lines.

The setup document. The backend returns the Teams app as a setup document: {format: "zip", content: <base64 of the zip>, filename: "..."}. Before, the UI kept only content and dropped format and filename. Now one parser, setupDocumentOf, keeps all four fields:

before: {manifest: "<content>"}
after:  {format: "zip", content: "<base64>", filename: "agenta-teams-app.zip", link: null}

A new action, teamsAppPackage(connectionId), calls the existing per-connection setup route (fetchChannelConnectionSetup, already in the generated API client) and returns that document. The client method is declared in the same line and shape as in the Discord setup PR, so a merge keeps one copy.

The download. The browser has no "save these bytes" call. The usual way is: decode the base64 with the built-in atob, wrap the bytes in a Blob (an in-memory file), make a temporary URL for it, and click a hidden link with a download file name. The repo already has this in downloadBlob (@agenta/shared/utils), so the PR decodes the base64 and calls it. This needs no new dependency. The package is fetched only when the user clicks the button, because the zip is large and most visits never need it.

Channels and group chats. Teams has two kinds of shared place: team channels and group chats. The backend stores a team channel as a topic space and a group chat as a group space. The UI now names them apart on Teams: a team channel gets the # icon and a group chat gets the group icon, the reply switch says "Channels and group chats", and counts say "chats". Slack, Telegram and WhatsApp keep their words.

The setup steps. All Teams copy is in one file, teamsSetupCopy.ts. The guide follows the Teams Developer Portal path. If the live test shows that this path cannot send replies, only this file and the docs page change. The field labels, help text and GUID error come from the backend's capability declaration, not from the UI.

Docs. New page docs/docs/guides/16-connect-microsoft-teams.mdx: register the bot, find the tenant ID, connect, paste the endpoint, upload the app, how the agent answers in personal chats, team channels and group chats, and troubleshooting for each backend error. It links the Azure portal path as the alternative.

New user-facing strings

Setup steps:

  • "Register a bot" / "In the Teams Developer Portal, open Tools, then Bot management, and select New bot." / "Open the Developer Portal"
  • "Add a client secret" / "On the bot's Client secrets page, add a client secret and copy its value. The app ID is on the bot page."
  • "Copy your tenant ID" / "It is on the Overview page of the Microsoft Entra admin center." / "Open Microsoft Entra"
  • "Paste the three values" / "We check them with Microsoft, then keep the secret masked."
  • "Your bot answers only as this agent. Other bots stay connected." (already used for Telegram)
  • "Connect bot" and "Done" (already used)

After connect and in the manage view:

  • "Connected. Two steps left in Teams."
  • "Paste the messaging endpoint" / "In the Developer Portal, open your bot, then Configure, and paste this as the endpoint address."
  • "Messaging endpoint"
  • "Install the app in Teams" / "Download Teams app"
  • "In Teams, open Apps, then Manage your apps, then Upload an app, and choose the downloaded file." (from the spec)
  • "No Upload an app option? Ask your Teams admin to allow custom apps." (from the spec)
  • "Could not load the Teams app."
  • "Teams app" (manage view section title)

Labels and states:

  • "Microsoft Teams" (platform name)
  • "Chat with the agent in Microsoft Teams" (row with no connection)
  • "Chat with an agent in Microsoft Teams" (settings page description)
  • "Add a Teams bot" (title when the agent already has a Teams bot)
  • "Client secret rejected · update it" and "Client secret rejected" (revoked row)
  • "Microsoft rejected the client secret" / "{agent} cannot answer there until you paste a new client secret."
  • "Client secret" (credential row) and "Client secret value" (fallback field label)
  • "Mention {bot} in a team channel or a group chat. The place appears here." (empty place list)
  • "Channels and group chats" (reply switch and place list title) / "Replies when someone mentions {bot}. In a team channel, it replies in the thread." (switch help)
  • "Chats it answers in", "Chats it can search and read", "All chats the bot is in", "Only these chats", "{n} chats" (Advanced section and row counts)
  • "You can talk to your agents in Slack, Telegram, WhatsApp or Microsoft Teams." (boot tip in /m)

Scope and risk

  • Frontend and docs only. No backend, API client or migration change in this PR. It needs the backend PR [feat] Add the Microsoft Teams channel adapter and inbound route #8234 on the same stack.
  • Slack, Telegram and WhatsApp share the changed label tables and the Advanced section. A wrong table entry would change their copy. The type checker forces one entry per platform, and the QA list below opens the other setup screens.
  • No new npm dependency. The download reuses the shared downloadBlob helper.
  • Deploy steps: none.

How to review

Read in this order:

  1. web/packages/agenta-settings-ui/src/channels/types.ts: the new platform, ChannelSetupDocument, and the teamsAppPackage action.
  2. actions.ts: setupDocumentOf, teamsAppPackage, and the platform list.
  3. helpers.ts: the label tables, hasChannels, placeNoun, and the two download helpers at the end (base64Bytes, downloadSetupDocument). chatTypeOf in actions.ts maps a Teams topic to a channel and a group to a group.
  4. teamsSetupCopy.ts, then TeamsAppSetup.tsx: the copy, and the component that shows the endpoint and the download.
  5. ChannelConnectFlow.tsx: the Teams branch (search for isTeams).
  6. ChannelManagePanel.tsx: the "Teams app" section and the revoked copy.
  7. ChannelAdvancedSection.tsx: the same change as in the Discord PR, so the Telegram-only help no longer shows for other platforms.
  8. web/mobile/src: four small list updates.
  9. tests/unit/channelTeams.test.tsx, then the docs page.

Tests

  • New channelTeams.test.tsx (14 tests): the steps and three fields, the GUID error blocks Connect, connect then the endpoint and download, the downloaded file has the decoded bytes and the right name, copy, a failed package load, a refused connect keeps the values, the request shapes sent to the API client, and the manage view.
  • All @agenta/settings-ui unit tests pass (31 files, 307 tests). The mobile channel tests pass.
  • Type checks pass for @agenta/settings-ui and @agenta/mobile. pnpm lint passes in web.
  • Not done: a live run against Microsoft. That is task 4 in the spec, on one stack with all three PRs. The docs build was not run.

What to QA

Needs the backend PR on the same stack and a Teams bot in a test tenant.

  • Open an agent, then Channels, then Microsoft Teams. The four steps show, with no method choice.
  • Enter an app ID that is not a GUID. The field shows "Enter the ID as a GUID, for example 00000000-0000-0000-0000-000000000000." and Connect stays off.
  • Connect with a wrong secret. The screen shows Microsoft's refusal and keeps the values.
  • Connect with the right values. The endpoint shows; Copy copies it; "Download Teams app" saves a zip that Teams accepts under Upload an app.
  • Close and open the connection again. The "Teams app" section shows the same endpoint and download.
  • Regression: open the Telegram and WhatsApp setup screens. They look as before; the Telegram history note shows only for Telegram.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 8 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between d051269 and c58548d.

Files selected for processing: 96

  • docs/docs/guides/16-connect-microsoft-teams.mdx
  • openspec/changes/teams-channel/tasks.md
  • web/mobile/src/features/agents/useAgentChannels.ts
  • web/mobile/src/features/chat/useAgentPrivacyProps.ts
  • web/mobile/src/lib/sharingCopy.ts
  • web/mobile/tests/unit/agentChannelSharing.render.test.tsx
  • web/mobile/tests/unit/agentChannelsReload.render.test.tsx
  • web/packages/agenta-i18n/locales/.meta/de-DE.json
  • web/packages/agenta-i18n/locales/.meta/es-ES.json
  • web/packages/agenta-i18n/locales/.meta/fr-FR.json
  • web/packages/agenta-i18n/locales/.meta/ja-JP.json
  • web/packages/agenta-i18n/locales/.meta/pt-BR.json
  • web/packages/agenta-i18n/locales/.meta/zh-CN.json
  • web/packages/agenta-i18n/locales/de-DE/agents.overview.json
  • web/packages/agenta-i18n/locales/de-DE/channels.advanced.json
  • web/packages/agenta-i18n/locales/de-DE/channels.labels.json
  • web/packages/agenta-i18n/locales/de-DE/channels.manage.json
  • web/packages/agenta-i18n/locales/de-DE/channels.page.json
  • web/packages/agenta-i18n/locales/de-DE/channels.panel.json
  • web/packages/agenta-i18n/locales/de-DE/channels.status.json
  • web/packages/agenta-i18n/locales/de-DE/channels.teams.json
  • web/packages/agenta-i18n/locales/de-DE/shell.bootLoader.json
  • web/packages/agenta-i18n/locales/en/agents.overview.json
  • web/packages/agenta-i18n/locales/en/channels.advanced.json
  • web/packages/agenta-i18n/locales/en/channels.labels.json
  • web/packages/agenta-i18n/locales/en/channels.manage.json
  • web/packages/agenta-i18n/locales/en/channels.page.json
  • web/packages/agenta-i18n/locales/en/channels.panel.json
  • web/packages/agenta-i18n/locales/en/channels.status.json
  • web/packages/agenta-i18n/locales/en/channels.teams.json
  • web/packages/agenta-i18n/locales/en/shell.bootLoader.json
  • web/packages/agenta-i18n/locales/es-ES/agents.overview.json
  • web/packages/agenta-i18n/locales/es-ES/channels.advanced.json
  • web/packages/agenta-i18n/locales/es-ES/channels.labels.json
  • web/packages/agenta-i18n/locales/es-ES/channels.manage.json
  • web/packages/agenta-i18n/locales/es-ES/channels.page.json
  • web/packages/agenta-i18n/locales/es-ES/channels.panel.json
  • web/packages/agenta-i18n/locales/es-ES/channels.status.json
  • web/packages/agenta-i18n/locales/es-ES/channels.teams.json
  • web/packages/agenta-i18n/locales/es-ES/shell.bootLoader.json
  • web/packages/agenta-i18n/locales/fr-FR/agents.overview.json
  • web/packages/agenta-i18n/locales/fr-FR/channels.advanced.json
  • web/packages/agenta-i18n/locales/fr-FR/channels.labels.json
  • web/packages/agenta-i18n/locales/fr-FR/channels.manage.json
  • web/packages/agenta-i18n/locales/fr-FR/channels.page.json
  • web/packages/agenta-i18n/locales/fr-FR/channels.panel.json
  • web/packages/agenta-i18n/locales/fr-FR/channels.status.json
  • web/packages/agenta-i18n/locales/fr-FR/channels.teams.json
  • web/packages/agenta-i18n/locales/fr-FR/shell.bootLoader.json
  • web/packages/agenta-i18n/locales/ja-JP/agents.overview.json
  • web/packages/agenta-i18n/locales/ja-JP/channels.advanced.json
  • web/packages/agenta-i18n/locales/ja-JP/channels.labels.json
  • web/packages/agenta-i18n/locales/ja-JP/channels.manage.json
  • web/packages/agenta-i18n/locales/ja-JP/channels.page.json
  • web/packages/agenta-i18n/locales/ja-JP/channels.panel.json
  • web/packages/agenta-i18n/locales/ja-JP/channels.status.json
  • web/packages/agenta-i18n/locales/ja-JP/channels.teams.json
  • web/packages/agenta-i18n/locales/ja-JP/shell.bootLoader.json
  • web/packages/agenta-i18n/locales/pt-BR/agents.overview.json
  • web/packages/agenta-i18n/locales/pt-BR/channels.advanced.json
  • web/packages/agenta-i18n/locales/pt-BR/channels.labels.json
  • web/packages/agenta-i18n/locales/pt-BR/channels.manage.json
  • web/packages/agenta-i18n/locales/pt-BR/channels.page.json
  • web/packages/agenta-i18n/locales/pt-BR/channels.panel.json
  • web/packages/agenta-i18n/locales/pt-BR/channels.status.json
  • web/packages/agenta-i18n/locales/pt-BR/channels.teams.json
  • web/packages/agenta-i18n/locales/pt-BR/shell.bootLoader.json
  • web/packages/agenta-i18n/locales/zh-CN/agents.overview.json
  • web/packages/agenta-i18n/locales/zh-CN/channels.advanced.json
  • web/packages/agenta-i18n/locales/zh-CN/channels.labels.json
  • web/packages/agenta-i18n/locales/zh-CN/channels.manage.json
  • web/packages/agenta-i18n/locales/zh-CN/channels.page.json
  • web/packages/agenta-i18n/locales/zh-CN/channels.panel.json
  • web/packages/agenta-i18n/locales/zh-CN/channels.status.json
  • web/packages/agenta-i18n/locales/zh-CN/channels.teams.json
  • web/packages/agenta-i18n/locales/zh-CN/shell.bootLoader.json
  • web/packages/agenta-i18n/src/catalogs/channels.teams.ts
  • web/packages/agenta-settings-ui/src/channels/ChannelAdvancedSection.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelConnectFlow.stories.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelConnectFlow.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.stories.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.tsx
  • web/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsx
  • web/packages/agenta-settings-ui/src/channels/TeamsAppSetup.tsx
  • web/packages/agenta-settings-ui/src/channels/WhatsAppWebhook.tsx
  • web/packages/agenta-settings-ui/src/channels/actions.ts
  • web/packages/agenta-settings-ui/src/channels/helpers.ts
  • web/packages/agenta-settings-ui/src/channels/icons.tsx
  • web/packages/agenta-settings-ui/src/channels/storyFixtures.tsx
  • web/packages/agenta-settings-ui/src/channels/types.ts
  • web/packages/agenta-settings-ui/src/channels/useChannelPanel.tsx
  • web/packages/agenta-settings-ui/src/publish/AgentPublish.stories.tsx
  • web/packages/agenta-settings-ui/tests/unit/agentPublish.test.tsx
  • web/packages/agenta-settings-ui/tests/unit/channelDiscord.test.tsx
  • web/packages/agenta-settings-ui/tests/unit/channelTeams.test.tsx
  • web/packages/agenta-settings-ui/tests/unit/channelsDisconnect.test.tsx

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features

    • Added Microsoft Teams as a platform for connecting and managing agents.
    • Guided setup helps connect a Teams bot to Agenta, configure its messaging endpoint, and install the Teams app. You can copy the endpoint and download the app package.
    • Teams settings explain behavior in personal chats, group chats, and channels, including mention requirements and connection status.
    • Added a guide covering setup, conversation behavior, troubleshooting, and integration limits.
  • Bug Fixes

    • Improved platform-specific labels and guidance in channel settings, including clearer Teams credential and connection error messages.

This change adds Microsoft Teams as a channel in the settings UI. It adds credential connection, channel and group handling, endpoint display, app-package download, and Teams-specific guidance. It also updates publishing, privacy checks, mobile channel labels, tests, and a connection guide.

Changes: Microsoft Teams channel integration

Layer / File(s) Summary
Platform contract and channel behavior
web/packages/agenta-settings-ui/src/channels/types.ts, actions.ts, helpers.ts, ChannelAdvancedSection.tsx, openspec/changes/teams-channel/tasks.md
Channel types and connection actions now include Teams. Setup documents retain format, content, filename, and link. Platform helpers and channel settings use Teams-specific place labels and classify Teams topics as channels.
Teams credential connection flow
web/packages/agenta-settings-ui/src/channels/ChannelConnectFlow.tsx, teamsSetupCopy.ts, storyFixtures.tsx, ChannelConnectFlow.stories.tsx, web/packages/agenta-settings-ui/tests/unit/channelTeams.test.tsx
Teams uses a custom connection flow with bot registration instructions, app and tenant ID fields, a client-secret field, and a retained connection state. Tests cover validation, connection payloads, and setup behavior.
App package and connection management
web/packages/agenta-settings-ui/src/channels/TeamsAppSetup.tsx, ChannelManagePanel.tsx, WhatsAppWebhook.tsx, storyFixtures.tsx, ChannelManagePanel.stories.tsx, web/packages/agenta-settings-ui/tests/unit/channelTeams.test.tsx
The management panel shows Teams connection details, client-secret status, and the messaging endpoint. The app setup component retrieves and downloads the Teams package and displays download errors.
Channel surfaces and supporting fixtures
docs/docs/guides/16-connect-microsoft-teams.mdx, web/mobile/src/features/..., web/mobile/src/lib/sharingCopy.ts, web/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsx, icons.tsx, useChannelPanel.tsx, web/packages/agenta-settings-ui/src/publish/*, web/packages/agenta-settings-ui/tests/unit/agentPublish.test.tsx, channelsDisconnect.test.tsx, web/mobile/tests/unit/*
Mobile and publishing surfaces now include Teams connection labels and state. The guide describes Teams setup, conversation behavior, troubleshooting, and documented limits. Related stories and tests include Teams connection values.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  actor TeamsUser
  participant ChannelConnectFlow
  participant ChannelsActions
  participant TeamsAppSetup
  TeamsUser->>ChannelConnectFlow: enter Teams credentials
  ChannelConnectFlow->>ChannelsActions: connectCustom with credentials
  ChannelsActions-->>ChannelConnectFlow: created connection
  TeamsUser->>TeamsAppSetup: request app package download
  TeamsAppSetup->>ChannelsActions: teamsAppPackage(connectionId)
  ChannelsActions-->>TeamsAppSetup: setup document or null
  TeamsAppSetup-->>TeamsUser: download package or show error
Loading

Possibly related PRs

  • Agenta-AI/agenta#8234: Adds the Teams backend adapter and setup-document endpoint used by the Teams UI.
Merge Risk: Minimal · previous review d0512

This adds Microsoft Teams to the channel setup and management screens, plus a setup guide. No concrete defects were found. The agent-name fix still needs a live recheck, which is routine before merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "[feat] Add Microsoft Teams to the channel setup screen" matches the main change. The changeset adds a Teams connection flow, setup UI, and platform labels to the channel setup screen in @ag…
Description check Passed The description explains the Teams row on the Channels card, the four-step setup screen, the setup document download, the channel and group chat distinction, the docs page, tests, and QA steps. It mat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "[feat] Add Microsoft Teams to the channel setup screen" matches the main change. The changeset adds a Teams connection flow, setup UI, and platform labels to the channel setup screen in @agenta/settings-ui, along with mobile list updates and a docs guide.

Full details: Description check

Explanation

The description explains the Teams row on the Channels card, the four-step setup screen, the setup document download, the channel and group chat distinction, the docs page, tests, and QA steps. It matches the changeset closely.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between c10aa1a and d051269.

Files selected for processing: 1

  • openspec/changes/teams-channel/tasks.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

📘 Docs preview

Status ✅ Ready
Preview https://pr-8235-agenta-docs-preview.mahmoud-637.workers.dev/docs/
Inspect Actions run
Commit c58548d46e8157fcf50f5babb66883609174e466

Pages changed in this pull request

This comment updates in place on every push.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Website preview

Preview URL: https://pr-8235-agenta-website-preview.mahmoud-637.workers.dev

Built from c58548d46e8157fcf50f5babb66883609174e466. This comment updates in place on every push.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Railway Preview Environment

Item Value
Status stopped
Commit 4e98701e4e150986d33f4845553d71e67c98df55
Manual expiry (UTC) Not granted
CI deadline (UTC) Not granted
Workflow https://github.com/Agenta-AI/agenta/actions/runs/44135937417

Dependent tests finished. Post /preview for manual review. Environment absence verified; retained storage requires separate provider accounting.

Post /preview as a new comment to request a one-hour preview. Repeating it while active does not extend the hour.
Preview data is disposable. Expiry is enforced by the next successful cleanup sweep, not an exact timer.
Environment deletion stops its compute. Provider-retained storage and permanent services may still be billed.

…hared helpers

Teams group chats are no longer called channels: the space kind picks the noun and icon,
and the Teams switch and headings say channels and group chats. The setup download uses
downloadBlob, the revoked row text is a typed map, the load error is written once, the
created connection is one state, and ownOnly is now customOnly. Spec task 3.2 now
describes one action per platform with one shared parser.
The Teams read settings card lists team channels and group chats, so it says chats like
the answers-in card. placeNoun reads a typed map, two comments are updated, and a test
checks the Teams row count.
@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Review loop result for head bc5b3905912df50ff47ae7a79a30879146eadf97 (base 35a4929984a9a9e5f4c553058a90b607ab2ac47a), 2 rounds.

Lens Final rating
Simplify Low
Slop Low

Fixed:

  • The Teams download uses the shared downloadBlob helper instead of its own copy.
  • The revoked row text and the Teams place noun are typed maps, so a missing platform is a type error.
  • "Could not load the Teams app." is written once.
  • The connect flow keeps one state for the connection it just created, for WhatsApp and Teams.
  • The read settings card on Teams says "chats", the same word as the rest of the Advanced section (commit b90bcd4, after this head; the naming round 3 reviewed it).
  • A test checks the Teams row count ("2 chats"), and two stale comments are updated.

Left on purpose:

  • ChannelSetupDocument.link stays. It mirrors the backend setup document, and the Discord setup branch reads it through the same parser.
  • The "Try again" button stays next to the WhatsApp one. A shared element would add a layer for about ten lines.
  • The guide keeps the short Azure portal note. The spec asks for it, and the main path is the Teams Developer Portal.
  • The Teams copy keeps its own module, because the connect flow and the manage panel both use it.
  • Deferred: the revoked title, body and credential text in the manage panel are still conditional expressions per platform. That code is older than this PR.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Review loop result for head bc5b3905912df50ff47ae7a79a30879146eadf97 (base 35a4929984a9a9e5f4c553058a90b607ab2ac47a), 2 rounds.

Lens Final rating
Correctness Low
Security Low

Fixed:

  • Teams group chats were counted and labeled as channels, and the switch help promised threads in group chats. Now a team channel is a channel and a group chat is a group, and the help says threads apply in team channels only.

Left on purpose:

  • Round 1 rated correctness High because the Teams adapter was missing at the merge base. That base was the spec commit, from before the adapter commits. The PR merges into the adapter branch, and the branch now has it merged in.
  • Open question for the backend: the adapter never marks a Teams connection as revoked today, so the "Microsoft rejected the client secret" copy may not show until it does.
  • Later commits (b90bcd4 and a merge of the base branch) change only labels, a test and backend files from the base PR.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Review loop result for head e9077fe4e31ae7c9c3dd0ae4c17eac2977880ea5 (base 9a3e171bbaa0dd82fefadc52250a6780871aff37), 3 rounds.

Lens Final rating
Naming Low

Rounds 1 and 2 used the old merge base 35a4929984a9a9e5f4c553058a90b607ab2ac47a. Round 3 used the new merge base after the branch merged its base branch, so it saw only this PR's own changes.

Fixed:

  • Teams group chats have their own name. The reply switch and the place list say "Channels and group chats", a group chat gets the group icon, and the Advanced section and row counts say "chats".
  • ownOnly is now customOnly, the same word as the custom install mode.
  • Spec task 3.2 now says one named action per platform (teamsAppPackage) with one shared parser (setupDocumentOf).

Left on purpose:

  • Deferred: on Teams, one panel uses "Channels and group chats", "chats" and "place" for the same list. Each label is clear alone. A product choice of one word can follow.
  • Deferred: the Advanced section keeps two Teams title strings next to the placeNoun map.
  • ChannelSetupDocument.link stays, because it mirrors the backend field and the Discord branch reads it.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Review loop result (delta review) for head b90bcd4619e2a45cbff2c1c693d0c3ce0a680243 (base bc5b3905912df50ff47ae7a79a30879146eadf97), 1 round. This covers the one PR commit after the earlier record. The later commits on the branch only merge the base branch.

Lens Final rating
Simplify Low
Slop Low

Fixed: nothing needed.
Left on purpose:

  • The read settings card picks its Teams words with two short inline checks. A shared map for one card would add more code than it saves.
  • No test renders the Teams read card text. The change is copy only, and the row count test covers the shared place noun.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Review loop result (delta review) for head b90bcd4619e2a45cbff2c1c693d0c3ce0a680243 (base bc5b3905912df50ff47ae7a79a30879146eadf97), 1 round. This covers the one PR commit after the earlier record. The later commits on the branch only merge the base branch.

Lens Final rating
Correctness Low
Security Low

Fixed: nothing needed. No findings.
Left on purpose: nothing.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

coderabbitai[bot]

This comment was marked as resolved.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: CodeRabbit nitpicks on 428834f, all fixed in 6cb4223:

  • teamsSetupCopy.ts: the file header comment is one line now.
  • TeamsAppSetup.tsx: the component doc comment is one line now.
  • ChannelConnectFlow.tsx: the created state comment is one line now.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: This PR is ready for your review.

What changed since the review loops: the base branch is merged in twice (backend work from PR 1 only). One commit fixes the CodeRabbit items: the docs page now says you upload the Teams app once, and three comments are one line each.

What I need from you:

  • A code review of the setup screen in @agenta/settings-ui. The PR body lists the read order.
  • A UX check of the new Teams strings. The full list is in the PR body.
  • The two decision page questions (Developer Portal path, mentions only) are still open. The PR follows the recommended answers.

Live QA waits for the Microsoft 365 test tenant.

@mmabrouk

mmabrouk commented Nov 9, 2026

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Ship record for head 6cb4223865. Tier: Program (PR 3 of 3, the setup screen and docs).

Gate Result Head Link
Spec Pending: the two decision page questions are not answered yet. The PR builds on the recommended answers (Developer Portal path, mentions only). n/a openspec/changes/teams-channel/
Design simplify review Low (simplify and naming, 3 rounds) n/a openspec/changes/teams-channel/review-loop.md
Slop and simplicity loop Low bc5b390, delta to b90bcd4 full loop, delta
Correctness and security loop Low bc5b390, delta to b90bcd4 full loop, delta
Naming loop Low e9077fe record
Tests Passed locally: @agenta/settings-ui unit tests (307), mobile channel tests, tsc for both packages, pnpm lint-fix 6cb4223 run on the branch before the push
Live QA Pending: it needs a Microsoft 365 test tenant, which is being set up n/a n/a
CodeRabbit No open items. One docs item and three comment nits, all fixed and answered 428834f review
CI Web image builds green (agenta-web, agenta-web-mobile). Mobile types, TypeScript lint and format, gitleaks green. Web tests not awaited 6cb4223 checks
Docs in sync Yes 6cb4223 docs/docs/guides/16-connect-microsoft-teams.mdx

Later commits after the review heads:

  • 428834f and e9077fe only merge the base branch (backend and spec work from PR 1).
  • 6cb4223 fixes the CodeRabbit items: one docs sentence (the app is uploaded once) and three comments made one line. No code behavior changes.

Deploy steps: none.
Not covered: live QA against Microsoft (no test tenant yet). The Railway preview deploy timed out twice on 428834f while it looked up the Railway project (an outside service). It is not needed for a frontend-only change. The Entire Gates check is an outside service and was not awaited.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Ship record for head c10aa1a1b6. Tier: Program (PR 3 of 3, the setup screen and docs).

Gate Result Head Link
Spec Pending: the two decision page questions are not answered yet. The PR builds on the recommended answers (Developer Portal path, mentions only). n/a openspec/changes/teams-channel/
Design simplify review Low (simplify and naming, 3 rounds) n/a openspec/changes/teams-channel/review-loop.md
Slop and simplicity loop Low bc5b390, deltas to b90bcd4 and c10aa1a full loop, delta, delta
Correctness and security loop Low bc5b390, deltas to b90bcd4 and c10aa1a full loop, delta, delta
Naming loop Low e9077fe record
Tests Passed locally: @agenta/settings-ui unit tests (302 in 30 files, two new tests for the Teams connection name), mobile channel tests, tsc for both packages, pnpm lint-fix c10aa1a run on the branch before the push
Live QA Ran the connect flow live. It found that the downloaded Teams app was named "Teams" and not after the agent. c10aa1a fixes that. The fix is not yet checked again live 6cb4223 n/a
Screenshots No screen changes in c10aa1a. The change is the name in the downloaded app package c10aa1a n/a
CodeRabbit No open items. A review was requested on c10aa1a and it finished with no new comments c10aa1a review
CI Web image builds green (agenta-web, agenta-web-mobile). Mobile types, TypeScript lint and format, gitleaks, migration gate, API, SDK and services tests green. Web tests not awaited c10aa1a checks
Docs in sync Yes c10aa1a docs/docs/guides/16-connect-microsoft-teams.mdx

Later commit after the earlier record:

  • c10aa1a (frontend only): when the setup screen creates a Teams connection for an agent, it sends the agent's display name as the connection name. The app package takes that name, so each agent gets a Teams app with its own name. Slack and Telegram keep their discovered names. With no resolvable agent name, nothing changes.

Deploy steps: none.
Not covered:

  • run-runner-tests is red on one timing test (remote-command.test.ts, "is killed in the sandbox at its lifetime"). It failed twice here. This PR changes no runner code. The same test fails today on an unrelated branch, so the cause is outside this PR.
  • The fixed app name is not yet checked live against Microsoft Teams.
  • The Entire Gates check is an outside service and was not awaited.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says: Live QA record for the Microsoft Teams channel. The full record is on #8234: #8234

Video 1: the setup in /m. The client secret field is masked. The app ID, tenant ID and endpoint address are blurred.

teams-qa-part1-public.mp4

What applies to this PR, all PASS:

  • Setup in /m: the three connect errors show the exact strings. "Microsoft rejected this client secret. Copy the secret's Value, not its Secret ID." "Microsoft found no application with this ID in this tenant." "Microsoft found no directory with this tenant ID."
  • The endpoint field and the package download work.
  • The manifest validates against the v1.16 schema.

Finding fixed during QA: the app was named "Teams" instead of the agent's name. This PR fixes it (the connection is named after the agent). Microsoft's admin catalog refuses an app named after its own product, so the fix also matters for admin upload.

Follow-ups noticed: the manifest uses schema 1.16 and the Developer Portal suggests 1.20. Teams now offers a "Socket mode (Beta)" bot option with no public endpoint.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Ship record for head 7b80a92. Tier: Program (PR 3 of 3, the setup screen and docs).

Gate Result Head Link
Spec Pending: the two decision page questions are not answered yet. The PR builds on the recommended answers (Developer Portal path, mentions only). n/a openspec/changes/teams-channel/
Design simplify review Low (simplify and naming, 3 rounds) n/a openspec/changes/teams-channel/review-loop.md
Slop and simplicity loop Low. Not run again: the merge had no conflicts and does not change this PR's diff. bc5b390, deltas to c10aa1a full loop, delta, delta
Correctness and security loop Low. Not run again, same reason. bc5b390, deltas to c10aa1a full loop, delta, delta
Naming loop Low e9077fe record
Tests CI: run-web-unit-tests now passes (all shards), plus api, sdk, services and runner integration and acceptance. Local on this head: @agenta/settings-ui unit tests (309 passed), mobile channel tests (7 passed), tsc for mobile and settings-ui, pnpm lint-fix. 7b80a92 checks
Live QA Ran the connect flow live. The app name fix in c10aa1a is not yet checked again live. 6cb4223 n/a
Screenshots No screen changes since the earlier record 7b80a92 n/a
CodeRabbit No open items. The merge does not change this PR's diff, so the latest review still covers it. c10aa1a review
CI Web image builds green (agenta-web, agenta-web-mobile). Lint, format, types, CodeQL, gitleaks, migration gate, api, sdk and services tests green. run-web-unit-tests passed. 7b80a92 checks
Docs in sync Yes 7b80a92 docs/docs/guides/16-connect-microsoft-teams.mdx

Commits after the earlier record:

  • 7b80a92 merges the PR 1 head 63bf0b2 (which merged main) into this branch so the PR runs the current CI workflows. The old 12-check-unit-tests.yml on the branch installed Playwright, and Playwright does not support the new ubuntu-latest runner. The merge had no conflicts. It adds no code of this PR: the PR's own diff against its base is the same before and after the merge (same git patch-id).

Deploy steps: none.
Not covered:

  • run-runner-tests fails on one timing test in remote-command.test.ts ("is killed in the sandbox at its lifetime"). This PR changes no runner code. The same test fails today on unrelated branches, for example this run.
  • The Railway preview tests / wait-for-readiness job fails at "Install Playwright browser" (Playwright does not support ubuntu26.04). The release branch fails the same way: run.
  • The fixed app name is not yet checked live against Microsoft Teams. The Entire Gates check is an outside service and was not awaited.

@mmabrouk

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Ship record for head d051269. Tier: Program (PR 3 of 3, the setup screen and docs).

Gate Result Head Link
Spec Pending: the two decision page questions are not answered yet. The PR builds on the recommended answers (Developer Portal path, mentions only). n/a openspec/changes/teams-channel/
Design simplify review Low (simplify and naming, 3 rounds) n/a openspec/changes/teams-channel/review-loop.md
Slop and simplicity loop Low. Not run again: the merge had no conflicts and does not change this PR's diff. bc5b390, deltas to c10aa1a full loop, delta, delta
Correctness and security loop Low. Not run again, same reason. bc5b390, deltas to c10aa1a full loop, delta, delta
Naming loop Low e9077fe record
Tests CI: api, sdk, services and runner integration and acceptance passed. Local on this head: @agenta/settings-ui unit tests (309 passed, 0 failed), tsc for settings-ui, channel unit tests (1657 passed). d051269 checks
Live QA Ran the connect flow live. The app name fix in c10aa1a and the 1.20 manifest are not yet checked live. 6cb4223 n/a
Screenshots No screen changes since the earlier record d051269 n/a
CodeRabbit No open threads. A review of this head was requested and has not arrived; the merge does not change this PR's diff. c10aa1a review
CI Web image builds, lint, format, types, CodeQL, gitleaks, migration gate, api, sdk and services tests green, except the two known failures below. Web tests not awaited. d051269 checks
Docs in sync Yes. The user guide does not name a manifest schema version. d051269 docs/docs/guides/16-connect-microsoft-teams.mdx

Commits after the earlier record:

  • d051269 merges the PR 1 head a83c623 (Teams manifest on schema 1.20) into this branch. The merge had no conflicts and adds no code of this PR.

Deploy steps: none.
Not covered:

  • run-runner-tests fails on one timing test (1 of 4597). This PR changes no runner code. The same test fails on main, and a separate PR fixes it.
  • The Railway preview tests / wait-for-readiness job fails at the Playwright install step, so the Railway preview api, sdk and services tests did not run. The same step fails on main, and a separate PR fixes it. cleanup / mutate and the Entire Gates check were not awaited.
  • The fixed app name and the 1.20 manifest are not yet checked live against Microsoft Teams.

… feat/teams-channel-setup

# Conflicts:
#	web/mobile/src/features/agents/AgentChannelsCard.tsx
#	web/mobile/src/features/app/postAuthBoot.ts
#	web/packages/agenta-settings-ui/src/channels/ChannelAdvancedSection.tsx
#	web/packages/agenta-settings-ui/src/channels/ChannelConnectFlow.tsx
#	web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.tsx
#	web/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsx
#	web/packages/agenta-settings-ui/src/channels/WhatsAppWebhook.tsx
#	web/packages/agenta-settings-ui/src/channels/actions.ts
#	web/packages/agenta-settings-ui/src/channels/helpers.ts
#	web/packages/agenta-settings-ui/src/channels/useChannelPanel.tsx

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 3 potential issues.

3 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment on lines +917 to +921
const teamsAppPackage = async (connectionId: string): Promise<ChannelSetupDocument | null> => {
const res = await client
.fetchChannelConnectionSetup({connection_id: connectionId}, scope())
.catch(rethrow(t("channels.teams.loadError")))
return setupDocumentOf(asRecord(asRecord(res).setup))

@devin-ai-integration devin-ai-integration Bot Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Missing setup response boundary validation

For malformed setup responses, teamsAppPackage silently replaces invalid document fields with null. The frontend API rules require Zod validation through safeParseWithLogging at this boundary. Schema drift therefore produces no structured validation diagnostics.

Learn more

The generated client returns a response that this package treats as unknown. The frontend API rules explicitly require an independent Zod schema and safeParseWithLogging from @agenta/entities/shared for new API boundaries. setupDocumentOf only coerces fields to strings or null; it does not validate the response shape or report structured schema errors.

Example: A setup response contains a numeric document.content instead of base64 text. The parser changes it to null and the download shows a generic failure, without the required schema-drift diagnostic.

Recommended fix: Define a setup-response schema with the expected nullable document fields and validate the response with safeParseWithLogging before mapping it. Return null for a failed validation and add a malformed-response test. Declare any new direct dependency in the package manifest.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Review loop result for head 7e98f2f240 (base a87a76fe67), 1 round. The round covered the conflict resolution of the release merge in the channels files and the commit that moves the Teams strings into the i18n catalogs.

Lens Final rating
Slop Low
Simplify Low

Fixed: the catalog rewrite had moved existing _many plural keys in es-ES, fr-FR and pt-BR; the original order is back. The two Teams setup links now live in ChannelConnectFlow.tsx, and teamsSetupCopy.ts is gone (4e98701).
Left on purpose: the Teams connect note reuses channels.connect.telegramCustomNote, because the English text is the same and shared text reuses one key. chatTypeOf, the platform list and labels that /m keeps, the unused ChannelSetupDocument.link field and the remaining ternary chains in ChannelManagePanel.tsx come from the earlier Teams commits, not from this change, so they stay for a later pass.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Review loop result for head 7e98f2f240 (base a87a76fe67), 1 round. The round covered the conflict resolution of the release merge in the channels files and the commit that moves the Teams strings into the i18n catalogs.

Lens Final rating
Correctness Low
Security Low

Fixed: nothing to fix. No findings.
Left on purpose: nothing.

# Conflicts:
#	web/mobile/src/features/agents/useAgentChannels.ts
#	web/mobile/src/features/chat/useAgentPrivacyProps.ts
#	web/mobile/src/lib/sharingCopy.ts
#	web/mobile/tests/unit/agentChannelSharing.render.test.tsx
#	web/mobile/tests/unit/agentChannelsReload.render.test.tsx
#	web/packages/agenta-i18n/locales/de-DE/agents.overview.json
#	web/packages/agenta-i18n/locales/de-DE/channels.manage.json
#	web/packages/agenta-i18n/locales/de-DE/shell.bootLoader.json
#	web/packages/agenta-i18n/locales/en/agents.overview.json
#	web/packages/agenta-i18n/locales/en/channels.manage.json
#	web/packages/agenta-i18n/locales/en/shell.bootLoader.json
#	web/packages/agenta-i18n/locales/es-ES/agents.overview.json
#	web/packages/agenta-i18n/locales/es-ES/channels.manage.json
#	web/packages/agenta-i18n/locales/es-ES/shell.bootLoader.json
#	web/packages/agenta-i18n/locales/fr-FR/agents.overview.json
#	web/packages/agenta-i18n/locales/fr-FR/channels.manage.json
#	web/packages/agenta-i18n/locales/fr-FR/shell.bootLoader.json
#	web/packages/agenta-i18n/locales/ja-JP/agents.overview.json
#	web/packages/agenta-i18n/locales/ja-JP/channels.manage.json
#	web/packages/agenta-i18n/locales/ja-JP/shell.bootLoader.json
#	web/packages/agenta-i18n/locales/pt-BR/agents.overview.json
#	web/packages/agenta-i18n/locales/pt-BR/channels.manage.json
#	web/packages/agenta-i18n/locales/pt-BR/shell.bootLoader.json
#	web/packages/agenta-i18n/locales/zh-CN/agents.overview.json
#	web/packages/agenta-i18n/locales/zh-CN/channels.manage.json
#	web/packages/agenta-i18n/locales/zh-CN/shell.bootLoader.json
#	web/packages/agenta-settings-ui/src/channels/ChannelAdvancedSection.tsx
#	web/packages/agenta-settings-ui/src/channels/ChannelConnectFlow.stories.tsx
#	web/packages/agenta-settings-ui/src/channels/ChannelConnectFlow.tsx
#	web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.stories.tsx
#	web/packages/agenta-settings-ui/src/channels/ChannelManagePanel.tsx
#	web/packages/agenta-settings-ui/src/channels/ChannelsSettingsPage.tsx
#	web/packages/agenta-settings-ui/src/channels/actions.ts
#	web/packages/agenta-settings-ui/src/channels/helpers.ts
#	web/packages/agenta-settings-ui/src/channels/icons.tsx
#	web/packages/agenta-settings-ui/src/channels/storyFixtures.tsx
#	web/packages/agenta-settings-ui/src/channels/types.ts
#	web/packages/agenta-settings-ui/src/channels/useChannelPanel.tsx
#	web/packages/agenta-settings-ui/src/publish/AgentPublish.stories.tsx
@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Review loop result for head 244fb1159d (base f9f5de2ff8), 1 round. The round covered the merge of the release branch with the Discord channel into the Teams setup: every shared platform list, table, catalog and branch must keep both Discord and Teams.

Lens Final rating
Slop Low
Simplify Low

Both reviewers confirmed that Discord keeps its English text, invite flow, retry and error paths and test ids.

Fixed: the Teams-era test fixtures in agentPublish.test.tsx and channelsDisconnect.test.tsx now list discord too (c58548d).
Left on purpose:

  • The Teams connect note reuses channels.connect.telegramCustomNote, because the English text is the same and shared text uses one key.
  • Store the new Discord bot in created, read the Discord invite link with setupDocumentOf, put the manage panel help and heading in the PLACES_TITLES table, and share one key set for Slack and Discord. These refactor the Discord code that just landed, so they belong in a follow-up and not in this merge.
  • revokedHelpTeams sorts before revokedHelpDiscord in channels.manage.json, and ChannelsSettingsPage.stories.tsx has no teams entry. Neither changes behavior.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Review loop result for head 244fb1159d (base f9f5de2ff8), 1 round. The round covered the merge of the release branch with the Discord channel into the Teams setup.

Lens Final rating
Correctness Medium, fixed
Security Low

Fixed: two Teams group chats with no name both showed "Unnamed group", because locatorId did not read the Teams conversation_id. It reads it now, and a unit test checks that two unnamed group chats get different labels (c58548d).
Left on purpose: nothing.

@mmabrouk
mmabrouk changed the base branch from feat/teams-channel-adapter to release/v0.129.0 November 17, 2026 18:30
@mmabrouk
mmabrouk merged commit 410f1df into release/v0.129.0 Nov 17, 2026
54 of 56 checks passed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

3 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Comment on lines +900 to +902
// Teams verification discovers no name, and the app package takes the connection's
// name as the bot's, so a Teams connection is named after the agent it answers as.
const name = platform === "teams" && appId ? resolveAgentName(appId) : null

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Indistinguishable Teams bot connections

With multiple Teams bots, mapConnectionRow labels every bot “your bot” instead of retaining its identity. The connection mapper drops the stored name and Teams application ID. Users cannot identify which bot they are updating or disconnecting.

Learn more

The Teams verification returns an application ID, tenant ID and webhook URL, but no bot username. The connection mapper ignores the stored connection name and reads only bot_username for a bot handle. The bot label fallback therefore returns “your bot” for every Teams connection. The connection list uses that label to select the connection to manage.

Example: Connect a Support Teams bot and a Sales Teams bot in one project. Before either receives a message, both rows show “your bot” with the same connection details, even though their stored names and application IDs differ.

Recommended fix: Preserve a Teams display name and its data.connection_locator.app_id in the frontend connection shape. Use the name for the row title and the application ID to distinguish connections with identical names. Add a mapping and list-rendering test with two Teams connections.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@mmabrouk

Copy link
Copy Markdown
Member Author

🤖 The AI agent says:

Ship record for head c58548d46e. This PR is merged into release/v0.129.0 with merge commit 410f1dfc.

Gate Result Head Link
Review (delta reviews) Latest review records posted c58548d 1, 2, 3, 4
Live QA Passed see QA record QA record
CodeRabbit Skipped on the final head. Last review is on an earlier commit 6cb4223 latest review
CI One red check, fixed in another PR (below). Some web jobs were still running when this record was written c58548d checks

Red check: TypeScript format failed on web/packages/agenta-settings-ui/tests/unit/channelsDisconnect.test.tsx, a file this PR changes. The failure is formatting only. It is fixed in #8348, which targets release/v0.129.0.

Passed on this head: Python lint and format, gitleaks, migration gate, API unit tests, EE API unit tests, SDK, services and runner tests, the API and runner image builds, and the preview deploy. Web tests were not awaited. The CLA check and "Entire Gates" are ignored as outside services.

Deploy steps: none.
Not covered: web image builds, API integration tests and mobile types were still running when this record was written. I did not wait for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant