Add admin submission view and delete from rankings#194
Open
Add admin submission view and delete from rankings#194
Conversation
Wrap the description and benchmark shapes in a collapsed <details>/<summary> so the leaderboard tabs are immediately visible without scrolling.
bbe9928 to
bb458c4
Compare
Admins can click a submission ID in the rankings list to open a dialog
showing the submitted code, with a two-step delete confirmation. The
delete proxies through kernelbot's existing DELETE /admin/submissions/{id}
endpoint using the shared ADMIN_TOKEN (Bearer auth).
bb458c4 to
f23a274
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
DELETE /admin/submissions/{id}endpoint usingADMIN_TOKEN(Bearer auth)Changes
kernelboard/api/submission.py): NewDELETE /api/submission/<id>with admin whitelist check + proxy to kernelbotkernelboard/lib/env.py): RegisterADMIN_TOKENas optional env varapi.ts): NewdeleteSubmission()functionRankingLists.tsx): Clickable submission ID → dialog with CodeBlock + delete flowLeaderboard.tsx): PassesonRefreshcallback to re-fetch rankings after deleteNo kernelbot changes needed
Kernelbot already has
DELETE /admin/submissions/{id}with Bearer token auth. Kernelboard just needs the sameADMIN_TOKENenv var to call it.Deployment
Set
ADMIN_TOKENenv var on kernelboard (same value as kernelbot'sADMIN_TOKEN).Test plan