Skip to content

[Improve] Surface Teams conversation readiness and fall back to web-only setup when Teams posting fails - #48

Merged
brunobergher merged 1 commit into
developfrom
feature/teams-onboarding-fallback-parity-07xrp2iqin7tm
Jul 9, 2026
Merged

[Improve] Surface Teams conversation readiness and fall back to web-only setup when Teams posting fails#48
brunobergher merged 1 commit into
developfrom
feature/teams-onboarding-fallback-parity-07xrp2iqin7tm

Conversation

@roomote-roomote-v1

Copy link
Copy Markdown

Opened on behalf of Bruno Bergher. Follow up by mentioning @openmote, in the web UI, or in Slack.

What changed

Teams-only deployments now get reliable, honest onboarding fallback behavior (precedence stays Slack > Telegram > Teams):

  • teams.integrationStatus reports primaryConversationReady and primaryConversationType, sourced from findTeamsPrimaryConversation() (which now also returns the installation's conversation type), so the UI can tell "bot credentials configured" apart from "Roomote can actually post to Teams".
  • The Microsoft Teams card in Settings > Comms and the /setup Teams connect step show a nudge when the bot is configured but no Teams conversation has been captured yet: install/open the Roomote app in Teams and send the bot one message.
  • The setup kickoff Teams fallback is tightened: Teams is only selected when both a captured primary conversation and resolvable bot credentials exist. When credentials are missing, the kickoff post throws, or it returns no message id, setup logs a diagnostic warning and continues as a web-only onboarding task with all setupNewState.chatHandoff* fields null — instead of failing the setup command or making Teams appear connected. Successful Teams kickoffs still persist chatHandoffProvider: "teams", chatHandoffChannelId, chatHandoffThreadId, and chatHandoffServiceUrl and enqueue the StandardTask with Teams communication metadata, unchanged.
  • Docs updated: the public Microsoft Teams page explains that the first verified message captures the conversation used for proactive output and that Settings shows a reminder until then; internal guidance (teams-integration.md, slack-onboarding.md, agent-entry-surfaces.md) marks Teams onboarding as fallback-only and documents the readiness field.

The Teams onboarding message set stays narrow (kickoff, one starter-suggestions intro, delayed follow-up); no Slack-only onboarding campaigns were added to Teams.

New tests cover the teams.integrationStatus command (configured with/without a conversation, unconfigured), the setup-new Teams kickoff fallback (success, missing credentials, post failure, missing message id — including the diagnostic warnings), and the new nudges in both UI surfaces. Existing Teams suggestion tests are unchanged and passing. No DB migration and no webhook payload changes.

Why this change was made

Teams onboarding depends on a primary conversation captured from a verified inbound Teams activity, but nothing surfaced that requirement: a half-configured Teams deployment either looked connected or made the setup kickoff throw. This gives admins a visible readiness signal with a concrete next step and keeps /setup onboarding working (web-only) when Teams can't receive the kickoff.

Impact

Admins on Teams-only deployments can see why proactive Teams output isn't arriving and how to fix it with one message, and setup onboarding no longer errors when Teams credentials are missing or a kickoff post fails — it degrades to the web-only task with an accurate diagnostic instead.

Screenshots

The Microsoft Teams settings card shows the bot-configured status together with the new amber nudge telling the operator that Roomote has not captured a Teams conversation yet and to send the bot one message.

The equivalent /setup connect-step nudge could not be captured in this dev deployment (it is configured for Slack, so the Teams connect step is not reachable); that state is covered by the new StepCommunicationConnect component tests.

@roomote-roomote-v1

roomote-roomote-v1 Bot commented Jul 9, 2026

Copy link
Copy Markdown
Author

No code issues found. See task

@brunobergher
brunobergher marked this pull request as ready for review July 9, 2026 18:22
@brunobergher
brunobergher merged commit e060c00 into develop Jul 9, 2026
mrubens pushed a commit that referenced this pull request Jul 9, 2026
Resolves conflicts by porting develop's changes onto the new data-model
contract:
- setup-new onboarding kickoff adopts develop's web-only Teams fallback
  (#48) with the new enqueue contract (user initiator, setup_onboarding
  workflow, provider stamp) instead of attributionOverride
- Telegram routing-confirmation launch helper (#22) ported to the new
  contract, keeping launchClass: 'human' for keepalive policy
- snapshot refresh keeps the automation initiator; dropped the re-merged
  forged-owner fallback
- setup redirect guard keeps the provider-agnostic completion check
- drizzle baseline regenerated to fold develop's 0001 (nullable
  environments.created_by_user_id + declarative_source) into the single
  0000 baseline
- develop-added tests updated to the new enqueue/factory shapes
@mrubens
mrubens deleted the feature/teams-onboarding-fallback-parity-07xrp2iqin7tm branch July 12, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants