Skip to content

Conversation

@tamaskozmer
Copy link
Contributor

Fixed an issue where tapping a push notification about a student comment would open SpeedGrader with the first submission instead of the corresponding student's submission.

Changes:

  • Added submissionId parameter handling in SpeedGraderViewModel
  • When submissionIds are empty, fetch all submissions and calculate selectedItem based on the provided submissionId
  • Updated UI state to reflect the correct selected submission
  • Added comprehensive unit tests for the new behavior

Test plan: Since push notifications only work in production, this can be tested using a deep link to open SpeedGrader with a specific submission ID. Verify that the correct student's submission is displayed (not the first one).

refs: MBL-19300
affects: Teacher
release note: Fixed an issue where tapping a push notification about a student comment would open SpeedGrader with the first submission instead of the corresponding student's submission.

Checklist

  • Tested in light mode

…udent submission in SpeedGrader

Fixed an issue where tapping a push notification about a student comment
would open SpeedGrader with the first submission instead of the
corresponding student's submission.

Changes:
- Added submissionId parameter handling in SpeedGraderViewModel
- When submissionIds are empty, fetch all submissions and calculate
  selectedItem based on the provided submissionId
- Updated UI state to reflect the correct selected submission
- Added comprehensive unit tests for the new behavior

Test plan: Since push notifications only work in production, this can be tested using a deep link to open SpeedGrader with a specific submission ID. Verify that the correct student's submission is displayed (not the first one).

refs: MBL-19300
affects: Teacher
release note: Fixed an issue where tapping a push notification about a student comment would open SpeedGrader with the first submission instead of the corresponding student's submission.
@github-actions
Copy link

github-actions bot commented Oct 7, 2025

📊 Code Coverage Report

✅ Student

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

✅ Teacher

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

✅ Pandautils

  • PR Coverage: 22.19%
  • Master Coverage: 22.17%
  • Delta: +0.02%

📈 Overall Average

  • PR Coverage: 29.99%
  • Master Coverage: 29.99%
  • Delta: +0.01%

@inst-danger
Copy link
Contributor

Parent Install Page

@inst-danger
Copy link
Contributor

Teacher Install Page

@inst-danger
Copy link
Contributor

Student Install Page

@kristofnemere kristofnemere requested a review from Copilot October 8, 2025 07:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where tapping push notifications about student comments would incorrectly open SpeedGrader with the first submission instead of the targeted student's submission.

  • Added submissionId parameter handling to calculate the correct selected item index
  • Modified submission loading logic to fetch all submissions when submissionIds is empty and find the correct position
  • Updated UI state initialization to use the calculated selected item index

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
SpeedGraderViewModel.kt Added submissionId parameter handling and logic to calculate correct selectedItem index
SpeedGraderScreen.kt Moved pagerState initialization inside conditional block to use updated selectedItem
SpeedGraderViewModelTest.kt Added comprehensive unit tests for new submission ID routing behavior

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

QA 👍 - We going to check this in production thoroughly

@tamaskozmer tamaskozmer merged commit 1a1aab3 into master Oct 8, 2025
7 checks passed
@tamaskozmer tamaskozmer deleted the MBL-19300-teacher-push-notification-routing branch October 8, 2025 14:38
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.

6 participants