Skip to content

Send personal notifications as a Slack DM, not to a channel #191

Closed

Description

@imshashank

Orbit's Slack notifications go to channels. slack_channel_sync in packages/db/src/schema/comms.ts routes a team's activity to that team's channel, which is right for team-wide events and wrong for anything addressed to one person.

"You were assigned SEC-42" and "You were mentioned in a comment" are personal notifications. Delivering them to a channel means everybody reads what one person needed to know, and the person who needed to know it has to find it in a stream.

What to build

Deliver personal notifications as a Slack DM from the Orbit app to the mapped user.

The routing rule, roughly:

  • Notifications with a single intended recipient go to a DM. Assignment, mention, comment on something you are subscribed to, a review request.
  • Notifications about a team or project as a whole go to the channel. Sprint started, project status changed, a release cut.
  • Where both make sense, the person's preferences decide.

Preferences

notification_preference and notification_setting already exist in packages/db/src/schema/comms.ts, and the matrix UI is at apps/web/src/features/settings/notification-matrix.tsx. It already has per event and per channel controls, and quiet hours already work across every channel.

So the work is mostly:

  1. Add a Slack DM destination alongside the existing channels, in the preference model and in the matrix.
  2. Route to it in the notification producers under packages/core/src/notifications/.
  3. Respect quiet hours, which the existing code already does for other channels, so follow it rather than reimplementing.

Requirements

  • im:write scope. This is a new bot scope and it has to be added to the app and to the setup instructions in docs/integrations.md. Anyone whose workspace installed the app before this lands will need to reauthorise, so the settings page has to detect a missing scope and say so rather than failing silently. That reauthorisation path is part of this issue.
  • Unmapped users get nothing and it is not an error. If a person has no Slack account matched, the DM channel is simply unavailable to them and the UI should show it as unavailable rather than as off.
  • Do not double deliver. Somebody with the inbox, email and Slack DM all enabled for assignment should get three notifications only if they asked for three. Check what the current behaviour is across channels before changing it.
  • Never DM about something the person may not read. The audience calculation in packages/core/src/notifications/audience.ts is what decides who is told, and it stays the authority.

Files

  • packages/core/src/notifications/notify.ts
  • packages/core/src/notifications/audience.ts
  • packages/db/src/schema/comms.ts
  • apps/web/src/features/settings/notification-matrix.tsx
  • packages/services/src/ for the Slack client
  • docs/integrations.md

Tests

packages/core/tests/notifications/producers.test.ts already covers Slack routing. Extend it: a personal event with DM enabled produces a DM and no channel post, and quiet hours suppress it the same way they suppress email.

Activity

  1. added this to the Slack, properly milestone on Aug 8, 2026
  2. added
    enhancement
    help wanted
    ready
    p1 high
    area: integrations
    area: notifications
    on Aug 8, 2026
  3. added
    size: medium
    points: 3
    schema change
    on Aug 8, 2026
  4. imshashank commented on Aug 16, 2026

    @imshashank
    ContributorAuthor

    Status, two PRs in flight

    Recording where this stands so the board is honest about it.

    They land in that order. #323 owns migration 0010, and #321 rebases on top and drops its duplicate copies of the migration, the table and the mapping helper. Merging them in the other order, or merging both as they stand, produces two migrations that each create slack_user_mapping and a duplicated function that git merges without a conflict marker.

    Two things this issue asks for that neither PR delivers yet, and that I do not want silently dropped:

    Mapping everybody, not just the installer. #323 maps only the person who clicks Connect. Every other member stays unmapped forever with no path in the product. Email matching also has a permanent tail of people whose Orbit and Slack addresses differ. This needs a backfill over the member list plus a manual per user fallback, and I will split it into its own issue.

    Quiet hours. The routing rule here treats a DM as a personal delivery, and #321 currently exempts DMs from quiet hours entirely while its docs claim the opposite. A 3am ping is how an integration gets turned off and never turned back on, so this is part of the feature, not a polish item.

    Also worth writing down: the Slack surface is still behind SLACK_INTEGRATION_ENABLED, which #280 deliberately set to false for the open source preview. #321 flips that to an env flag. That is a separate decision from this issue and I have not agreed to it yet, so this issue can be satisfied with the flag still off.

  5. added a commit that references this issue on Aug 29, 2026
    5543557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: integrationsarea: notificationsenhancementhelp wantedp1 highpoints: 3readyschema changesize: medium

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions