Skip to content

Suspend users and admin DNF toggle - #133

Merged
bohdancho merged 3 commits into
mainfrom
dev
Sep 28, 2026
Merged

bohdancho merged 3 commits into
mainfrom
dev

Conversation

@bohdancho

@bohdancho bohdancho commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Admins can suspend/unsuspend users from /dev; suspended users are blocked from round-session actions at the API level and see a non-dismissible dialog telling them to reach out on Discord/email.
  • Admins can DNF/un-DNF a solve by id from /dev. Toggling keeps the recorded time (reversible); un-DNFing a solve with no time is rejected. Recomputes the round session's cached avg/isDnf when a submitted solve's status changes.
  • Fixes bySingle leaderboard ordering to sort by isDnf before timeMs (previously relied on implicit NULLS LAST, which broke once a DNF'd solve can keep a non-null timeMs).

Test plan

  • bun run format:check
  • bun run lint:check
  • bun run type:check

Risk

Low — new admin-only endpoints plus one leaderboard query ordering fix.

Related

N/A

🤖 Generated with Claude Code

bohdancho and others added 3 commits September 28, 2026 12:58
Admins can suspend/unsuspend users from the /dev page. Suspended users
are blocked from all round-session actions at the API level and see a
non-dismissible dialog on the site telling them to reach out on
Discord or by email.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Toggling DNF keeps the recorded time so the change stays reversible;
un-DNFing a solve with no time is rejected. Recomputes the round
session's cached avg/isDnf when a submitted solve's status changes.

Also fixes bySingle leaderboard ordering to sort by isDnf before
timeMs, matching personal-record/global-record — previously relied on
implicit NULLS LAST which no longer holds now that a DNF'd solve can
keep a non-null timeMs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@bohdancho
bohdancho merged commit cf0cf50 into main Sep 28, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
staging — 0357b808 Deployed Sep 28, 2026 by bohdancho via CD #666
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.

1 participant