puter
puter copied to clipboard
Notification Management
Notification Management Task
Notification management on Puter is very limited right now. Basically, you can get a notification and click it to make it go away, and then never see it again. A proper notification system would allow users to access a history of their notifications. Below is information which may be helpful for completing this task. You will notice some of the required functionality is missing for functions such as paginated notification history.
Getting notifications
At initialization
- Puter's desktop will send a websocket event called
puter_is_actually_openwhich indicates 1. that the socket is ready, and 2. GUI is ready to accept all events. - WebServerService receives this and sends
web.socket.user-connectedthrough EventService (event bus for runtime events in backend, different from the initialization event bus implemented in Container.js) - NotificationService handles this event and, after fetching notifications and updating them as "shown", sends an event back to EventService with a list of unread notifications which is then sent back to the user though websockets because the event name (
outer.gui.notif.unreads) begins withouter.gui- In general, events beginning with
outer.guiare sent to other Puter instances in the cluster via BroadcastService, and then events beginning withouter.guiwill be sent to any GUI sessions connected to that instance via websockets.
- In general, events beginning with
- UIDesktop handles
notif.unreadsand displays the notifications the user hasn't seen yet
A notification is sent while the user is logged in
- Something in backend calls the notify method on NotificationService
- NotificationServices sends
outer.gui.notif.message - UIDesktop in gui handles the event and shows a notification toast
Hi, I am Rishabh from Headstarter. I would like to work on this issue. Can you assign this task to me?
Assigned! Let me know if you run into any hurdles
Hey @KernelDeimos, Is it possible for me to work on this issue as well?
^ responded on Headstarter Slack
Thank you! @RadoBoiii let me know if you'd like to collaborate ?
Sure thing! That'd be great!
I am working on it currently will let you know about updates in the morning 10 MST. We can take things from there. Meanwhile were you able to make any progress.
I'll send you my fork link. You can work on that itself. I have been working on it. Still fixing the notification history
Sent you the link!
Hi my name is Bitania yonas from Headstarter I would like to work on this issue Can you assign this task to me?