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

Offline players stay on the online tab at the dashboard #31966

Closed
Ladwick opened this issue Feb 20, 2025 · 6 comments · Fixed by #32352
Closed

Offline players stay on the online tab at the dashboard #31966

Ladwick opened this issue Feb 20, 2025 · 6 comments · Fixed by #32352
Assignees
Labels
area:overlay-dashboard priority:0 Showstopper. Critical to the next release. type:online

Comments

@Ladwick
Copy link

Ladwick commented Feb 20, 2025

Type

Game behaviour

Bug description

As expected from #31524, online changes should be happening in real time, and some are, but some offline players manage to get on the online tab, initially I thought they were left there after they were online and then disconnected but that doesn't seems to be the case, since there were offline players as soon as I started lazer, as seen on the pic (compare the last seen to the running time).

On a side note, people connecting to the game that is not on the online tab already will appear to be online on the offline tab...

Screenshots or videos

Image

Image

Version

2025.220.0

Logs

compressed-logs.zip

@bdach
Copy link
Collaborator

bdach commented Feb 20, 2025

Two immediate things:

  • This display's filtering is based on APIUser.IsOnline which comes from API, is not bindable, and never gets updated:

    case OnlineStatus.Offline:
    return users.Where(u => !u.IsOnline).ToList();
    case OnlineStatus.Online:
    return users.Where(u => u.IsOnline).ToList();

    Moreover, the displayed status is fetched by the panel drawables manually in a way that makes it impossible for the entire list to even access it:

    private void updatePresence()
    {
    UserPresence? presence = metadata?.GetPresence(User.OnlineID);
    UserStatus status = presence?.Status ?? UserStatus.Offline;
    UserActivity? activity = presence?.Activity;

  • "Being online" in the API sense of the word is not "being online" in the spectator server metadata hub sense. You could be online on stable, or on the website. The API property is based on updates to user_lastvisit in DB and an implicit window of "onlineness" is assumed. So even if the first issue is fixed then we'll get mismatches between what the website shows in this view and what the client shows.

This is not a quick fix and I dunno what would be the agreeable way to proceed here. cc @smoogipoo @peppy

@smoogipoo
Copy link
Contributor

Was keenly aware the IsOnline stuff is bad here and here, and will need a lot of massaging.

As for the friends overlay, perhaps we can bind to MetadataClient.FriendPresences instead. The rest, I believe the discussions ended at possibly having the ability to watch individual users in addition to friends/global via the metadata hub, if necessary.

@bdach bdach marked this as a duplicate of #32031 Feb 22, 2025
@peppy
Copy link
Member

peppy commented Feb 26, 2025

We should definitely push in the direction of making online state based on spectator-server, and ignore the osu-web property. I think that property is only useful for things like the web profile display where we want a general idea of the user's current online state (bancho updates it on a schedule when a user is online, for instance).

@peppy peppy added the priority:1 Very important. Feels bad without fix. Affects the majority of users. label Feb 26, 2025
@GAMIS65
Copy link
Contributor

GAMIS65 commented Mar 4, 2025

Because of this, you have to restart your game if you want to spectate or invite a player who comes online after you.

Image

@peppy
Copy link
Member

peppy commented Mar 10, 2025

Bumping to p0 due to #31966 (comment). Sounds like spectator is completely broken due to this.

@peppy peppy added priority:0 Showstopper. Critical to the next release. and removed priority:1 Very important. Feels bad without fix. Affects the majority of users. labels Mar 10, 2025
@smoogipoo smoogipoo self-assigned this Mar 10, 2025
@smoogipoo
Copy link
Contributor

I'll tentatively assign to myself and see if I can get something quick out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:overlay-dashboard priority:0 Showstopper. Critical to the next release. type:online
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants