Skip to content

MUL-5792: split mentions out of the comments notification mute group - #6486

Merged
Bohan-J merged 1 commit into
mainfrom
feat/split-mentions-notification-group
Aug 6, 2026
Merged

Bohan-J merged 1 commit into
mainfrom
feat/split-mentions-notification-group

Conversation

@Bohan-J

@Bohan-J Bohan-J commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Closes #6468. MUL-5792.

The problem

new_comment and mentioned shared the comments preference group, so muting comment traffic also silenced @-mentions. Because a muted item is never created (notifyMentionedMembers returns before CreateInboxItem), a muted mention was lost, not deferred — it never appears in the inbox, not even later.

That makes the only lever for reducing inbox noise also remove the signal the inbox exists for. It bites hardest in agent-heavy workspaces, where a single human approver subscribes to an issue by commenting on it once and then receives every agent reply.

The change

mentioned now maps to its own mentions group. Settings → Notifications goes from five inbox toggles to six.

Before After
comments new_comment, mentioned new_comment
mentions — mentioned

No migration needed. Preferences are stored sparse in JSONB — a missing key means "all" — so an existing {"comments":"muted"} row lands on mentions: "all" on its own. That is also the behavior we want: muting comments is a volume decision, and it is unlikely anyone chose it intending to stop being reachable by name. Users who did want both silent flip one extra switch. Users who never customized see no change at all.

The split also aligns the global setting with behavior the platform already had elsewhere: per-issue unsubscribe already keeps delivering direct mentions, and mention delivery already bypasses the subscriber table. The shared mute group was the one place contradicting that.

@all and @squad expand into mentioned items and therefore follow the mentions toggle. This matches current behavior and is called out in the setting's description copy.

Files

Five lines of logic; the rest is copy and docs.

  • server/cmd/server/notification_listeners.go — the group mapping
  • server/internal/handler/notification_preference.go — API whitelist
  • packages/core/types/notification-preference.ts, packages/core/notification-preferences/patch.ts — the key (omitting it from NOTIFICATION_GROUP_KEYS would make the toggle silently un-sendable)
  • packages/views/settings/components/notifications-tab.tsx + en / zh-Hans / ja / ko settings.json
  • apps/mobile/.../settings/notifications.tsx — hardcoded English, per the mobile parity rule
  • apps/docs/content/docs/inbox{,.zh,.ja,.ko}.mdx

No DB migration, no new endpoint, no new component.

⚠️ Deploy order: server first

validNotifGroups rejects unknown keys, so a client shipped ahead of the server gets 400 invalid preference group: mentions. Deploy the backend before web / desktop / mobile.

One further compatibility note, not addressed here: the legacy replace-all PUT /api/notification-preferences endpoint remains for older installed clients. A client that predates this key would drop it on a full PUT, resetting mentions to the default. All current clients use PATCH, so this is bounded — but it is one more argument for retiring PUT.

Testing

notifTypeToGroup / isNotifMuted had no test coverage, so this adds it rather than only testing the new key.

  • server/cmd/server/notification_mute_group_test.go (new) — table test pinning the contract in both directions: muted comments still delivers mentions, muted mentions still delivers comments. Plus a guard on the mapping itself so a future edit can't silently re-couple them.
  • server/internal/handler/notification_preference_test.go — the API accepts mentions.
  • packages/core/notification-preferences/patch.test.ts — derive/apply carry mentions independently.

Verified locally:

  • go test ./cmd/server/ ./internal/handler/ — pass (against a freshly migrated DB)
  • pnpm vitest run in packages/core — 1286 pass; packages/views locale parity — 160 pass; packages/views settings — 109 pass
  • pnpm typecheck (6 packages) and apps/mobile typecheck — pass
  • pnpm lint and mobile lint — 0 errors
  • apps/mobile tests — 55 pass

Not run: Playwright e2e.

Conflict note

PR #4105 (email notification channel, open, last updated 2026-06-15) touches notification_preference.go, notification-preference.ts, and notifications-tab.tsx. Whichever lands second will need a small rebase.

`new_comment` and `mentioned` shared the `comments` preference group, so
muting comment volume also silenced @-mentions — and because a muted item
is never created, those mentions were lost rather than deferred. In
agent-heavy workspaces the only lever that reduces inbox noise also
removed the signal the inbox exists for.

`mentioned` now maps to its own `mentions` group. Preferences are stored
sparse (a missing key means "all"), so existing `{"comments":"muted"}`
rows default the new group to "all" with no migration: muting comments is
a volume decision, not a decision to become unreachable by name.

The split also aligns the global setting with behavior the platform
already had — per-issue unsubscribe keeps delivering direct mentions, and
mention delivery bypasses the subscriber table entirely.

Closes #6468

Co-authored-by: multica-agent <github@multica.ai>
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
multica-docs Ready Ready Preview Aug 6, 2026 5:53am

Request Review

@Bohan-J
Bohan-J merged commit 128d1d2 into main Aug 6, 2026
11 checks passed
eric8810 pushed a commit to eric8810/multica that referenced this pull request Aug 12, 2026
…ultica-ai#6486)

`new_comment` and `mentioned` shared the `comments` preference group, so
muting comment volume also silenced @-mentions — and because a muted item
is never created, those mentions were lost rather than deferred. In
agent-heavy workspaces the only lever that reduces inbox noise also
removed the signal the inbox exists for.

`mentioned` now maps to its own `mentions` group. Preferences are stored
sparse (a missing key means "all"), so existing `{"comments":"muted"}`
rows default the new group to "all" with no migration: muting comments is
a volume decision, not a decision to become unreachable by name.

The split also aligns the global setting with behavior the platform
already had — per-issue unsubscribe keeps delivering direct mentions, and
mention delivery bypasses the subscriber table entirely.

Closes multica-ai#6468

Co-authored-by: J <agent@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
r404r added a commit to r404r/multica that referenced this pull request Sep 25, 2026
Brings the branch up to upstream/main e2f4a22. Conflicts resolved:

- packages/core/api/schemas.ts: keep email_configured next to upstream's
  new AppConfig capability fields (vcs_integration_available, feature flags,
  local_worktree_supported, ...), in both the type and the zod schema.
- packages/core/config/index.ts: keep emailConfigured in ConfigState, its
  default, and the setAuthConfig signature alongside upstream's
  vcsIntegrationAvailable and other new fields.
- packages/core/platform/auth-initializer.tsx: pass emailConfigured and
  vcsIntegrationAvailable to setAuthConfig.
- packages/views/settings/components/notifications-tab.tsx: take upstream's
  SettingsTab/SettingsSection layout; render EmailNotificationSetting after
  BrowserNotificationSetting in the delivery section.
- server/cmd/server/router.go: keep the email integration import next to
  upstream's channel/composio/dingtalk imports.
- server/internal/handler/config.go: keep EmailConfigured next to upstream's
  new AppConfig fields.
- server/internal/handler/notification_preference_test.go (add/add): take
  upstream's DB-backed PATCH tests (multica-ai#6486) and keep this branch's
  validNotifGroups test.
- server/internal/service/email.go: take upstream's transport changes
  (Office 365 LOGIN auth, SMTP_FROM_EMAIL, base64 headers); keep
  Configured() and SendNotification() on top.
- server/internal/service/email_test.go: keep both test sets; the conflict
  marker split TestSendNotification_RejectsEmptyTo, closed explicitly.

Verified: go build ./... and go vet on touched packages; pnpm typecheck
core/views/web/desktop.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch was successfully deployed

1 active deployment
Preview – multica-docs — ddffd6dd Deployed Aug 6, 2026 by vercel[bot]
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.

Split mentioned out of the comments notification mute group

1 participant