Skip to content

Add Message Reminders #3623

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

Draft
wants to merge 44 commits into
base: develop
Choose a base branch
from
Draft

Add Message Reminders #3623

wants to merge 44 commits into from

Conversation

nuno-vieira
Copy link
Member

@nuno-vieira nuno-vieira commented Mar 21, 2025

🔗 Issue Links

IOS-696

🎯 Goal

Add message reminders feature. This will allow users to save messages for later and get notified about them.

📝 Summary

Docs PR: https://github.com/GetStream/docs-content/pull/260

New APIs:

  • Adds new Filter.isNil to make it easier to filter nil values
  • Adds ChatMessageController.createReminder()
  • Adds ChatMessageController.updateReminder()
  • Adds ChatMessageController.deleteReminder()
  • Adds MessageReminderListController

Demo App new features:

  • Reminders Tab to show user's reminders
  • Message Cell has Saved for Later styling if it has been saved for reminder
  • Reminder actions when long pressing a message

Bonus:

  • Renames Filter+ChatChannel.swift to Filter+predicate so that we can start using it for other data and not only channels.
  • Changes Frankfurt C2 Environment to use the base URL of our staging by default.

🎨 Showcase

Simulator.Screen.Recording.-.iPhone.16.Pro.-.2025-03-28.at.16.01.16.mp4

🧪 Manual Testing Notes

In order to test the feature, you need to change the API Key to Frankfurt C2 Staging:

  • Open Demo App
  • Logout
  • Tap on Configuration
  • Tap on 1st option (AppKey)
  • Change to "Frankfurt C2 Staging"

Saving a message for later in the message list:

  1. Long tap a message
  2. Tap on "Remind Me"
  3. Set a time
  4. Message should show "Saved for later UI"
  5. Go to the Reminders Tab
  6. The reminder should be there

Saving a message as a reminder in the message list:

  1. Long tap a message
  2. Tap on "Save For Later"
  3. Message should show "Saved for later UI"
  4. Go to the Reminders Tab
  5. The reminder should be there

Removing a reminder in the message list:

  1. Long tap a message
  2. Tap on "Remove from Later"
  3. Message should NOT show "Saved for later UI"
  4. Go to the Reminders Tab
  5. The remainder should be removed from there as well

Updating a reminder in the message list:

  1. Long tap a message
  2. Tap on "Remove from Later"
  3. Message should NOT show "Saved for later UI"
  4. Go to the Reminders Tab
  5. The reminder should be removed

Fetching and filtering all reminders:

  1. Tap on the Reminders Tab
  2. Tap on the "Overdue" filter button
  3. Should only show reminders which are overdue
  4. Tap on the "Upcoming" filter button
  5. Should only show reminders which are upcoming
  6. Tap on the "Scheduled" filter button
  7. Should only show reminders which are Overdue or Upcoming
  8. Tap on "Saved for later" filter button
  9. Should only show reminders that do not have any due date.
  10. Swiping a reminder and tapping on DELETE, should delete the reminder.

Deleting a message with a reminder:

  1. Set a reminder in a message
  2. Delete the message
  3. The reminder should be deleted
  4. The reminder should not appear in the Reminders Tab

Reminder when is overdue should be removed from upcoming:

  1. Add a reminder with 2min
  2. Go to the Reminders Tab
  3. Tap on the "Upcoming" filter
  4. Wait for the reminder to overdue
  5. The reminder should disappear from the Upcoming filter
  6. The reminder should now live in the Overdue filter

Reminder Due Push Notification:

  1. Save a reminder with a due date of "2 Minutes"
  2. After 2 minutes have passed a Push Notification should be triggered.

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change should be manually QAed
  • Changelog is updated with client-facing changes
  • Changelog is updated with new localization keys
  • New code is covered by unit tests
  • Documentation has been updated in the docs-content repo

@nuno-vieira nuno-vieira requested a review from a team as a code owner March 21, 2025 18:22
Copy link

github-actions bot commented Mar 21, 2025

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@Stream-SDK-Bot
Copy link
Collaborator

SDK Size

title develop branch diff status
StreamChat 7.41 MB 7.77 MB +363 KB 🟡
StreamChatUI 4.78 MB 4.84 MB +65 KB 🟢

@Stream-SDK-Bot
Copy link
Collaborator

SDK Performance

target metric benchmark branch performance status
MessageList Hitches total duration 10 ms 10.01 ms -0.1% 🔽 🟡
Duration 2.6 s 2.54 s 2.31% 🔼 🟢
Hitch time ratio 4 ms per s 3.95 ms per s 1.25% 🔼 🟢
Frame rate 75 fps 77.91 fps 3.88% 🔼 🟢
Number of hitches 1 1.0 0.0% 🟰 🟢

@Stream-SDK-Bot
Copy link
Collaborator

Stream-SDK-Bot commented Mar 21, 2025

SDK Size

title develop branch diff status
StreamChat 7.41 MB 7.77 MB +368 KB 🟡
StreamChatUI 4.78 MB 4.84 MB +65 KB 🟢

Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

Looks great so far 👍 I think the most important thing is to check how / when push notifications will be supported - the due feature doesn't make much sense without it.
Additionally, apart from docs, we need a notion doc for other SDKs.

@nuno-vieira nuno-vieira requested a review from Copilot March 27, 2025 14:58
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 35 out of 55 changed files in this pull request and generated no comments.

Files not reviewed (20)
  • DemoApp/Screens/AppConfigViewController/AppConfigViewController.swift: Language not supported
  • DemoApp/Screens/DemoAppTabBarController.swift: Language not supported
  • DemoApp/Shared/DemoUsers.swift: Language not supported
  • DemoApp/Shared/StreamChatWrapper.swift: Language not supported
  • DemoApp/StreamChat/Components/DemoChatMessageActionsVC.swift: Language not supported
  • DemoApp/StreamChat/Components/DemoChatMessageContentView.swift: Language not supported
  • DemoApp/StreamChat/Components/DemoChatMessageLayoutOptionsResolver.swift: Language not supported
  • DemoApp/StreamChat/DemoAppCoordinator+DemoApp.swift: Language not supported
  • Sources/StreamChat/APIClient/Endpoints/EndpointPath+OfflineRequest.swift: Language not supported
  • Sources/StreamChat/APIClient/Endpoints/EndpointPath.swift: Language not supported
  • Sources/StreamChat/APIClient/Endpoints/MessageEndpoints.swift: Language not supported
  • Sources/StreamChat/APIClient/Endpoints/Payloads/MessagePayloads.swift: Language not supported
  • Sources/StreamChat/ChatClient+Environment.swift: Language not supported
  • Sources/StreamChat/ChatClient.swift: Language not supported
  • Sources/StreamChat/ChatClientFactory.swift: Language not supported
  • Sources/StreamChat/Controllers/CurrentUserController/CurrentUserController.swift: Language not supported
  • Sources/StreamChat/Controllers/MessageController/MessageController.swift: Language not supported
  • Sources/StreamChat/Database/DTOs/MessageDTO.swift: Language not supported
  • Sources/StreamChat/Database/DTOs/MessageReminderDTO.swift: Language not supported
  • Sources/StreamChat/Database/DatabaseSession.swift: Language not supported

@nuno-vieira nuno-vieira force-pushed the add/snooze-messages branch from 60495fe to 1eca9b2 Compare March 27, 2025 15:36
@nuno-vieira nuno-vieira force-pushed the add/snooze-messages branch from 193c371 to 482f986 Compare March 28, 2025 20:26
Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

Looks great and works well, don't have any remarks about the code 👍
Before merging we should:

  • make sure push works (also good if we retest again)
  • have docs PR ready
  • make sure things are deployed on every shard
    Btw, I don't think we need to implement this in SwiftUI as well. A lot of work, while the feature is mostly LLC - good docs and this sample should be enough for SwiftUI.

Copy link
Contributor

@laevandus laevandus left a comment

Choose a reason for hiding this comment

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

✅ Looks nicer with the dedicated controller

Copy link

sonarqubecloud bot commented Apr 2, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
4.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@nuno-vieira
Copy link
Member Author

Everything is Ready, but it is blocked by Push v3. So converting it to draft.

@nuno-vieira nuno-vieira marked this pull request as draft April 4, 2025 14:07
@nuno-vieira nuno-vieira added ✅ Feature An issue or PR related to a feature 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK labels Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✅ Feature An issue or PR related to a feature 🌐 SDK: StreamChat (LLC) Tasks related to the StreamChat LLC SDK 🎨 SDK: StreamChatUI Tasks related to the StreamChatUI SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants