bugfix/AB#34241-NotificationsTab - #2902
Merged
Merged
Conversation
|
JamesPasta
requested review from
Stephan-McColm and
aurelio-aot
and
a lite review from Copilot
September 1, 2026 20:30
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Pull request overview
This PR updates the Unity.Notifications web module to respect the DirectMessaging feature flag at runtime, preventing the SignalR “realtime messaging” widget and related navigation from appearing/connecting when the feature is disabled.
Changes:
- Add a lightweight API endpoint to expose whether
Unity.Notifications.DirectMessagingis enabled for the current user/tenant context. - Gate the realtime widget initialization in
notifications-realtime-client.jsbehind the feature-enabled check. - Adjust the main menu contributor so the UnityMessaging menu item is added only when
DirectMessagingis enabled, without blocking other Notifications menu entries.
File summaries
| File | Description |
|---|---|
| applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/wwwroot/js/notifications-realtime-client.js | Adds a feature-enabled fetch check before initializing the SignalR widget. |
| applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/Menus/NotificationsMenuContributor.cs | Moves the DirectMessaging feature check to only guard the UnityMessaging menu item. |
| applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Web/Controllers/NotificationRealtimeController.cs | Introduces an authenticated API endpoint returning the DirectMessaging feature state. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+16
to
+20
| [HttpGet("feature-enabled")] | ||
| public async Task<bool> IsFeatureEnabledAsync() | ||
| { | ||
| return await featureChecker.IsEnabledAsync(NotificationsFeatureConsts.DirectMessaging); | ||
| } |
Comment on lines
+64
to
+67
| fetch('/api/notifications/realtime/feature-enabled', { credentials: 'same-origin' }) | ||
| .then(function (response) { | ||
| return response.ok ? response.json() : false; | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.