Skip to content

Conversation

@hermannakos
Copy link
Collaborator

@hermannakos hermannakos commented Nov 25, 2025

Summary

When a user sends a message or reply, the inbox list screen should display the newly sent message immediately. However, the cache was not being invalidated before refreshing, causing stale data to appear (especially noticeable in the SENT scope).

This fix ensures the cache is properly cleared before refreshing the inbox list, following the existing pattern already established in the conversationUpdated() method.

Test Plan

  1. Open the Canvas app and navigate to Inbox
  2. Send a new message to any recipient
  3. Navigate to the SENT scope
  4. Verify the newly sent message appears immediately in the list
  5. Switch between different scopes (INBOX, UNREAD, STARRED, SENT, ARCHIVED)
  6. Verify each scope shows fresh data without cached stale entries
  7. Test replying to an existing conversation and verify the conversation list updates

refs: MBL-19490
affects: Student, Teacher, Parent
release note: Fixed an issue where newly sent messages would not appear immediately in the inbox

  • Dark/light mode testing
  • Landscape/tablet testing
  • Accessibility testing
  • Product approval (if needed)

When a user sends a message, the inbox list is refreshed but was not
invalidating the cache first, causing stale data to appear. This fix
ensures the cache is cleared before refreshing, following the existing
pattern used in conversationUpdated().

Affects: Student, Teacher, Parent apps
Test Plan: Send a message, navigate to SENT scope, verify new message appears

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copy link

@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 adds a cache invalidation call before refreshing the inbox list when a RefreshListScreen action is received. The change is minimal and focused.

Positive Feedback

  • Good fix: Adding invalidateCache() before refresh() ensures that stale cached data is cleared, which should resolve issues where refreshing the inbox doesn't show the latest data
  • Consistent pattern: This matches the existing pattern used in the conversationUpdated() method (lines 458-462) which also calls both invalidateCache() and refresh() in sequence
  • Simple and targeted: The change is minimal and addresses a specific issue without introducing unnecessary complexity

Observations

The change looks solid. The pattern of calling invalidateCache() before refresh() is already established in this codebase at line 459, so this maintains consistency.

No issues found - the implementation is clean and follows existing conventions.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

📊 Code Coverage Report

✅ Student

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

✅ Teacher

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

✅ Pandautils

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

📈 Overall Average

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

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Parent Install Page

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Teacher Install Page

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

Student Install Page

Copy link
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.

  • If we cache the Sent section in the Inbox and then send a message from the People page, it doesn’t refresh automatically, it only updates after a manual refresh. This happens in both the Teacher and Parent apps.
Screen_Recording_20251126_115710_Canvas.Parent.mp4
Screen_Recording_20251126_120057_Canvas.Teacher.mp4

Copy link
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.

Please fix the issue found regarding sending message from people page.

@hermannakos hermannakos dismissed stale reviews from adamNagy56 and kdeakinstructure November 27, 2025 11:50

Not in scope of this ticket. Should be separate story.

Copy link
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.

Sending conversation message out of inbox is not scope of this bug ticket, as we discussed, so I approve the bugfix.

Copy link
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

Add waitForIdle() after clicking overflow menu items to ensure the
UI has settled before the test continues. This prevents race conditions
where the test tries to assert on the next screen before navigation
completes.

Test Plan: Ran testMessageOverflowMenuForwardButton on Pixel 2 API 29
emulator and verified it passes consistently.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@github-actions
Copy link

🧪 Unit Test Results

✅ 📱 Parent App

  • Tests: 310 total, 0 failed, 0 skipped
  • Duration: 32.252s
  • Success Rate: 100%

✅ 📱 Student App

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

✅ 📱 Teacher App

  • Tests: 364 total, 0 failed, 0 skipped
  • Duration: 33.541s
  • Success Rate: 100%

✅ 🌅 Horizon

  • Tests: 449 total, 0 failed, 0 skipped
  • Duration: 32.565s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 2418 total, 0 failed, 0 skipped
  • Duration: 51.985s
  • Success Rate: 100%

📊 Summary

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

Last updated: Fri, 28 Nov 2025 14:01:04 GMT

@hermannakos hermannakos merged commit 5c1cd61 into master Nov 28, 2025
47 of 48 checks passed
@hermannakos hermannakos deleted the MBL-19490-inbox-sent-refresh branch November 28, 2025 15:19
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.

5 participants