Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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
cubercsl wants to merge 1 commit into DOMjudge:main
base: main
Choose a base branch
Loading
from cubercsl:feat/submission-notification

Conversation

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.

2018hahazhufeng and Dup4 reacted with thumbs up emoji
->setParameter('team', $team)
->andWhere('s.submittime < c.endtime')
->andWhere('j.valid = 1')
->andWhere('j.seen = 0');
Copy link
Member

@meisterT meisterT Jul 5, 2025

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

@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.

#[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
edited
Loading

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.

@cubercsl cubercsl force-pushed the feat/submission-notification branch 2 times, most recently from d6d9118 to 32b9f38 Compare September 18, 2025 15:21
@cubercsl cubercsl force-pushed the feat/submission-notification branch from 32b9f38 to 44d7fee Compare September 18, 2025 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@meisterT meisterT meisterT left review comments

+1 more reviewer

@Dup4 Dup4 Dup4 approved these changes

Reviewers whose approvals may not affect merge requirements
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /