fix(AF-578): render and route access-request bell notifications#584
Merged
Conversation
Contributor
Frontend Test Results1 139 tests 1 139 ✅ 2m 46s ⏱️ Results for commit 97b511e. |
Contributor
Coverage Report for Frontend Coverage (frontend)
File CoverageNo changed files found. |
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.
Closes #578
What
In-app (bell) notifications for the five JIT-access events —
ACCESS_REQUEST_SUBMITTED,ACCESS_REQUEST_APPROVED,ACCESS_REQUEST_REJECTED,ACCESS_GRANT_EXPIRED,ACCESS_GRANT_REVOKED— rendered the generic "New notification" fallback and clicking them navigated nowhere. The backend (AccessNotificationListener) already records these with a rich payload; the frontend bell was never taught about them. Follows the same pattern as PR #568 (API_REQUEST_*events).Changes
frontend/src/types/api.ts— added the fiveACCESS_*values toUserNotificationEventType; addedaccess_request_id,requester,requested_duration,status,expires_attoUserNotificationPayload.frontend/src/components/common/NotificationBell.tsxrenderMessage(): specific localized messages perACCESS_*event, with a_no_requestervariant forACCESS_REQUEST_SUBMITTED(mirrors theQUERY_SUBMITTEDpattern).routeForNotification():ACCESS_REQUEST_SUBMITTED(reviewer-targeted) →/admin/access-requests; the four requester-targeted events →/access-requests.notifications.events.ACCESS_*keys to all 7 locale files (en,de,es,fr,hy,ru,zh-CN); parity gate green.NotificationBell.test.tsxcovering message rendering and click-navigation for every event, including the no-requester variant.Docs / website
No updates needed: no endpoint, route, env var, or user-facing pitch change.
docs/08-notifications.mdalready documents theACCESS_*in-app inbox recipients; the frontend docs don't enumerate per-event bell message mappings.E2E
No spec added: no existing Playwright spec covers the notification bell, and this is a pure message/route mapping fix — exercising it end-to-end would require seeding a full JIT access-request round-trip. The mapping branches are fully covered by component tests (render + navigation per event).
Verification
npm run lint— 0 errors (warnings pre-existing)npm run typecheck— greennpm run test:coverage— 1139/1139 tests pass incl.locales.parity.test.ts; coverage 94.18% lines / 83.69% branchesnpm run build— green