Scores missing from player pages after game ends
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.
@rewtd , take a look at this
Perhaps players should simply be routed to the game page at the end?
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
- add score table on player page too & not redirect anything
- always redirects the player page to the game page once the game ends making the player page unaccessible anymore
As the player page no longer has any value once the game as ended I think we go with option 2.
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
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.