Notification system UX and reliability overhaul - #879
Merged
Conversation
- useInBox: replaced stub (always returned empty []) with proper useSWR-based fetching via client.inbox.getMessages() and client.inbox.getUnreadCount(), matching the pre-SDK-refactor behavior - notification: replaced two buggy useEffect+setState hooks with a single useMemo for derived groupedMessages state, eliminating the infinite setState-inside-useEffect re-render loop
…ributionMessage from undefined result
…hide empty groups (6v2.6) - Created InBoxContext + InBoxProvider, migrated all 10 consumers to useInBoxContext - Added mutateMessages to context for future SWR cache invalidation - Replaced 'Project cited' literal with MessageSubject.PROJECT_CITED enum - Filtered out empty message groups from notification sidebar and content
…date SWR cache after markRead (6v2.2) - Added Spinner loading state while isLoading - Added error state with retry button when fetch fails - Added translation keys for new states - setReadedMessage now calls mutateMessages() to invalidate SWR cache so all components see updated read status immediately
… sendMessage error handling (6v2.9) - Added 'Mark all as read' button with unread count to notification page - Added real-time SWR refreshInterval to messages list using env var - Added try/catch around sendMessage with console.error fallback
…tch to getServerSideProps (6v2.12) - Removed Apollo useQuery/useEffect from ContributionMessage - All display data now comes from notification payload (proposerName, originalResourceName, projectOwnerName) - Switched /notification from getStaticProps to getServerSideProps for proper auth context
- Empty state: verifies 'No notifications at the moment' message - Error state: verifies error message + retry button on network failure - Loading state: verifies spinner visibility while data is fetching - Mark all read: verifies button hidden when all messages are read
…tification immediately
… login Route mocks must be in place before login (which triggers SWR's first fetch). Split into separate test groups with their own beforeEach for each scenario. Removed unreliable loading spinner test (SWR caching makes it fragile).
…stead of 'Citations'
… to avoid SWR race
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.
Summary
Comprehensive overhaul of the notification system across interfacer-gui and zenflows-inbox. Fixes UX issues, reliability, and code quality.
GUI Changes
Backend Changes (deployed)
Closes epic interfacer-gui-6v2