urbit / shrub

An operating function (Prototype)
https://urbit.org
MIT License
29 stars 2 forks source link

sky: notifications #86

Open bonbud-macryg opened 4 months ago

bonbud-macryg commented 4 months ago

Sky should be the best client for using Urbit, and it should clear this bar soon. One essential part of this is notifications. Sky should store notifications; Sky should be able to make your phone buzz; third-party Urbit developers should be able to make your phone buzz.

This is achievable with a Sky PWA, which is well within our remit with the team and resources we have. With browser notifications and a PWA, we have one system that sends system notifications across macOS, Windows, iOS, Android, and Linux.

Sky notifications should satisfy these requirements:

tiller-tolbus commented 4 months ago

These are nice long-term goals, but we should be thinking more about immediate next steps.

My presumptive answer:

+$  notification  [=pith =time =text]

Missing in the above is read receipts and human-readable names for the addressing of paths. My path forward would be for Sky to later include primitives for tracking all of the page loads in its navigation, and "read" status of a notification will be a function on the path/time of the notification and the last known load of that path. Human-readable names will also be an overlay namespace, where a path can be configured to have a name and icon for the purposes of both notifications and the navigation bar. Ex. /home/dm/~zod would be assigned a human-readable name like "Messages with ~zod".

With this presumptive answer, we should instantiate a home/notifications and try a flow with something like imp/dm to hook into home/notifications as a dependency and send alerts when a new message is received. A con/notifications-htmx can be an "administrative view" of the notification tray.