Pending Actions #601

Closed
opened 2023-12-22 17:21:38 +13:00 by mikedilger · 2 comments
mikedilger commented 2023-12-22 17:21:38 +13:00 (Migrated from github.com)

A lot of the time, there is some pending action that a user should be taking, but there is only vague notification (or no notification) and it is easy for users to not realize.

So I propose a pending-actions menu item with a count showing how many are pending. Here are some:

  1. Advertise - you changed your relay list recently but have not advertised it yet (or haven't advertised in over a month)
  2. Push Person List - you have updated your person list but have not pushed it
  3. Pull Person List - a newer version of your person list has arrived but not been merged in
  4. Retry Event - An event was unable to be sent to a relay. Press here to retry.
A lot of the time, there is some pending action that a user should be taking, but there is only vague notification (or no notification) and it is easy for users to not realize. So I propose a pending-actions menu item with a count showing how many are pending. Here are some: 1) Advertise - you changed your relay list recently but have not advertised it yet (or haven't advertised in over a month) 2) Push Person List - you have updated your person list but have not pushed it 3) Pull Person List - a newer version of your person list has arrived but not been merged in 4) Retry Event - An event was unable to be sent to a relay. Press here to retry.
mikedilger commented 2024-02-29 10:53:27 +13:00 (Migrated from github.com)

Ok there is a file gossip-lib/src/pending.rs that has most of the code. GLOBALS.pending is a Vec<Pending> and a magic separate thread keeps it updated.

GLOBALS.pending_hash() gives you a u64 hash of the contents of the GLOBALS.pending. So the UI can call GLOBALS.pending_hash() and compare it to a local variable in App to see if it has changed.

If it has changed you can highlight the pending flag icon.

When they click the icon, each of the Pending entries should be listed, as a link to the related page. Since Pending is in the lib I can't tell you which page it relates to, but you can probably figure them out.

Ok there is a file `gossip-lib/src/pending.rs` that has most of the code. `GLOBALS.pending` is a `Vec<Pending>` and a magic separate thread keeps it updated. `GLOBALS.pending_hash()` gives you a `u64` hash of the contents of the `GLOBALS.pending`. So the UI can call `GLOBALS.pending_hash()` and compare it to a local variable in App to see if it has changed. If it has changed you can highlight the pending flag icon. When they click the icon, each of the Pending entries should be listed, as a link to the related page. Since `Pending` is in the lib I can't tell you which page it relates to, but you can probably figure them out.
mikedilger commented 2024-04-16 13:39:30 +12:00 (Migrated from github.com)

I think this is done enough. We can open a new one if we need more for 0.11.

I think this is done enough. We can open a new one if we need more for 0.11.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nostr/gossip#601
No description provided.