Skip to content

[comp] Production Deploy#2670

Merged
Marfuen merged 2 commits intoreleasefrom
main
Apr 24, 2026
Merged

[comp] Production Deploy#2670
Marfuen merged 2 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 24, 2026

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Scopes task status-change emails to the right people and adds a permission-based member filter for future notification logic. Reduces noisy emails and ensures the actor isn’t notified.

  • Bug Fixes

    • Single status change: email only the assignee; if unassigned, notify owners/admins; always exclude the actor; unsubscribe is honored.
    • Bulk status change: group tasks by assignee and send each recipient a single bulk email; route unassigned tasks to owners/admins; exclude the actor.
  • New Features

    • Added RolesService.filterMembersWithPermission(orgId, members, resource, action) to return members granted a specific resource:action via built-in or custom roles with one batched query; supports comma-separated roles.

Written for commit fd0aa1c. Summary will update on new commits.

github-actions Bot and others added 2 commits April 24, 2026 15:37
…2669)

* fix(api): scope task status-change emails to assignee, not whole org

notifyStatusChange and notifyBulkStatusChange were emailing every
non-platform-admin member of the org on any task status change, then
leaning on isUserUnsubscribed to filter. That filter had gaps
(multi-role users, custom roles, unsaved matrix state), so employees
with "Task Assignments" unchecked still received status-change emails.

Now:
- Single status change: emails only the task's assignee. If the task
  has no assignee, falls back to owners + admins. Actor always
  excluded, isUserUnsubscribed still honored.
- Bulk status change: groups tasks by assignee and sends each one a
  bulk email with the count of THEIR tasks. Unassigned tasks are
  routed to owners/admins with the unassigned count.

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

* feat(roles): add permission-based member filter helper

RolesService.filterMembersWithPermission(orgId, members, resource, action)
returns the subset of members whose combined (built-in + custom) role
permissions grant the requested resource:action. One batched
organizationRole.findMany query regardless of member count.

Matches better-auth's hasPermissionFn semantics: comma-separated role
strings treated as a union; unknown role names skipped silently. Uses
BUILT_IN_ROLE_PERMISSIONS (derived from the same role.statements that
better-auth initializes with) so answers stay in lockstep with the
runtime permission guard.

Enables upcoming migration of notifier recipient selection from
hardcoded role-string matching (role.includes('admin')) to
permission-based filtering — so custom roles like "Compliance Manager"
with task:update automatically qualify.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

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

Project Deployment Actions Updated (UTC)
comp-framework-editor (staging) Ready Ready Preview, Comment Apr 24, 2026 4:47pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
app (staging) Skipped Skipped Apr 24, 2026 4:47pm
portal (staging) Skipped Skipped Apr 24, 2026 4:47pm

Request Review

@Marfuen Marfuen merged commit 9fac0c5 into release Apr 24, 2026
13 checks passed
@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.33.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants