[MBL-19891][All] Fix wrong inbox toast message when marking conversation as read/unread#3617
Merged
kristofnemere merged 1 commit intomasterfrom Apr 2, 2026
Merged
[MBL-19891][All] Fix wrong inbox toast message when marking conversation as read/unread#3617kristofnemere merged 1 commit intomasterfrom
kristofnemere merged 1 commit intomasterfrom
Conversation
…ion as read/unread Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
There was a problem hiding this comment.
Review Summary
This PR correctly differentiates between "unarchiving" (READ from ARCHIVED) and "marking as read" (READ from UNREAD/other) by capturing previousState before the API call, then using it in a when expression. The approach is clean and the new string resources are well-named.
Positive highlights:
- Capturing
previousStatebefore the async API call is the right approach — avoids reading stale state after the update. - The old unarchiving test had a subtle gap: it didn't set up the initial conversation as
ARCHIVED, sopreviousStatewould not have beenARCHIVEDunder the new logic. The fix properly loads an archived conversation before testing the unarchive path. - New tests cover all new code paths (
markAsRead,markAsUnread,unarchive) clearly and are well-structured. - Renaming "snackbar" → "toast" in test names is a good consistency fix.
Issues:
- Misleading
elsebranch message —libs/pandautils/src/main/java/com/instructure/pandautils/features/inbox/details/InboxDetailsViewModel.ktline 291:WorkflowState.UNKNOWNis the only value matched byelse, but the fallback messageconversationUnarchivedis semantically wrong for that case. See inline comment.
Contributor
🧪 Unit Test Results✅ 📱 Parent App
✅ 📱 Student App
✅ 📱 Teacher App
✅ 🌅 Horizon
✅ 📦 Submodules
📊 Summary
Last updated: Wed, 01 Apr 2026 12:23:07 GMT |
Contributor
📊 Code Coverage Report✅ Student
✅ Teacher
✅ Pandautils
📈 Overall Average
|
Contributor
Contributor
tamaskozmer
approved these changes
Apr 1, 2026
Contributor
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Test plan:
refs: MBL-19891
affects: Student, Teacher, Parent
release note: Fixed incorrect toast message shown after marking a conversation as read or unread from the conversation details page.