Club update notifications
Signed-in users can view a list of personal notifications about their reading-club activity, shown newest first with a localized message and date; the list is empty when there is nothing new to report.
Document details · v1
Waiting for your review. Until you approve it, AI agents do not treat it as fact and it stays out of your Live Docs.
Drift detectedlib/features/notifications.mjs — This dok may no longer match the code beneath it.
User flow
3user
Open the notifications page to see personal updates
ResultThe notifications page loads and prepares to show the user's own notices
Interaction details
- all · navigate
user
Read the list of recent club updates
ResultEach notice appears as an entry with a leaf icon, a localized message referencing the related club's title (or an unknown-club label if the club can no longer be found), and the notice's date, with the most recently created notice shown first
Starts when · user is signed in
Interaction details
- all · scroll
user
Visit the notifications page without being signed in
ResultA sign-in prompt is shown above the (empty) notifications area, with a link that starts the sign-in flow
Starts when · user is not signed in
Interaction details
- all · click
Business rules
4Policies and constraints the product must keep.
- 01RestrictionBR-NOTICES-01
The notifications list is filtered to only include notices belonging to the currently signed-in user before being rendered.
Rule scope and code anchor
Roles · ROLE-USER, ROLE-MEMBER, ROLE-HOST, ROLE-ADMIN
Linked criteria 1Criterion 01Read linked criteria here
- AC-NOTICES-01Given a signed-in user with stored notifications matching their id, when they open the notifications page, then only their own notices are rendered.
- 02CalculationBR-NOTICES-02
Notifications are displayed in reverse order so the most recently created notice appears first.
Linked criteria 1Criterion 02Read linked criteria here
- AC-NOTICES-02Given multiple matching notices with different creation dates, when the list renders, then the notice with the latest creation date appears at the top of the list.
- 03PermissionBR-NOTICES-03
When no user is signed in, a sign-in prompt with a link to the login flow is shown alongside the notifications section.
Rule scope and code anchor
Roles · ROLE-USER
Linked criteria 1Criterion 03Read linked criteria here
- AC-NOTICES-03Given no user is signed in, when the notifications page is opened, then a sign-in prompt with a link to the login flow is displayed.
- 04ValidationBR-NOTICES-04
If no notifications remain after filtering, an explicit empty-state message is shown in place of the list.
Linked criteria 1Criterion 04Read linked criteria here
- AC-NOTICES-04Given a signed-in user with zero matching notifications, when the page renders, then an empty-state message is shown instead of a blank list.
Acceptance criteria
4Expected outcomes. These entries do not claim a test was run or passed.
- 01CriterionAC-NOTICES-01
Given a signed-in user with stored notifications matching their id, when they open the notifications page, then only their own notices are rendered.
Linked rules 1Rule 01 - 02CriterionAC-NOTICES-02
Given multiple matching notices with different creation dates, when the list renders, then the notice with the latest creation date appears at the top of the list.
Linked rules 1Rule 02 - 03CriterionAC-NOTICES-03
Given no user is signed in, when the notifications page is opened, then a sign-in prompt with a link to the login flow is displayed.
Linked rules 1Rule 03 - 04CriterionAC-NOTICES-04
Given a signed-in user with zero matching notifications, when the page renders, then an empty-state message is shown instead of a blank list.
Linked rules 1Rule 04
Source files 11
- page.tsx
- LeafProvider.tsx
- useLeafState.ts
- useLeafLocale.ts
- locale.ts
- layout.tsx
- headings.tsx
- types.ts
- FeatureFrame.tsx
- notifications.tsx
- notifications.mjschanged
Source anchors are injected deterministically. No GitHub repository is connected. File links are unavailable.
