feat(dashboard): project notification persistence and add notification inbox#1232
Open
simplesagar wants to merge 17 commits intomainfrom
Open
feat(dashboard): project notification persistence and add notification inbox#1232simplesagar wants to merge 17 commits intomainfrom
simplesagar wants to merge 17 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: dafd3dc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
7f258d2 to
5f4d3b3
Compare
b19df83 to
5408d45
Compare
Contributor
Squawk Report✅ 0 violations across 1 file(s)
|
- Add notifications database table with project scope - Create Goa API service with list, create, archive, unreadCount endpoints - Implement backend service with SQLc queries - Create toast wrapper to persist notifications to backend - Add NotificationBell component with Active/Archived tabs - Integrate bell into sidebar header - Migrate all toast imports to use new wrapper Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix SDK call to wrap notification data in createNotificationForm - Change toast persistence to opt-in (persist: true) instead of opt-out - Move notification bell from sidebar to page header for better visibility - Fix notification-bell Date type handling for lastViewedAt - Add persist: true to important user action toasts across the dashboard: - Toolset tool additions/removals - MCP server enable/disable - Deployment redeployments - Source operations (create, delete, environment attach) - Project operations (create, archive) - Playground API key operations - Feature request submissions - And more Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix import path for @gram/client/react-query (remove index.js suffix) - Fix Stack justify prop value (between -> space-between) - Apply Prettier formatting to modified files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ployment - Use Date type for notification createdAt/archivedAt (matches SDK) - Pass empty object instead of undefined to queryKeyNotificationsUnreadCount - Remove function wrapper around JSX in toast.success call Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove chat history UI code that was incorrectly introduced during conflict resolution. This code referenced undefined variables and types that don't belong to this branch. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
345506b to
d80bd4b
Compare
Regenerate lockfile to include dependencies from elements/package.json that were added in main branch. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Regenerate Goa server code to sync with codebase - Update atlas.sum after new migration from main branch Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Collaborator
Preview Environment (PR #1232)Preview environment scaled down after 0.01h of inactivity. |
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
createNotificationFormobject to match SDK schema requirementspersist: false) to opt-in (persist: true) for explicit control over which toasts are persisted to the notification bellCleanShot.2026-01-18.at.14.07.14.mp4
Architecture
Notification System Overview
The notification system uses a frontend-driven persistence model where toasts can optionally be persisted to the database for display in the notification bell.
flowchart TB subgraph Frontend["Frontend (React)"] UA[User Action] --> TC[toast.success/error/etc] TC --> ST[Sonner Toast] TC -->|persist: true| PN[persistNotification] PN --> SDK[Gram SDK Client] NB[Notification Bell] -->|Poll every 30s| UC[Unread Count Query] NB -->|On open| NL[Notifications List Query] end subgraph Backend["Backend (Go)"] SDK -->|POST /rpc/notifications.create| NS[Notifications Service] UC -->|GET /rpc/notifications.unreadCount| NS NL -->|GET /rpc/notifications.list| NS NS --> DB[(PostgreSQL)] end ST -->|Ephemeral| User((User sees toast)) NB -->|Persistent| UserKey Components
src/lib/toast.tssrc/components/notification-bell.tsxserver/internal/notifications/impl.goHow It Works
Toast Creation: When code calls
toast.success("message", { persist: true }):persist: true, the wrapper calls the SDK to create a notificationPersistence: The SDK sends
POST /rpc/notifications.createwith:Bell Updates: The notification bell:
/rpc/notifications.unreadCountevery 30 secondsDesign Decisions
persist: trueare saved, preventing notification spamTest plan
persist: truedo NOT appear in notification bell🤖 Generated with Claude Code