Skip to content

[MBL-19850][Student] Announcement badge auto-refresh when announcement is opened#3671

Open
tamaskozmer wants to merge 1 commit intomasterfrom
MBL-19850-announcement-badge-auto-refresh
Open

[MBL-19850][Student] Announcement badge auto-refresh when announcement is opened#3671
tamaskozmer wants to merge 1 commit intomasterfrom
MBL-19850-announcement-badge-auto-refresh

Conversation

@tamaskozmer
Copy link
Copy Markdown
Contributor

@tamaskozmer tamaskozmer commented Apr 30, 2026

Test plan:

  1. Open the Student app with the new dashboard widget visible on the home screen
  2. Ensure a course has at least one unread announcement — the badge should be visible on the course card
  3. Tap the announcement badge to open the announcement detail view
  4. Navigate back to the dashboard
  5. Verify the announcement badge is gone (or the count is reduced) without needing a manual pull-to-refresh

Note: In most cases the badge updates correctly. In rare situations the backend may not have processed the read state fast enough, causing the same announcement count to appear after navigating back. This is a known edge case and is not handled in this PR.

refs: MBL-19850
affects: Student
release note: The announcement badge on course cards in the new dashboard widget now automatically updates after viewing an announcement, without requiring a manual refresh.

Changes

  • DiscussionDetailsWebViewFragment: when stopping, broadcasts COURSE_THING_CHANGED with RELOAD_ANNOUNCEMENTS = true for the course if the displayed topic is an announcement
  • CoursesWidgetViewModel: new reloadCourseAnnouncements() branch in somethingChangedReceiver — re-fetches all pages of announcements for the affected course and updates the widget UI state
  • New LoadCourseAnnouncementsUseCase wrapping DashboardCoursesManager.getCourseAnnouncements() with unread filtering

Checklist

  • 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

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

@github-actions
Copy link
Copy Markdown
Contributor

🧪 Unit Test Results

✅ 📱 Student App

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

✅ 🌅 Horizon

  • Tests: 779 total, 0 failed, 0 skipped
  • Duration: 39.921s
  • Success Rate: 100%

✅ 📦 Submodules

  • Tests: 3477 total, 0 failed, 0 skipped
  • Duration: 54.909s
  • Success Rate: 100%

📊 Summary

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

Last updated: Thu, 30 Apr 2026 09:40:17 GMT

@github-actions
Copy link
Copy Markdown
Contributor

📊 Code Coverage Report

✅ Student

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

✅ Teacher

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

✅ Pandautils

  • PR Coverage: 24.15%
  • Master Coverage: 24.10%
  • Delta: +0.06%

📈 Overall Average

  • PR Coverage: 30.62%
  • Master Coverage: 30.60%
  • Delta: +0.02%

@github-actions
Copy link
Copy Markdown
Contributor

Student Install Page

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.

1 participant