Skip to content

feat: add submission notification #3018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cubercsl
Copy link
Contributor

@cubercsl cubercsl commented Jul 5, 2025

Related to #2252, just for a POC now.

Lack of testing, and I'm not sure how much impact such a query would have on performance when there are a large number of teams polling for updates.

->setParameter('team', $team)
->andWhere('s.submittime < c.endtime')
->andWhere('j.valid = 1')
->andWhere('j.seen = 0');
Copy link
Member

Choose a reason for hiding this comment

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

is there a migration missing? seen doesn't exist yet, does it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#[ORM\Column(options: ['comment' => 'Whether the team has seen this judging', 'default' => 0])]
#[Serializer\Exclude]
private bool $seen = false;

But this may not be important, because the logic of whether to send notifications does not look at this field, (which is at sendNotification @ domjudge.js)

Copy link
Contributor Author

@cubercsl cubercsl Jul 6, 2025

Choose a reason for hiding this comment

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

BTW, this SQL query is the same as the one a user access /api/contests/:cid/judgements, except it filters out entries they have ever seen (it will be marked as seen when they click the submission).

Therefore, it is also feasible to implement it directly on the frontend js instead of adding a function to the /update endpoint.

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