1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-15 02:17:46 +08:00
Commit Graph

3166 Commits

Author SHA1 Message Date
Dean Herbert
87a331fdde
Improve text on external link warning dialog 2024-05-31 02:44:45 +09:00
Dean Herbert
f3bc944ac8
Remove using statement 2024-05-30 17:45:32 +09:00
Dean Herbert
36d7775032
Fix typo in IAPIProvider xmldoc 2024-05-30 17:38:05 +09:00
Dean Herbert
2f2bc8e52e
Avoid ChatAckRequest failures flooding console in OsuGameTestScenes 2024-05-30 17:37:55 +09:00
Bartłomiej Dach
ab01fa6d45
Add xmldoc to APIAccess.APIVersion 2024-05-29 14:10:07 +02:00
Bartłomiej Dach
cc13655617
Derive API response version from game version
(Or local date, in the case of non-deployed builds).

Came up when I was looking at https://github.com/ppy/osu-web/pull/11240
and found that we were still hardcoding this.

Thankfully, this *should not* cause issues, since there don't seem to be
any (documented or undocumented) API response version checks for
versions newer than 20220705 in osu-web master.

For clarity and possible debugging needs, the API response version is
also logged.
2024-05-29 14:10:01 +02:00
Dean Herbert
740a3377fa
Merge branch 'master' into LeaderBoardScore_clean 2024-05-27 17:18:41 +09:00
Salman Ahmed
2c18c10ac8 Move to SelectV2 namespace 2024-05-25 17:20:10 +03:00
Salman Ahmed
d395c85418 Adjust right content width based on scoring mode 2024-05-25 17:16:41 +03:00
Salman Ahmed
5955378004 Replace "X mods" text with a pill indicator 2024-05-25 16:11:24 +03:00
Salman Ahmed
35af518fdb Remove expanded/contracted states and limit to 5 mods
Also adjusts right content width to contain those 5 mods. Not sure how to handle the extra space in the score though...to be dealt with later.
2024-05-25 12:52:48 +03:00
Bartłomiej Dach
61a415fed2
Add client/server models & operations for "daily challenge" feature 2024-05-17 10:58:08 +02:00
Joseph Madamba
9b84d8ac2f Apply missed changes from old leaderboard score
See:
- d11e56b8bb
- 7d74d84e6c
- 07f9f5c6d8
2024-05-12 22:39:22 -07:00
Joseph Madamba
736e15ab26 Improve fluidity states 2024-05-12 22:21:50 -07:00
Joseph Madamba
e8967ff3c5 Lower username font size a bit 2024-05-10 22:14:41 -07:00
Joseph Madamba
8a474f7d22 Fix broken avatar masking when hiding 2024-05-10 22:14:41 -07:00
Joseph Madamba
d0c8b55a0a Fix fluidity desync by not autosizing right (total score) content 2024-05-10 22:14:41 -07:00
Bartłomiej Dach
c9414da5d4
Merge branch 'master' into pre-mod-multiplier-score 2024-05-08 13:39:44 +02:00
Bartłomiej Dach
7d31af6f16
Fix room status not updating when password is changed while inside the room 2024-05-03 11:37:09 +02:00
Bartłomiej Dach
221b4cd599
Remove unused cache 2024-05-03 11:37:09 +02:00
Dean Herbert
7141177966
Better signify private rooms by showing a different status pill design 2024-05-03 17:17:35 +08:00
Dean Herbert
42e49067e5
Move Room.Status updates to a common location 2024-05-03 17:10:59 +08:00
Joseph Madamba
2d4f2245ee Remove total score border gradient 2024-05-02 23:00:04 -07:00
Joseph Madamba
32df6991ad Remove dark border and update cover gradient 2024-04-28 23:12:55 -07:00
Joseph Madamba
4c4621eb58 Fix compile errors 2024-04-28 23:12:48 -07:00
Dean Herbert
c900c0c01c
Merge branch 'master' into LeaderBoardScore_clean 2024-04-28 13:51:29 +08:00
Bartłomiej Dach
e11e9fe14f
Add TotalScoreWithoutMods to SoloScoreInfo
End goal being storing it server-side.
2024-04-17 09:15:51 +02:00
Dan Balasescu
b5adcf2e0e
Fix SpectatorClient holding references to Player 2024-04-03 17:32:02 +09:00
Dean Herbert
9474156df4
Improve equality implementations 2024-03-26 20:21:12 +08:00
Dean Herbert
057f86dd14
Add handling of expiration 2024-03-25 14:31:05 +08:00
Dean Herbert
f0614928b1
Read from new location 2024-03-25 13:19:12 +08:00
Dean Herbert
ec4a9a5fdd
Make work again for simple case 2024-03-24 14:55:45 +08:00
Dean Herbert
ef2a16dd8f
Various renaming and class updates to allow multiple menu banners 2024-03-24 14:55:43 +08:00
Bartłomiej Dach
f30dfcb728
Fix ruleset medals not displaying due to deserialisation failure
🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦🤦

Reported in
https://discord.com/channels/188630481301012481/188630652340404224/1216812697589518386.
2024-03-11 21:34:10 +01:00
Dean Herbert
29a37e3585
Merge pull request #27491 from bdach/f-rank-appearance
Update F rank badge colours to match latest designs
2024-03-06 18:55:20 +08:00
Dean Herbert
85364d25dc
Merge pull request #27276 from bdach/medals
Add flow for displaying achieved medals
2024-03-06 12:31:55 +08:00
Berkan Diler
6fabbe2616 Use new ToDictionary() overload without delegates 2024-03-05 10:27:12 +01:00
Bartłomiej Dach
6080c14dd5
Update F rank badge colours to match latest designs 2024-03-04 14:47:49 +01:00
Salman Ahmed
8f97f0503f Move away from Solo namespace 2024-02-29 01:21:17 +03:00
Dean Herbert
fe59a3b9be
Merge branch 'master' into medals 2024-02-26 22:49:55 +08:00
Bartłomiej Dach
eac4c5f69d
Rename {Solo -> User}StatisticsWatcher et al.
The "solo" prefix is a bit unbecoming now. The updates are not only
for solo.
2024-02-22 20:36:24 +01:00
Bartłomiej Dach
57bb0b85a1
Merge pull request #27107 from Joehuu/rank-highest-tooltip
Add highest rank tooltip to global rank display
2024-02-22 09:08:22 +01:00
Bartłomiej Dach
48bf9680e1
Add new structures for receiving new medal data 2024-02-20 16:31:31 +01:00
Bartłomiej Dach
4a314a8e31
Namespacify data structures used in websocket communications 2024-02-20 16:31:31 +01:00
Dean Herbert
71afb8881a
Merge pull request #27199 from EVAST9919/link-compiler-alloc
Fix `DrawableLinkCompiler` allocations
2024-02-18 04:04:34 +08:00
Andrei Zavatski
b0f334c39e Fix DrawableLinkCompiler allocations 2024-02-17 00:45:30 +03:00
Bartłomiej Dach
1049be7d72
Add extended xmldoc to DisconnectRequested()
Just expounds on what the previous commit message said.
2024-02-16 13:09:36 +01:00
Bartłomiej Dach
b4aa247032
Do not attempt to stop watching user presence when requested to disconnect
First of all, this sort of cleanup isn't really the client's
responsibility, and secondly, at the point the client received this
request to disconnect, *none of its requests will be honored anymore*
(currently the only scenario of this if another client has connected
- the server-side concurrency filter will reject this request).

When disconnection is requested, the only valid thing to do with respect
to talking to the server is to stop doing it.

This will be moved server-side in a follow-up change, although I'm not
even strictly sure that's required - I'd like to think signalr would
know to clean up a disconnecting client from all groups they were in.
2024-02-16 13:08:39 +01:00
Bartłomiej Dach
9fa60b169e
Actually disconnect from metadata hub when requested to
Nothing in this override, on in the base implementation, would actually
attempt to disconnect.
2024-02-16 12:58:50 +01:00
Bartłomiej Dach
171270d99c
Fix missing RPC method mapping
Thanks, signalr.
2024-02-16 12:58:13 +01:00
Dean Herbert
59efd22ba2
Merge branch 'master' into score-statistics-updates-working-2 2024-02-15 02:55:12 +08:00
Bartłomiej Dach
68247fa022
Fix typo in json property name
Would cause the mapper badge to never actually be shown in the real
world.
2024-02-14 13:21:37 +01:00
Salman Ahmed
c4e358044a Add API models for comment page metadata 2024-02-14 04:16:36 +03:00
Bartłomiej Dach
da4ebd0681
Refactor SoloStatisticsWatcher to no longer require explicit subscription callbacks 2024-02-13 13:49:01 +01:00
Dean Herbert
f7a223f328
Merge pull request #27053 from frenzibyte/unranked-pp-placeholder
Add support for displaying "unranked PP" placeholder
2024-02-13 18:59:55 +08:00
Bartłomiej Dach
4a516cbccd
Merge pull request #27077 from peppy/log-fire-and-forget-better
Improve exception logging of unobserved exceptions via `FireAndForget`
2024-02-10 13:43:50 +01:00
Dan Balasescu
bfeb90c1b6
Add additional gameplay metadata to room score request 2024-02-10 17:20:17 +09:00
Joseph Madamba
c9c39ecb2f Add RankHighest to APIUser 2024-02-09 16:06:16 -08:00
Dan Balasescu
7f3646f2d1
Merge pull request #27069 from bdach/populate-legacy-total-score-when-converting
Populate `TotalScoreInfo` when converting `SoloScoreInfo` to `ScoreInfo`
2024-02-08 01:33:31 +09:00
Dean Herbert
0d7e82ab8d
Improve exception logging of unobserved exceptions via FireAndForget
Coming from https://github.com/ppy/osu/issues/27076, where the log
output makes finding where the exception arrived for nigh impossible.
2024-02-08 00:25:11 +08:00
Bartłomiej Dach
9314de640f
Populate TotalScoreInfo when converting SoloScoreInfo to ScoreInfo
For use in https://github.com/ppy/osu-tools/pull/195.
2024-02-06 18:30:48 +01:00
Bartłomiej Dach
6ffe8e1713
Use staggered exponential backoff when retrying in PersistentEndpointClientConnector
There are suspicions that the straight 5s retry could have caused a
situation a few days ago for `osu-server-spectator` wherein it was
getting hammered by constant retry requests. This should make that
a little less likely to happen.

Numbers chosen are arbitrary, but mostly follow stable's bancho retry
intervals because why not. Stable also skips the exponential backoff in
case of errors it considers transient, but I decided not to bother for
now.

Starts off from 3 seconds, then ramps up to up to 2 minutes. Added
stagger factor is 25% of duration, either direction. The stagger factor
helps given that if spectator server is dead, each client has three
separate connections to it which it will retry on (one to each hub).
2024-02-06 15:40:30 +01:00
Salman Ahmed
4be4ed7ab2 Add "ranked" attribute to scores 2024-02-05 23:29:24 +03:00
Dan Balasescu
8e8ba9e77f
Fix more CI inspections 2024-02-02 21:36:41 +09:00
Dan Balasescu
b44f77cee1
Update R# + fix inspections 2024-02-02 21:00:28 +09:00
Dean Herbert
4248593289
Fix menu banner not updating as often as we want it to 2024-01-31 22:44:24 +09:00
Dean Herbert
19fe3a15f3
Merge branch 'master' into 2fa-not-verifying-via-link 2024-01-31 18:32:55 +09:00
Bartłomiej Dach
4126dcbe28
Fix 2FA verification via link not working correctly
Closes https://github.com/ppy/osu/issues/26835.

I must have not re-tested this correctly after all the refactors...

Basically the issue is that the websocket connection would only come
online when the API state changed to full `Online`. In particular
the connector would not attempt to connect when the API state was
`RequiresSecondFactorAuth`, giving the link-based flow no chance to
actually work.

The change in `WebSocketNotificationsClientConnector` is relevant in
that queueing requests does nothing before the API state changes to full
`Online`. It also cleans up things a bit code-wise so... win?

And yes, this means that the _other_ `PersistentEndpointClientConnector`
implementations (i.e. SignalR connectors) will also come online earlier
after this. Based on previous discussions
(https://github.com/ppy/osu/pull/25480#discussion_r1395566545) I think
this is fine, but if it is _not_ fine, then it can be fixed by exposing
a virtual that lets a connector to decide when to come alive, I guess.
2024-01-30 21:49:06 +01:00
Bartłomiej Dach
000ddc14ac
Fix broken locking in OAuth
Closes https://github.com/ppy/osu/issues/26824... I think?

Can be reproduced via something like

diff --git a/osu.Game/Online/API/OAuth.cs b/osu.Game/Online/API/OAuth.cs
index 485274f349..e6e93ab4c7 100644
--- a/osu.Game/Online/API/OAuth.cs
+++ b/osu.Game/Online/API/OAuth.cs
@@ -151,6 +151,11 @@ internal string RequestAccessToken()
         {
             if (!ensureAccessToken()) return null;

+            for (int i = 0; i < 10000; ++i)
+            {
+                _ = Token.Value.AccessToken;
+            }
+
             return Token.Value.AccessToken;
         }

The cause is `SecondFactorAuthForm` calling `Logout()`, which calls
`OAuth.Clear()`, _while_ the `APIAccess` connect loop is checking if
`authentication.HasValidAccessToken` is true, which happens to
internally check `Token.Value.AccessToken`, which the clearing of
tokens can brutally interrupt.
2024-01-30 21:05:23 +01:00
Dean Herbert
d895a91cd5
Update endpoints to final production endpoints 2024-01-30 18:40:17 +09:00
Bartłomiej Dach
996ae0ecc1
Fix incorrect handling of StartChatRequest in websocket chat client
Fixes this happening on staging:

	[network] 2024-01-29 17:48:24 [verbose]: WebSocketNotificationsClientConnector connected!
	[network] 2024-01-29 17:48:24 [verbose]: WebSocketNotificationsClientConnector connect attempt failed: Can't use WaitSafely from inside an async operation.

I'm not sure how I ever allowed that `.WaitSafely()` to be there. It
did feel rather dangerous but then I must have forgotten and never
noticed it failing. Which is weird because you'd think that would be
caught by testing that chat isn't working but I'm pretty sure that I
tested that chat *was* indeed working.

Anyway now that entire flow is replaced by something that should
hopefully be somewhat more sane? It has a whole retry flow with logging
now which should be more robust than what was there previously (failing
to start to listen to chat events killing the entire websocket
connection for very little good reason).
2024-01-29 19:22:40 +01:00
Dean Herbert
6a469f2cb6
Use switch instead of if-else 2024-01-29 17:18:17 +09:00
Bartłomiej Dach
96811a8874
Fix APIAccess spamming requests while waiting for second factor 2024-01-29 09:14:30 +01:00
Bartłomiej Dach
363fd1d54f
Remove no longer relevant changes 2024-01-29 09:05:03 +01:00
Dean Herbert
4a2602a775
Merge branch 'master' into 2fa 2024-01-29 16:57:29 +09:00
Dean Herbert
ef94eff574
Rename PollingChatClientConnector to better describe usage 2024-01-29 16:56:28 +09:00
Bartłomiej Dach
a2e69d37e8
Add basic testing of failure flow 2024-01-26 11:17:32 +01:00
Bartłomiej Dach
04cae874b0
Handle forced logouts due to password change too 2024-01-26 10:53:27 +01:00
Bartłomiej Dach
3d3506b906
Merge branch 'decouple-notification-websocket-from-chat' into 2fa 2024-01-25 14:51:42 +01:00
Bartłomiej Dach
c463aa5ba1
xmldoc everything 2024-01-25 14:47:29 +01:00
Bartłomiej Dach
de52f0a80c
Decouple notifications websocket handling from chat operations
This is a prerequisite for https://github.com/ppy/osu/pull/25480.

The `WebSocketNotificationsClient` was tightly coupled to chat specifics
making it difficult to use in the second factor verification flow.
This commit's goal is to separate the websocket connection and message
handling concerns from specific chat logic concerns.
2024-01-25 14:47:29 +01:00
Bartłomiej Dach
e3eb7a8b42
Support verification via clicking link from e-mail 2024-01-24 21:35:58 +01:00
Bartłomiej Dach
62a0c236bc
Split out raw websocket logic from conjoined notifications client contrivance 2024-01-24 21:35:30 +01:00
Bartłomiej Dach
445a7450e0
Implement verification from within client 2024-01-24 21:35:20 +01:00
Bartłomiej Dach
ddc2bbeb9b
Add session_verified attribute to /me response 2024-01-24 14:24:33 +01:00
Bartłomiej Dach
7b47215657
Split /me request from /users requests
Them being together always bothered me and led to the abject failure
that is `APIUser` and its sprawl. Now that I'm about to add a flag that
is unique to `/me` for verification purposes, I'm not repeating the
errors of the past by adding yet another flag to `APIUser` that is never
present outside of a single usage context.
2024-01-24 14:22:57 +01:00
Bartłomiej Dach
7c140408ea
Add request structures for verification endpoints 2024-01-24 13:53:40 +01:00
Bartłomiej Dach
2cfaa1c103
Merge branch 'master' into 2fa 2024-01-23 16:51:23 +01:00
Dean Herbert
069af13aaf
Reduce enumerator overhead in GameplayLeaderboard 2024-01-23 05:31:53 +09:00
Joseph Madamba
3eeefd5b7e Fix changelog stream user count only accounting for latest build 2024-01-18 16:15:52 -08:00
Andrei Zavatski
dfdf700560 Don't use glowing text in ScoreComponentLabel 2024-01-16 17:43:17 +03:00
Dean Herbert
ee26329353
Fix some elements not showing on leaderboard scores when almost off-screen 2024-01-16 16:44:50 +09:00
Dean Herbert
a3b63391fa
Merge pull request #26356 from stanriders/global-user-statistics
Add `Statistics` bindable to `IAPIProvider` and update it from `SoloStatisticsWatcher`
2024-01-15 18:43:35 +09:00
Dean Herbert
d3710f0bfd
Remove scores from song select leaderboard when leaving the screen 2024-01-06 20:53:20 +09:00
wooster0
cf5f0a2bdc Make chat commands case-insensitive
Would be nice if I accidentally have caps lock enabled and write "/HELP" it still works.
2024-01-04 15:06:10 +09:00
StanR
e240443c46 Update LocalUser statistics, add test 2024-01-03 18:15:32 +06:00
StanR
d34f30f6ad Add Statistics bindable to IAPIProvider and update it from SoloStatisticsWatcher 2024-01-03 14:37:57 +06:00
Bartłomiej Dach
09b2a4e3b4
Fix users blipping online briefly before their online status is known 2024-01-02 14:07:59 +01:00
Bartłomiej Dach
f9f03ebc0f
Store user online state in config for next launch
Closes remainder of https://github.com/ppy/osu/issues/12635.
2024-01-02 14:04:40 +01:00
Dean Herbert
93a8afe96e
Add very simple cache-busting (30 minutes) 2023-12-28 14:40:10 +09:00