This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Refactor Notifications Reading for Better CLI Usage #315
Labels
design
Requires design
enhancement
New feature or request
r&d:polykey:core activity 3
Peer to Peer Federated Hierarchy
Revisting the Notifications domain I've realised that the reading and responding functionality could be improved. The
NotificationsManager
itself has 6 separate methods for reading/retrieving notifications, many of which are very repetitive and provide little to no extra functionality and/or are unnecessary abstractions.The CLI command for reading notifications can also be simplified and extended to improve the user experience. As brought up in other issues (#188, MatrixAI/js-db#1), better indexing should be applied to the notifications domain in order to allow notifications to be searched and sorted more efficiently, and this should be extended to the CLI. The notifications displaying in the CLI is poorly designed at the moment and is more suited to a GUI. All notifications are displayed by default, and the command options provide limited value (for example being able to reverse the order of notifications in the display).
A solution to this would be to refactor the
NotificationsManager
to reduce the number of methods required. This should wait until after MatrixAI/js-db#1 so that indexing can be incorporated at the same time. Thenotifications read
command should also be rethought with respect to usability. Potential features include:notifications read
as a streaming call rather than a unary call, similar to other handlers that return a list of resultsThe text was updated successfully, but these errors were encountered: