Skip to content

[MBL-19891][All] Fix wrong inbox toast message when marking conversation as read/unread#3617

Merged
kristofnemere merged 1 commit intomasterfrom
MBL-19891
Apr 2, 2026
Merged

[MBL-19891][All] Fix wrong inbox toast message when marking conversation as read/unread#3617
kristofnemere merged 1 commit intomasterfrom
MBL-19891

Conversation

@kristofnemere
Copy link
Copy Markdown
Contributor

@kristofnemere kristofnemere commented Apr 1, 2026

Test plan:

  1. Open any app (Student, Teacher, or Parent)
  2. Navigate to Inbox
  3. Open a conversation (details page)
  4. Tap the overflow menu and select Mark as Unread — verify toast says "Conversation marked as unread"
  5. From the details page of an archived conversation, tap Unarchive — verify toast says "Conversation unarchived"
  6. From the details page of an unread conversation (if mark as read is available), tap Mark as Read — verify toast says "Conversation marked as read"
  7. Tap Archive on a non-archived conversation — verify toast says "Conversation archived"

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.

  • Follow-up e2e test ticket created or not needed
  • Tested in dark mode
  • Tested in light mode
  • Test in landscape mode and/or tablet
  • A11y checked
  • Approve from product

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

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 previousState before 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, so previousState would not have been ARCHIVED under 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 else branch messagelibs/pandautils/src/main/java/com/instructure/pandautils/features/inbox/details/InboxDetailsViewModel.kt line 291: WorkflowState.UNKNOWN is the only value matched by else, but the fallback message conversationUnarchived is semantically wrong for that case. See inline comment.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

🧪 Unit Test Results

✅ 📱 Parent App

  • Tests: 315 total, 0 failed, 0 skipped
  • Duration: 30.950s
  • Success Rate: 100%

✅ 📱 Student App

  • Tests: 1252 total, 0 failed, 0 skipped
  • Duration: 0.000s
  • Success Rate: 100%

✅ 📱 Teacher App

  • Tests: 373 total, 0 failed, 0 skipped
  • Duration: 30.532s
  • Success Rate: 100%

✅ 🌅 Horizon

  • Tests: 790 total, 0 failed, 0 skipped
  • Duration: 37.242s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 3347 total, 0 failed, 0 skipped
  • Duration: 54.098s
  • Success Rate: 100%

📊 Summary

  • Total Tests: 6077
  • Failed: 0
  • Skipped: 0
  • Status: ✅ All tests passed!

Last updated: Wed, 01 Apr 2026 12:23:07 GMT

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

📊 Code Coverage Report

✅ Student

  • PR Coverage: 42.65%
  • Master Coverage: 42.65%
  • Delta: +0.00%

✅ Teacher

  • PR Coverage: 25.37%
  • Master Coverage: 25.37%
  • Delta: +0.00%

✅ Pandautils

  • PR Coverage: 23.68%
  • Master Coverage: 23.67%
  • Delta: +0.01%

📈 Overall Average

  • PR Coverage: 30.57%
  • Master Coverage: 30.56%
  • Delta: +0.00%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

Parent Install Page

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

Teacher Install Page

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

Student Install Page

Copy link
Copy Markdown
Contributor

@adamNagy56 adamNagy56 left a comment

Choose a reason for hiding this comment

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

QA +1

Copy link
Copy Markdown
Contributor

@kdeakinstructure kdeakinstructure left a comment

Choose a reason for hiding this comment

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

QA 👍

@kristofnemere kristofnemere merged commit 1a90c2f into master Apr 2, 2026
30 of 31 checks passed
@kristofnemere kristofnemere deleted the MBL-19891 branch April 2, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants