-
Notifications
You must be signed in to change notification settings - Fork 107
[MBL-19490] Invalidate inbox cache when refreshing after message send #3410
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
Conversation
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]>
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.
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()beforerefresh()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 bothinvalidateCache()andrefresh()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.
📊 Code Coverage Report✅ Student
✅ Teacher
✅ Pandautils
📈 Overall Average
|
adamNagy56
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.
- 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
kdeakinstructure
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.
Please fix the issue found regarding sending message from people page.
Not in scope of this ticket. Should be separate story.
kdeakinstructure
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.
Sending conversation message out of inbox is not scope of this bug ticket, as we discussed, so I approve the bugfix.
adamNagy56
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.
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]>
🧪 Unit Test Results✅ 📱 Parent App
✅ 📱 Student App
✅ 📱 Teacher App
✅ 🌅 Horizon
✅ 📦 Submodules
📊 Summary
Last updated: Fri, 28 Nov 2025 14:01:04 GMT |
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
refs: MBL-19490
affects: Student, Teacher, Parent
release note: Fixed an issue where newly sent messages would not appear immediately in the inbox