Notification fixes#430
Merged
prooflesben merged 18 commits intomainfrom Apr 18, 2026
Merged
Conversation
…t& added fetch notifs on grant creation/save
… grant time, made saving profile button disabled while loading
…f it needs to happen
Closed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR focuses on fixing notification correctness and syncing across profile and grant lifecycle changes, while also improving a few UX details in the notifications/settings UI.
Changes:
- Add
grantIdto notification models and implement backend grant-notification sync on grant update/delete and profile (POC) changes. - Add frontend notification fetching utilities and trigger notification refreshes on app data fetch and grant mutations.
- Improve settings “Save” UX (disable while saving) and adjust notification timestamp display formatting.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| middle-layer/types/Notification.ts | Adds grantId to the shared notification type to support grant-linked syncing. |
| frontend/src/main-page/settings/Settings.tsx | Disables Save while saving; refetches grants after profile update. |
| frontend/src/main-page/notifications/processNotificationData.ts | Adds a shared fetchNotifications helper to refresh notifications in store. |
| frontend/src/main-page/notifications/GrantNotification.tsx | Changes notification timestamp formatting for older notifications. |
| frontend/src/main-page/notifications/Bell.tsx | Refactors bell click behavior and imports notification fetch helper. |
| frontend/src/main-page/grants/edit-grant/processGrantDataEditSave.ts | Refetches notifications after grant create/edit/delete. |
| frontend/src/context/auth/authContext.tsx | Fetches notifications as part of initial/periodic authenticated data refresh. |
| backend/src/notifications/types/notification.types.ts | Extends notification DTO to include grantId. |
| backend/src/notifications/notification.service.ts | Adds grantId-based notification lookup and bulk update for email/org changes. |
| backend/src/notifications/test/notification.service.test.ts | Updates notification tests for grantId and adds coverage for new service methods. |
| backend/src/grant/grant.service.ts | Syncs notifications on grant update/delete; adds “relevant notification times” filtering; adds updateGrantsByPOC. |
| backend/src/grant/grant.module.ts | Exports GrantService for cross-module injection. |
| backend/src/grant/grant.controller.ts | Uses ParseIntPipe for grantId in delete endpoint. |
| backend/src/grant/test/grant.service.spec.ts | Updates notification helper expectations and adds tests for updateGrant notification sync behavior. |
| backend/src/auth/auth.service.ts | Injects GrantService and updates grants after profile changes with rollback on failure. |
| backend/src/auth/auth.module.ts | Imports GrantModule (and NotificationsModule) and simplifies provider wiring. |
| backend/src/auth/test/auth.service.spec.ts | Updates auth tests setup (but currently missing a GrantService provider mock). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
ℹ️ Issue
Closes #426
📝 Description
Write a short summary of what you added. Why is it important? Any member of C4C should be able to read this and understand your contribution -- not just your team members.
Briefly list the changes made to the code:
3.Made it so only useful notifications are created (for example, if today is 4/15 and the grant application is due 4/25, I would not need the 'application is due in 14 days' notification, so onlythe 7 day and 3 day one will be created)
✔️ Verification
What steps did you take to verify your changes work? These should be clear enough for someone to be able to clone the branch and follow the steps themselves.
Provide screenshots of any new components, styling changes, or pages.
Test Changes
If your new feature required some test to be changed or added to fit the new functionality or changes please document these changes here.
🏕️ (Optional) Future Work / Notes
Did you notice anything ugly during the course of this ticket? Any bugs, design challenges, or unexpected behavior? Write it down so we can clean it up in a future ticket!