Skip to content

add per-agent notification preferences - #444

Draft
abhinavxd wants to merge 2 commits into
mainfrom
agent-notification-preferences
Draft

add per-agent notification preferences#444
abhinavxd wants to merge 2 commits into
mainfrom
agent-notification-preferences

Conversation

@abhinavxd

Copy link
Copy Markdown
Owner

No description provided.

Agents can now pick which notifications they get and on which channel.
New page under Account > Notifications with an in-app / email toggle for
each notification type. Preferences are stored in a new
user_notification_preferences table. A missing row means enabled, so
existing agents keep getting everything they got before.

The dispatcher checks the recipient's opt-outs before sending. It does
one batched query per dispatch instead of a lookup per recipient, so a
mention that fans out to a whole team still costs a single query. If the
lookup fails we suppress email and only send in-app, so a failed read
never overrides someone's email opt-out.

Also adds a new_reply notification type. When a customer replies to a
conversation an agent owns, that agent gets notified. It only fires on
the first reply of a waiting period, otherwise a burst of messages would
send one notification each.

Separately, OIDC login failures now redirect back to the login page with
an error code instead of dumping a JSON error envelope in the browser.
The login page maps the code to a message that says what went wrong and
what to do about it. Added logs at each failure point in the OIDC flow
since these were very hard to debug before. Agent emails are also
lower-cased before lookup because providers can return a different
casing than what we store, and a disabled account is now rejected.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4b551666-6855-464e-9a37-857df1c1c2a3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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