Skip to content

[Improve] Use consistent default destinations for automations - #2546

Merged
mrubens merged 5 commits into
developfrom
feature/shared-automation-destinations-3gn2vpq0ev6e1
Sep 11, 2026
Merged

[Improve] Use consistent default destinations for automations#2546
mrubens merged 5 commits into
developfrom
feature/shared-automation-destinations-3gn2vpq0ev6e1

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

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

What changed

  • Add one server-side default automation destination resolver with an explicit per-caller provider capability contract.
  • Resolve usable manager, onboarding, and primary chat channels before owner DMs, then verified Email where supported, and finally no destination.
  • Use the shared result for onboarding-created built-in and custom automations, the custom automation settings dialog, and API/tool destination discovery.
  • Preserve existing explicit targets without probing or replacing them, and continue past stale default candidates.
  • Restrict shared manager and primary-channel defaults to admins; member-owned automations default only to the member's own DM or verified Email.
  • Require current provider connectivity before accepting stored DM mappings, and resolve reapplied recommendation defaults for the persisted automation owner.

Why this change was made

Automation entry points previously derived defaults independently, and the onboarding-specific implementation in #2519 would have added another separate waterfall. A shared resolver keeps precedence, validation, and provider support consistent without changing canonical target storage or ownership rules.

Impact

New automation defaults now select the same best usable destination across onboarding and settings without exposing privileged shared channels to members. Built-in runners remain limited to their declared chat capabilities, while custom automations may use verified Email as the final delivery fallback; unresolved automations remain available in the task UI without an unusable persisted target.

@roomote-community

roomote-community Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Member custom-automation options expose and preselect privileged manager-channel destinations.
  • Disconnected Telegram or Discord DM mappings can be persisted as unusable defaults.
  • Existing recommendations resolve new defaults for the acting admin instead of the automation owner.

Reviewed 54542d5

Comment thread apps/web/src/trpc/commands/automations/custom-automations.ts
@roomote-roomote

roomote-roomote Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

Fixed both rereview findings in 54542d57: disconnected provider mappings no longer become defaults, and reapplied recommendations resolve against their persisted owner. All three review findings are checked off, all review threads are resolved, Roomote found no new code issues, and every required GitHub check passes. See the review task.

Comment thread packages/sdk/src/server/lib/default-automation-destination.ts
Comment thread apps/web/src/trpc/commands/setup-new/index.ts Outdated
@mrubens
mrubens marked this pull request as ready for review September 11, 2026 19:50
@mrubens
mrubens merged commit e9b0d60 into develop Sep 11, 2026
17 checks passed
@mrubens
mrubens deleted the feature/shared-automation-destinations-3gn2vpq0ev6e1 branch September 11, 2026 19:50
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.

1 participant