Skip to content

Allow admins to edit their vote after submitting a review #170

Description

@balebbae

Admins can only cast a vote once through the grading flow. Once a vote is submitted the review moves to the Completed tab and there is no way to change it, so a misclick or a second look at an application leaves the vote stuck.

Goal

Let an admin re-open and edit a review they have already voted on — vote, travel vote, and notes.

Notes

  • The backend already allows it: PUT /v1/admin/reviews/{reviewID} (submitVote in cmd/api/reviews.go → ApplicationReviewsStore.SubmitVote) updates by review ID + admin ID with no vote IS NULL guard, so re-submitting overwrites the existing vote and bumps reviewed_at. Confirm that's intentional and that nothing downstream (review stats, decision emails) assumes a vote is final.
  • The gap is mostly frontend, in client/portal/src/pages/admin/reviews/: the Completed tab (components/ReviewsTable.tsx) needs an edit affordance that opens the grading panel (grading/GradingPage.tsx / GradingVotingPanel.tsx) prefilled with the existing vote, travel vote, and notes.
  • Only the admin who owns the review may edit it — already enforced by the admin_id scope on the update, but the UI should not offer editing on someone else's review.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestfrontendReact/TypeScript client work

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions