Skip to content

Add "View all notifications" page and link for notifications beyond the first 10#121

Merged
Sendi0011 merged 1 commit into
JointSave-org:mainfrom
Krishna41357:improve/view-all-notifications
Jun 26, 2026
Merged

Add "View all notifications" page and link for notifications beyond the first 10#121
Sendi0011 merged 1 commit into
JointSave-org:mainfrom
Krishna41357:improve/view-all-notifications

Conversation

@Krishna41357

Copy link
Copy Markdown
Contributor

Summary

Closes #110

useNotifications (and the /api/notifications route it calls) hardcoded a 10-row limit, so older notifications became permanently inaccessible from the UI once a user accumulated more than 10. This adds a way to view the full history.

Changes

  • frontend/app/api/notifications/route.tsGET now supports an optional ?page=<n> query param. When present, it returns paginated results ({ data, total, page, pageSize }) using the same count: 'exact' + .range() pattern already used by /api/pools for My Groups. When absent, behavior is unchanged — still returns the most recent 10 for the dropdown.
  • frontend/app/dashboard/notifications/page.tsx (new) — full notification history page for the connected wallet, using the same pagination UI/pattern as My Groups (Pagination component, ?page= URL param).
  • frontend/components/dashboard/dashboard-header.tsx — adds a "View all notifications" link at the bottom of the dropdown, shown whenever there's at least one notification.

Scope

Per the issue, this is scoped to just the page + link. Filtering/search on the notifications page is left as a follow-up.

Testing

  • Verified the dropdown's existing behavior (10-item cap, mark-all-read, realtime subscription) is unchanged — diff is purely additive.
  • Verified wallet scoping: both the paginated and default API paths filter with .eq('wallet_address', wallet), and the page only ever requests the connected wallet's address.
  • Verified pagination walks past the first 10 rows using .range() with a real count: 'exact' total, not capped client-side.

Adds a paginated full notification history page and a 'View all
notifications' link in the dropdown, so users can see notifications
beyond the most recent 10.

Closes JointSave-org#110
@Sendi0011
Sendi0011 self-requested a review June 26, 2026 17:26
@Sendi0011
Sendi0011 merged commit 316f55c into JointSave-org:main Jun 26, 2026
1 of 2 checks passed
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.

[Improvement] Add a "View all notifications" link or page when there are more than 10

2 participants