Skip to content
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

Failed solo score handling needs reconsidering with respect to stored score rank #10524

Closed
bdach opened this issue Sep 6, 2023 · 6 comments · Fixed by #10865
Closed

Failed solo score handling needs reconsidering with respect to stored score rank #10524

bdach opened this issue Sep 6, 2023 · 6 comments · Fixed by #10865
Labels
area:scoring priority:1 Very important. Feels bad without fix. Affects the majority of users.

Comments

@bdach
Copy link
Contributor

bdach commented Sep 6, 2023

Back in the olden days, when client would submit a failed play, it would set D rank, because we didn't have F rank client-side yet.

Since ppy/osu#18785, we now have an F rank client-side. But this logic still lives:

// this should potentially just be validation rather than applying this logic here, but
// older lazer builds potentially submit incorrect details here (and we still want to
// accept their scores.
if (!$score->data->passed) {
$score->data->rank = 'D';
}

and overwrites the F rank sent by client to D again.

You would say that, well, no biggie, just do this:

diff --git a/app/Models/Solo/Score.php b/app/Models/Solo/Score.php
index 875ade1318..284aff7c04 100644
--- a/app/Models/Solo/Score.php
+++ b/app/Models/Solo/Score.php
@@ -60,7 +60,7 @@ class Score extends Model implements Traits\ReportableInterface, Traits\SoloScor
         // older lazer builds potentially submit incorrect details here (and we still want to
         // accept their scores.
         if (!$score->data->passed) {
-            $score->data->rank = 'D';
+            $score->data->rank = 'F';
         }
 
         $score->saveOrExplode();

which, sure, fixes that immediate part of it, but then you attempt to go to /scores/{score_id} web-side and see this:

1693994564

Note missing rank letter, note rank badges on the left all lit up. So that is at least one place that is not ready web-side to handle an F rank. Maybe there are more.

I guess the things to discuss here are:

  • Should failed scores be even displayable via /scores/{score_id}?
  • Maybe something to do with the preserve flag makes this issue go away?
  • If not, does this need design? Which other places may need to handle an F rank?
@cl8n
Copy link
Member

cl8n commented Sep 11, 2023

setting these to F rank seems correct in context of legacy scores doing the same thing. F ranks are already returned over the API, but yeah none have been displayed via web frontend so far due to high tables not including fails, non-high fails being filtered out before display on user profile, and game_scores not having a rank display on the legacy matches page.

these are the only frontend issues with displaying F ranks, as far as I can tell (and this is assuming failed scores could make it into these responses to begin with). both seem straightforward to fix:

  • score page tower and dial have undefined behavior, screenshotted above
  • there is no score-rank icon for F, which various components on user profile and beatmap info pages rely on

Should failed scores be even displayable via /scores/{score_id}?

if I haven't missed something that would make it more difficult to support, I don't see why not.

@peppy
Copy link
Member

peppy commented Sep 12, 2023

if I haven't missed something that would make it more difficult to support, I don't see why not.

One very valid (IMO) reason not to would be that these scores are not permanently stored. So the link could (and will) become a 404 at any point.

@nanaya
Copy link
Collaborator

nanaya commented Sep 12, 2023

Well, nor would any other scores if the user created higher score with same mod etc set?

@peppy
Copy link
Member

peppy commented Sep 12, 2023

Sure, but this is a much more common case.

Maybe it's fine with a message mentioning that it will not be a permanent URL?

@bdach
Copy link
Contributor Author

bdach commented Oct 2, 2023

So I guess options are:

  • update snippet from the OP to set F rank, but explicitly disallow showing failed scores anywhere on the website
  • update snippet from the OP to set F rank, update designs to include F rank, possibly with a disclaimer that the score page for a failed play can go away at any time

Note that we could do with a proper design for F rank, since we already show that in client, but there it's currently just the D rank badge but just with the letter swapped. So if we had something more proper we could show that in both places.

Thoughts on which one would be better/worse, more/less work?

@peppy peppy added the priority:1 Very important. Feels bad without fix. Affects the majority of users. label Dec 21, 2023
@peppy
Copy link
Member

peppy commented Jan 4, 2024

I'd say we want to update the condition here to use "F", not "D". And we should implement the "F" display on the scores page similar to the client, as proposed above.

Should probably be done sooner than later so that multiplayer results screen makes more sense (shows failed players as "F" not "D").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:scoring priority:1 Very important. Feels bad without fix. Affects the majority of users.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants