robby1066 / keepposted-help

Documentation, Issue Tracker, and Repository of Knowledge For Keep Posted (www.keepposted.io) — A way to keep teams informed and connected without disrupting their focus.
https://www.keepposted.io
1 stars 0 forks source link

Add a reminder notification to complete an unfinished message #48

Closed robby1066 closed 3 years ago

robby1066 commented 3 years ago

What's the problem you're hoping this new feature will solve?

It's easy to forget to finish a message, especially if other people are involved and have not yet recorded their clips.

Description of feature

When a message is created, a job is scheduled for some time later (24 hrs? 48?). When this job runs, it will do the following:

Alternatives and workarounds

The message creator currently gets notified when ALL outstanding clips have been recorded, but otherwise has to remember to come back and check on their messages.

robby1066 commented 3 years ago

The states that should be covered by this check (these are common states for all messages, there may be use cases that are specific for certain message types, but this first pass will go with the global states)

State: The message is completed

If so, there's no action we can reliably tell the message creator to take without a high chance of false positive.

e.g. We could prompt them to share the message, but they may have done that in a way that's not tracked by the system.

If we are tracking views (the app does not do this currently), this may be an opportunity to notify the creator about engagement.

We could also notify if there is feedback to be reviewed, but it's possible those interactions send notifications of their own.

Prompt: none

State: The message is ready to be built

In this state, all clips have been recorded, but the message has not been built, so there is no chance that it's been shared in a meaningful way yet.

Prompt: Your message is ready to be built and sent!

State: There are outstanding clips remaining to record

In this state, the message is not ready to build because there are clips present that do not yet have a video recorded. In this state, three scenarios are possible:

  1. The outstanding clips are assigned to the message creator
  2. The outstanding clips are assigned to a guest speaker(s)
  3. Some of the outstanding clips are assigned to the message creator and some are assigned to guest speakers

In this case, the reminder should let the message creator easily understand the state of the message and the actions they can take to complete it. Specifically:

  1. If the message creator has outstanding clips, they should record them
  2. If outstanding clips are assigned to guest speakers, the creator can:
    • nudge them to record
    • assign the clip to someone else (possibly assign back to the message creator themselves)
    • remove the clip

Prompt: Some of the clips for your message still need to be recorded Prompt: Your message is X% complete (where X is the complete clips / total clips) Prompt: Your message has 3 unfinished clips

State: The message has zero clips

In this state, it's difficult to tell what's going on. For some reason, the message has no clips created. This may be a transient state for a specific message type. Or it may be an error state the message creator got into while editing the clip and then abandoned.

There may not be a lot of value—and a lot of potential for confusion—when trying to nudge the message creator about this state.

Prompt: None

robby1066 commented 3 years ago

Deploying this now. The two states outlined above are covered, and notifications are set to trigger 24 hours after message creation.

It needs to be tested to see if 24 hours is the right interval

Another issue that will impact this feature is the way background jobs are currently handled in Keep Posted. Since the app is not using a dedicated message queue process, jobs that are scheduled, but not yet run, will be clobbered by a new deploy. This needs to be dealt with at some point, but is a non-trivial infrastructure change.

robby1066 commented 3 years ago

Confirmed that the reminders are being sent at the correct time in production.

Screenshot 2021-03-31 at 16 27 29

The problem with deploys nuking the delayed background jobs is going to be an issue. But it's going to be difficult to fix that without making a rather involved backend change, so I'm not going to let that hold this feature up. Closing for now and will take a look at the background job handling later.