Skip to content
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

feat: follow up reminders #9567

Merged
merged 2 commits into from
Jun 25, 2024
Merged

feat: follow up reminders #9567

merged 2 commits into from
Jun 25, 2024

Conversation

st3iny
Copy link
Member

@st3iny st3iny commented Apr 15, 2024

Implements #3996

Diff is containing a lot of tests.

Testing

  1. Disable the delay in the frontend to show follow up reminders right away.
Comment or remove the line: src/components/MailboxThread.vue:207
//notAfter.setDate(notAfter.getDate() - 4)
  1. Reset the classifier job to make it run on the next cron job (and trigger it).
update oc_jobs set last_run = 0, last_checked = 0 where class like '%FollowUpClassifierJob%';

Architecture

Admins can disable LLM related features completely in the admin/groupware settings section. User can opt-out of this feature through the mail settings modal (bottom left one). It is enabled by default.

The feature will only be applied to new sent emails and not to existing ones. Adding a new account or resetting the cache of the sent mailbox will only trigger the feature for emails not older than 14 days to prevent a job spam.

Classifier Listener

  1. Sending a mail adds it to the sent mailbox.
  2. The next sync will pick up changes in the sent mailbox.
  3. A classifier job will be queued for each new sent mail after a couple of days.

Classifier Job

  1. Check if a sent message has been responded to by checking its thread for newer messages (meaning there was a reply).
  2. If not 1.) Run a LLM free prompt task to check if an email requires a follow-up.
  3. If 2) Tag the message with $follow_up to notify the frontend.
  4. Otherwise) Do nothing.

Frontend

  • Tagged messages will be shown in the priority mailbox after 4 days.
  • Reminders can be followed-up with a dedicated button.
  • Reminders can be dismissed through a dedicated button (just deletes the tag).

Screenshots

Priority inbox Thread view
Screenshot_20240510_130745 image

@st3iny st3iny force-pushed the feat/follow-up-reminder branch 2 times, most recently from 4e4f604 to 1730950 Compare April 30, 2024 06:22
@st3iny st3iny force-pushed the feat/follow-up-reminder branch from 1730950 to e74b41a Compare May 10, 2024 08:36
@st3iny st3iny marked this pull request as ready for review May 10, 2024 11:35
@st3iny st3iny requested a review from ChristophWurst May 10, 2024 11:35
@ChristophWurst ChristophWurst requested a review from hamza221 May 21, 2024 12:28
@ChristophWurst
Copy link
Member

Bildschirmfoto vom 2024-05-28 14-53-02

classification works. but how am I able to see the nudge? I have modified oc_mail_messages.sent_at to fake time. Do I need anything else?

}

$this->logger->debug('Message requires follow-up: ' . $message->getId());
$tag = $this->mailManager->createTag('Follow up', '#d77000', $userId);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we discussed before but there is no way to localize this because the label value is equal to it's displayed text, right?

Copy link
Member Author

@st3iny st3iny May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily. The createTag() method generates a label's value from its display text. Currently, there is no way to specify display name and label value at the same time using this method. I could adjust the API though, e.g. another optional parameter with the label value/id.

The label is localized in the frontend (if the user didn't rename it manually).

@st3iny
Copy link
Member Author

st3iny commented May 29, 2024

classification works. but how am I able to see the nudge? I have modified oc_mail_messages.sent_at to fake time. Do I need anything else?

The reminder is probably hidden in the frontend and will be shown after 4 days. I added some instructions to the PR's description.

@st3iny st3iny linked an issue May 29, 2024 that may be closed by this pull request
3 tasks
Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested & works

Design-wise we will need to tone down on the primary elements

Bildschirmfoto vom 2024-06-06 08-13-02

Disable reminder could be secondary.

The test email went to myself. Why do I see follow-up reminders for the outgoing and ingoing message? bug?

@st3iny st3iny force-pushed the feat/follow-up-reminder branch from 8bdeb84 to cf97ecb Compare June 24, 2024 15:11
@st3iny
Copy link
Member Author

st3iny commented Jun 24, 2024

I lowered the severity of the disable reminder button and moved the follow up button to the bottom. It will now properly replace the reply button. The screenshots in the description are up to date.

@st3iny st3iny force-pushed the feat/follow-up-reminder branch from cf97ecb to 2f2d1df Compare June 25, 2024 06:01
st3iny added 2 commits June 25, 2024 16:47
Signed-off-by: Richard Steinmetz <[email protected]>
If the number of available envelopes is lower than the initial page size,
the list will still be expanded without any effect. Only the second click
will trigger loading more envelopes.

Signed-off-by: Richard Steinmetz <[email protected]>
@st3iny st3iny force-pushed the feat/follow-up-reminder branch from 2f2d1df to b57eec0 Compare June 25, 2024 14:47
@st3iny st3iny enabled auto-merge June 25, 2024 14:48
@st3iny st3iny merged commit a9d702c into main Jun 25, 2024
34 of 35 checks passed
@st3iny st3iny deleted the feat/follow-up-reminder branch June 25, 2024 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Follow-up reminder (nudges)
2 participants