-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Ensure scores are re-fetched with correct criteria on re-entering song select #34450
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
Merged
Conversation
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
…g select Closes ppy#34445. The primary issue is that song select is the only one that supports non-score sort mode, and therefore if any other component changes the sort mode in a way opaque to song select to score, then song select will lose the sort mode because it's using the global leaderboard manager's state which will contain scores sorted by total. Notably, the bug this is fixing requires specific circumstances. For instance, it is not enough to just *start gameplay* for the bug to manifest, because starting gameplay causes a working beatmap refetch: https://github.com/ppy/osu/blob/4b73afd1957a9161e2956fc4191c8114d9958372/osu.Game/Screens/SelectV2/SongSelect.cs#L456-L457 which will trigger a *delayed schedule refetch* of the scores: https://github.com/ppy/osu/blob/d2d3d14f1572ff8fc68fd01ea43c2ef68b5882fa/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs#L235-L253 and because the refetch is thusly delayed, there's a very high chance it *will not run before the screen is resumed* because the wedge will not have its scheduler run until that point in time. This conundrum is also because there is no test coverage for this, because the above makes test coverage setup rather annoying.
This is borderline pedantic and mostly irrelevant but I think it makes some sense for a bit of extra safety. It definitely does not fix any bugs (that I'm aware of).
9c98ea6 to
7a263ef
Compare
peppy
reviewed
Aug 1, 2025
|
|
||
| public void Refresh() | ||
| { | ||
| if (currentContent is BeatmapLeaderboardWedge leaderboardWedge) |
Member
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.
I guess this is okay for now. (rationale: we don't need to queue this because it always refreshes on mode change).
peppy
approved these changes
Aug 1, 2025
This was referenced Aug 27, 2025
This was referenced Sep 5, 2025
This was referenced Oct 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Closes #34445.
The primary issue is that song select is the only one that supports non-score sort mode, and therefore if any other component changes the sort mode in a way opaque to song select to score, then song select will lose the sort mode because it's using the global leaderboard manager's state which will contain scores sorted by total.
Notably, the bug this is fixing requires specific circumstances. For instance, getting the bug to present requires going through the results screen; it is not enough to just start gameplay for the bug to manifest, because starting gameplay causes a working beatmap refetch:
osu/osu.Game/Screens/SelectV2/SongSelect.cs
Lines 456 to 457 in 4b73afd
which will trigger a delayed schedule refetch of the scores:
osu/osu.Game/Screens/SelectV2/BeatmapLeaderboardWedge.cs
Lines 235 to 253 in d2d3d14
and because the refetch is thusly delayed, there's a very high chance it will not run before the screen is resumed because the wedge will not have its scheduler run until that point in time.
This conundrum is also why there is no test coverage for this, because the above makes test coverage setup rather annoying.