Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Refactor Notifications Reading for Better CLI Usage #315

Closed
emmacasolin opened this issue Jan 10, 2022 · 1 comment
Closed

Refactor Notifications Reading for Better CLI Usage #315

emmacasolin opened this issue Jan 10, 2022 · 1 comment
Labels
design Requires design enhancement New feature or request r&d:polykey:core activity 3 Peer to Peer Federated Hierarchy

Comments

@emmacasolin
Copy link
Contributor

emmacasolin commented Jan 10, 2022

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. The notifications read command should also be rethought with respect to usability. Potential features include:

  • Being able to search through/filter notifications by type/content
  • Only displaying a limited number of notifications at a time, with the option to see more (e.g. using a token https://docs.aws.amazon.com/wellarchitected/latest/APIReference/API_ListNotifications.html)
  • A better response mechanism, especially for Gestalt Invite notifications, and the option to manually delete/mark a notification as read/unread
  • Better JSON output - currently notifications are formatted for readability, however if JSON output is specified this should display only the notification type+contents+sender+timestamp etc.
  • Notification schema validation can be removed from the client as this is already done on the server side
  • Consider using an async generator to read notifications and refactoring notifications read as a streaming call rather than a unary call, similar to other handlers that return a list of results
@emmacasolin emmacasolin added enhancement New feature or request design Requires design labels Jan 10, 2022
@CMCDragonkai CMCDragonkai added the r&d:polykey:core activity 3 Peer to Peer Federated Hierarchy label Jul 24, 2022
@tegefaulkes tegefaulkes removed their assignment Jul 31, 2024
@CMCDragonkai
Copy link
Member

Changing to discussion since this isn't an achievable issue spec yet.

@MatrixAI MatrixAI locked and limited conversation to collaborators Aug 18, 2024
@CMCDragonkai CMCDragonkai converted this issue into discussion #793 Aug 18, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
design Requires design enhancement New feature or request r&d:polykey:core activity 3 Peer to Peer Federated Hierarchy
Development

No branches or pull requests

3 participants