Skip to content

Comments

feat: add user feedback and leaderboard messages#769

Merged
wakonig merged 1 commit intomainfrom
feature/feedback_messages
Feb 21, 2026
Merged

feat: add user feedback and leaderboard messages#769
wakonig merged 1 commit intomainfrom
feature/feedback_messages

Conversation

@wakonig
Copy link
Member

@wakonig wakonig commented Feb 21, 2026

Adding feedback and leaderboard message types.
The feedback message bypasses the normal messaging service infrastructure and is therefore typed differently.

@wakonig wakonig marked this pull request as ready for review February 21, 2026 14:33
Copilot AI review requested due to automatic review settings February 21, 2026 14:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for user feedback and game leaderboard functionality by introducing three new message types (FeedbackMessage, GameScoreMessage, GameLeaderboardMessage) and their corresponding endpoints. The feedback message is designed to bypass the normal messaging service infrastructure and uses a different message operation (SEND instead of SET_PUBLISH).

Changes:

  • Added FeedbackMessage for collecting user feedback with rating validation (1-5)
  • Added GameScoreMessage and GameLeaderboardMessage for tracking game scores and leaderboards
  • Added three new public endpoints: user_feedback, game_score, and game_leaderboard

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
bec_lib/bec_lib/messages.py Added three new BECMessage subclasses for feedback and game functionality
bec_lib/bec_lib/endpoints.py Added three new public endpoints for feedback and game leaderboard features
Comments suppressed due to low confidence (1)

bec_lib/bec_lib/messages.py:1930

  • The order of parameters in the docstring Args section does not match the order of field definitions in the class. The docstring lists parameters starting with player_name, but the class defines game_name first. Reorder the docstring to match the field definition order: game_name, player_name, score, level, beamline_id, experiment_id, timestamp.
    """
    Message for game scores

    Args:
        player_name (str): Name of the player (self-reported)
        level (str | int | None): Game level, if applicable
        score (float | int): Player's score
        beamline_id (str | None): Beamline name. Filled in automatically on the server side
        experiment_id (str | None): Experiment ID. Filled in automatically on the server side
        timestamp (float): Timestamp of when the score was submitted. Filled in automatically
    """

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

❌ Patch coverage is 82.85714% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
bec_lib/bec_lib/endpoints.py 50.00% 6 Missing ⚠️

📢 Thoughts on this report? Let us know!

@wakonig wakonig force-pushed the feature/feedback_messages branch from 764802f to c612710 Compare February 21, 2026 14:43
Copy link
Contributor

@d-perl d-perl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, is the idea to hook up minesweeper to this leaderboard?

@wakonig
Copy link
Member Author

wakonig commented Feb 21, 2026

Exactly! 😂

@wakonig wakonig merged commit 610030f into main Feb 21, 2026
34 of 35 checks passed
@wakonig wakonig deleted the feature/feedback_messages branch February 21, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants