feat: add desktop notifications v1#262
Open
whoisasx wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
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.
Problem
Notifications were partially implemented in the Go rewrite: the daemon could create durable unread notification rows and stream new rows, but there was no acknowledgement path and the Electron app had no notification center, unread catch-up, mark-read controls, or app-owned toast bridge.
Scoped V1 behavior
Backend changes
MarkNotificationReadandMarkAllNotificationsRead.service/notificationwithMarkReadandMarkAllRead; single mark-read is an unread-to-read transition and returnsNOTIFICATION_NOT_FOUNDfor unknown or already-read IDs.PATCH /api/v1/notifications/{id}with{ "status": "read" }POST /api/v1/notifications/read-allFrontend changes
/api/v1/notifications/streamthat:id,Tests run
npm run sqlcnpm run apicd backend && go test ./internal/service/notification ./internal/storage/sqlite/store ./internal/httpd/controllers ./internal/httpd/apispec ./internal/notify ./internal/integrationcd backend && go test ./...npm --prefix frontend test -- src/renderer/lib/notifications.test.tsnpm run frontend:typecheckgit diff --checkIntentional omissions / future work
/api/v1/notifications/stream; REST unread fetch is the catch-up path.