cornucopia icon indicating copy to clipboard operation
cornucopia copied to clipboard

Scores missing from player pages after game ends

Open khushal-winner opened this issue 8 months ago • 6 comments

Describe the bug
when game ends Scores are only visible on the game page (/games/:id), not on individual player pages (/games/:id/players/:player_id). Players cannot see scores (their own or others') from their personal view.

Expected behavior
Scores (individual + total, possibly leaderboard/ranking) should be shown on player-specific pages so each player can view results without leaving their view.

Video Demo

https://github.com/user-attachments/assets/82b34c10-8088-420b-aa92-ecbbcf7b56dd

https://github.com/user-attachments/assets/7f45901c-2066-463c-92b6-8a1310104417

Desktop

  • OS: any
  • Browser: any
  • Version: any

Additional context
The game ends with finished_at set and scores calculated (card majority + highest card bonus), but they're hidden from player routes. This limits visibility during/after play — players must know/use the top-level game URL to see results, which feels inconsistent for a multi-player experience. Adding score display (at least own score) to player LiveView would improve usability.

khushal-winner avatar Mar 06 '26 10:03 khushal-winner

@rewtd , take a look at this

khushal-winner avatar Mar 06 '26 10:03 khushal-winner

Perhaps players should simply be routed to the game page at the end?

rewtd avatar Mar 06 '26 12:03 rewtd

Perhaps players should simply be routed to the game page at the end?

@rewtd , if we redirect to the game page when game ends but when the player tries to access his own player page again (https://copi.owasp.org/games/:game_id/players/:player_id) it should also shows the score report.

we can do one of these

  1. add score table on player page too & not redirect anything
  2. always redirects the player page to the game page once the game ends making the player page unaccessible anymore

khushal-winner avatar Mar 06 '26 12:03 khushal-winner

As the player page no longer has any value once the game as ended I think we go with option 2.

rewtd avatar Mar 06 '26 13:03 rewtd

As the player page no longer has any value once the game as ended I think we go with option 2.

@rewtd , sure assign me i'll fix it

khushal-winner avatar Mar 06 '26 14:03 khushal-winner

I think we go with the approach where the user have a link they can click that takes them to the game's overview since that has already been implemented.

sydseter avatar Mar 19 '26 14:03 sydseter