forked from wireapp/reminders-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: Use composite messages to improve UX WPB-17856 #27
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
Merged
olanokhin
merged 31 commits into
main
from
feat/Use-Composite-messages-to-improve-UX-WPB-17856
Sep 19, 2025
Merged
Feat: Use composite messages to improve UX WPB-17856 #27
olanokhin
merged 31 commits into
main
from
feat/Use-Composite-messages-to-improve-UX-WPB-17856
Sep 19, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update: sdk password to fit latest 0.0.16 version (32 chars)
WIRE_SDK_API_URL,WIRE_SDK_API_BOT_KEY;
…arate composite messages where delete button has same UUID as a reminder;
Create: separate DTO for new Message and new ButtonAction;
Split: process logic; Update: delete reminder, to listen button actions and send button action confirmation;
bbaarriiss
reviewed
Sep 18, 2025
src/main/kotlin/com/wire/bots/infrastructure/repository/MlsSdkOutgoingMessageRepository.kt
Show resolved
Hide resolved
bbaarriiss
requested changes
Sep 18, 2025
src/main/kotlin/com/wire/bots/domain/event/handlers/CommandHandler.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/wire/bots/domain/event/handlers/CommandHandler.kt
Outdated
Show resolved
Hide resolved
src/main/kotlin/com/wire/bots/domain/event/handlers/CommandHandler.kt
Outdated
Show resolved
Hide resolved
yamilmedina
reviewed
Sep 19, 2025
yamilmedina
reviewed
Sep 19, 2025
… messages in separate helper functions to make core methods of Command handler easeir to read and understand;
bbaarriiss
approved these changes
Sep 19, 2025
bbaarriiss
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks @olanokhin . But I would like you to wait also for @yamilmedina 's review.
yamilmedina
approved these changes
Sep 19, 2025
yamilmedina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🚀
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Issues
ParseExceptiondue to an invalid cron string format.duplicate keyerrors when a user retried a failed reminder creation command./remind listcommand displayed incorrect text for daily reminders (e.g., "every month" instead of "every day").Causes (Optional)
BUTTON_ACTIONevents from the messaging platform.CronInterpretergenerated cron strings for "every day" (* * *) that were incompatible with the Quartz scheduler, which requires one of the day fields (day-of-month or day-of-week) to be?.cronToText) was incorrectly identifying the pattern for "every day".handleNewReminderflow, the reminder was saved to the database before the confirmation message was generated. If message generation failed (due to the invalid cron), an exception was thrown, but the saved data remained, leading to a duplicate key error on retry.Solutions
BUTTON_ACTIONevents. When a "Delete" button is clicked, the bot now correctly identifies the reminder, deletes it, sends aButtonActionConfirmationto update the original message's button state, and sends a new message confirming the deletion. This also works correctly if the reminder has already been deleted by another action.CronInterpreterto generate Quartz-compatible cron strings (e.g.,? * *for "every day").cronToTextlogic to correctly parse and display daily recurring reminders.CommandHandler.handleNewReminderto first validate all inputs and generate the confirmation message. The reminder is now saved to the database only if all preceding steps succeed. This prevents inconsistent states and resolves theduplicate keyerror.try-catchblocks for control flow with explicit checks (e.g., using a regex for UUID validation) to resolveSwallowedExceptionwarnings.Reminder.ktto ensure cron parsing errors propagate correctly.forloops withrepeatwhere the index was unused.CronInterpreterto align with the new, valid cron formats.Dependencies (Optional)
Testing
Test Coverage (Optional)
How to Test
'Daily Standup' at: every day at 10:00.PR Post Submission Checklist for internal contributors (Optional)
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.