Skip to content

[Feat] Route Suggest Ideas to Telegram and Teams destinations#613

Merged
daniel-lxs merged 6 commits into
developfrom
feature/suggest-ideas-telegram-destination-29q8b66fyem4a
Jul 21, 2026
Merged

[Feat] Route Suggest Ideas to Telegram and Teams destinations#613
daniel-lxs merged 6 commits into
developfrom
feature/suggest-ideas-telegram-destination-29q8b66fyem4a

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Opened on behalf of Daniel Riccio. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

Related issue

Internal product work from Slack discussion (no public issue).

Why this PR exists

  • A maintainer explicitly invited this PR in the linked issue or discussion
  • I am a maintainer / this is internal Roomote work

What changed

Suggest Ideas can report to any chat surface:

  • Slack / Discord — pick an existing channel
  • Telegram — sticky recurring Suggest Ideas forum topic (create once, reuse; no existing-thread picker)
  • Teams — primary Teams conversation for the deployment

With full coverage, Suggest Ideas no longer shows a limited “only” capability badge. Delivery prefers the automation’s own destination and skips higher-precedence surfaces when Discord/Telegram/Teams are selected. Settings upserts merge sticky Telegram topic metadata so concurrent first-delivery races do not spawn duplicate topics. Non-Slack destinations no longer stamp Slack channel metadata on scan tasks.

How it was tested

  • Unit tests for registry, AutomationsSettings, submission routing, Telegram sticky topics, and automation target merge
  • Pre-push check-types / lint / knip

Checklist

  • The PR title follows the repo convention
  • This PR is small and scoped to one change
  • pnpm lint and pnpm check-types pass locally
  • I added tests or included a clear manual validation note above
  • I removed secrets, tokens, private keys, and customer data from code, logs, and screenshots
  • If this change should appear in the changelog, I ran pnpm changeset

roomote added 2 commits July 20, 2026 15:46
Make Telegram a first-class Suggest Ideas destination that auto-creates
and reuses a recurring forum topic, without a thread picker.
@roomote-roomote

roomote-roomote Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

No new code issues found. See task

  • packages/sdk/src/server/automations/suggester-route-dispatch.ts:68-79 Telegram destinations are still written to payload.slackChannel and tasks.slackChannelId. The worker consequently starts Slack polling for the Telegram chat ID; only attach Slack channel metadata when the selected destination is Slack. — fixed in 6651433
  • packages/db/src/lib/automations.ts:523-535 The topic merge read/merge/write must be atomic with topic persistence. — fixed in 35c23c5 by serializing both paths with the same transaction-scoped advisory lock.
  • apps/api/src/handlers/teams/__tests__/automation-suggestions.test.ts:29-195 The Teams summary test must mock getAutomationRuntime and cover the configured Teams-destination path. — fixed in 35c23c5.

Reviewed a1822ef

@roomote-roomote

roomote-roomote Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Fixed both outstanding review issues in 6651433:

  1. Non-Slack destinations — Suggest Ideas scans only stamp slackChannel / channels.slackChannelId when the destination is actually Slack.
  2. Sticky topic raceupsertAutomation merges existing Telegram threadId metadata when a settings save omits it, so concurrent first-delivery topic creation is not clobbered into a duplicate topic.

Added unit coverage for both paths.

roomote added 2 commits July 20, 2026 15:58
Only attach Slack channel fields for Slack destinations, and merge sticky
Telegram topic ids when settings saves race first delivery.
Offer Teams · primary conversation alongside Slack, Discord, and Telegram so
Suggest Ideas covers all chat surfaces and no longer shows a limited-comms badge.
@roomote-roomote roomote-roomote Bot changed the title [Feat] Route Suggest Ideas to sticky Telegram topics [Feat] Route Suggest Ideas to Telegram and Teams destinations Jul 20, 2026
…-ready

# Conflicts:
#	apps/web/src/components/settings/automations/AutomationsSettings.render.client.test.tsx
@daniel-lxs
daniel-lxs marked this pull request as ready for review July 21, 2026 17:42
@daniel-lxs
daniel-lxs merged commit 8300cb7 into develop Jul 21, 2026
16 checks passed
@daniel-lxs
daniel-lxs deleted the feature/suggest-ideas-telegram-destination-29q8b66fyem4a branch July 21, 2026 17:43
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