Allow hidden users to see their own emojis and scoreboard placement #950
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
Currently, hidden users cannot see their own emojis and scoreboard placement, which is inconsistent with the fact that they can view their own profile. This creates a poor user experience where hidden users lose visibility into their own achievements.
Solution
This PR makes minimal changes (7 lines total) to allow hidden users to see their own data while maintaining their invisibility to other users.
Changes Made
1. Modified emoji visibility filter (
dojo_plugin/utils/awards.py)Updated
get_viewable_emojis()to include the current user's emojis even if they are hidden:2. Enhanced scoreboard to show hidden user's own placement (
dojo_plugin/api/v1/scoreboard.py)get_scoreboard_page()to remove the restriction preventing hidden users from seeing their "me" entryThis allows hidden users to see their rank, solve count, and badges in the scoreboard while remaining absent from the public standings.
Behavior
Hidden users can now see:
Privacy maintained:
Implementation Notes
Fixes issue where hidden users couldn't see their own achievements, making the hidden status feel like a punishment rather than a privacy feature.
Fixes #938
Original prompt
Fixes #938
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.