-
Notifications
You must be signed in to change notification settings - Fork 17
feat(dashboard): project notification persistence and add notification inbox #1232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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
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 <[email protected]>
- 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 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
- 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 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Co-Authored-By: Claude Opus 4.5 <[email protected]>
…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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
- Regenerate Goa server code to sync with codebase - Update atlas.sum after new migration from main branch Co-Authored-By: Claude Opus 4.5 <[email protected]>
Preview Environment (PR #1232)Preview environment scaled down after 0.01h of inactivity. |
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