Conversation
What was broken Group-restricted review opportunities remained missing for admins and eligible group members even after the earlier fix began forwarding bearer tokens. A restricted result already loaded for one caller could also remain cached after the caller logged out. Root cause Community app authentication is populated asynchronously. The Open for Review bucket could therefore complete its first request anonymously before tokenV3 arrived. The review-opportunity rows and all-loaded pagination flag were never invalidated when authentication changed, so the authenticated request was not made and the anonymous result set stayed on screen. What was changed - Added a focused action and reducer path that clears only review-opportunity rows, pagination, loading, and completion state. - Clear that caller-specific cache whenever tokenV3 changes. - Immediately reload page zero with the current token when Open for Review is active; inactive buckets remain lazy-loaded. Any added/updated tests - Added lifecycle coverage for delayed authentication, logout, and auth changes while another bucket is active. - Added reducer coverage proving the review-opportunity cache resets without changing other challenge buckets. - Verified the full test suite, lint, and production build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was broken
The earlier PM-5895 fix forwarded the current bearer token to review-opportunity listing and detail requests. QA then created a challenge in the Hide Challenges group and found that its open review opportunity was still absent for both admins and members of that group.
A caller-specific restricted result could also remain in the Redux cache after logout.
Root cause
Community app authentication is refreshed asynchronously after the challenge listing mounts. The Open for Review waypoint could finish its first request before tokenV3 arrived, which made that request anonymous even though the prior implementation was capable of forwarding a token.
The review-opportunity cache and its allReviewOpportunitiesLoaded flag were not invalidated when tokenV3 changed. Once the anonymous request completed, the bucket therefore had no reason to request page zero again for the authenticated admin or group member.
The dev API was also rechecked: authenticated access returns the grouped opportunities that anonymous access removes, and the QA example user is present in the Hide Challenges group. No review-api change is required.
What was changed
Any added/updated tests