Skip to content

Feat/notification history 109#136

Open
Chrisland58 wants to merge 3 commits into
wraith-protocol:developfrom
Chrisland58:feat/notification-history-109
Open

Feat/notification history 109#136
Chrisland58 wants to merge 3 commits into
wraith-protocol:developfrom
Chrisland58:feat/notification-history-109

Conversation

@Chrisland58

Copy link
Copy Markdown
Contributor

feat(notifications): persist and search SW notification history (#109)

Summary

Notifications fired once and disappeared — users had no way to find "the alert about payment X"
after dismissing it. This PR wires up persistent notification history with a full search and
filter UI.

What changed

New store (notificationsStore.ts) — Zustand store with persist middleware so entries survive
page reloads. Tracks each notification with its amount, asset, and sender fields for indexed
search. Exposes unreadCount and a search method that filters by free-text query and/or date
range.

New service worker (src/sw/stellar-notification-sw.ts) — Handles incoming push events, shows
browser notifications, and immediately broadcasts each payload to all open tabs via
postMessage. On notification click, navigates the user directly to /notifications.

New hook (useNotificationSW.ts) — Registers the SW on app load and listens for
WRAITH_NOTIFICATION messages, persisting them into the store so history is captured whether or
not the user has the tab open.

New page (/notifications) — Full notification history UI:

  • Free-text search across amount, asset, sender, title, and body
  • Date range filter (from / to)
  • Unread-only toggle
  • Mark individual entries read or unread
  • Delete individual entries
  • Bulk "Mark all read" and "Clear all"

Header badge — The Notifications nav link now shows a live unread count badge on both desktop
and mobile.

Acceptance checklist

  • ✅ Persists across reloads (zustand + localStorage)
  • ✅ Search matches on all indexed fields (amount, asset, sender, title, body)
  • ✅ Unread count reflected in header badge
  • ✅ Filter by time range (from / to date pickers)
    closes Notification history search #109

…th-protocol#109)

- Add notificationsStore (zustand + persist) with addNotification,
  markRead/markUnread/markAllRead, removeNotification, clearAll,
  unreadCount, and search (query + date-range)
- Add /notifications page with full-text search, date-range filter,
  unread-only toggle, mark read/unread, delete per row, mark all
  read, clear all actions
- Add stellar-notification-sw.ts service worker: handles push events,
  shows browser notifications, broadcasts WRAITH_NOTIFICATION to all
  open clients, opens /notifications on click
- Add useNotificationSW hook: registers SW, listens for messages,
  persists entries via store
- Update Header to include Notifications nav link with live unread
  count badge (desktop + mobile)
- Update App.tsx with /notifications route and useNotificationSW call
@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

@Chrisland58 is attempting to deploy a commit to the truthixify's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@Chrisland58 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Resolved conflicts:
- src/App.tsx: kept /notifications route + added upstream /schedule route
- src/sw/stellar-notification-sw.ts: merged our push/persist logic with
  upstream's IndexedDB viewing-key storage and background sync handler
- src/hooks/useStellarWallet.ts: accepted upstream setPreconnectedWallet
- src/wallets/stellar/index.ts: accepted upstream WalletConnectAdapter
- src/components/StellarSend.tsx, StellarVaultClaim.tsx,
  StellarWalletPicker.tsx, StellarReceive.tsx: accepted upstream versions
- Accepted upstream deletions: AlbedoAdapter, LobstrAdapter, XBullAdapter,
  StellarReceive.wallet.integration.ts, adapters.test.ts
@truthixify

Copy link
Copy Markdown
Contributor

build failing on prettier drift in src/components/FreighterConnectButton.tsx. Run pnpm format and push.

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.

Notification history search

2 participants