Skip to content

Add admin GraphQL API for reviewing proposals one at a time - #4868

Draft
EdAbati wants to merge 1 commit into
claude/cfp-review-beta-shellfrom
claude/cfp-review-api
Draft

EdAbati wants to merge 1 commit into
claude/cfp-review-beta-shellfrom
claude/cfp-review-api

Conversation

@EdAbati

@EdAbati EdAbati commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #4867. Part 2 of 3 of the new CFP review pages (beta).

What

Admin GraphQL operations for Focus Mode, in a new api/reviews/ module laid out like api/schedule/:

  • reviewSession(reviewSessionId): score options, best first, and the tags used by the conference's proposals, for the tag filter.
  • reviewProposal(reviewSessionId, proposalId): everything the old review page shows, plus the proposal's tags, the speaker's gender, how many proposals they sent ("2 of 3" when the conference has a limit) and links to their other proposals. Elevator pitch and abstract come back as HTML, rendered with the same markdownify filter as the old page.
  • nextProposalToReview(reviewSessionId, excludeTags, seen): reuses the old page's queue (ProposalsReviewAdapter.get_next_to_review_item_id, fewest scored votes first). Skipped proposals come back once nothing new is left, as today.
  • voteProposal(input): saves or updates the reviewer's vote. Leaving scoreOptionId empty saves "No vote" (Let reviewers abstain on proposals and grants #4864).

Differences from the old review page:

  • Every operation goes through CanReviewSession, the same check as the old review page. /admin/graphql uses the same schema as the public /graphql, so the Django view's access check doesn't cover it.
  • Only the session's own score options are accepted. The old form accepts any session's option.
  • Voting keeps the private comment. The old page clears it on every vote.
  • Cancelled proposals are never returned. The old page opens them by URL.
  • The speaker's country shows. The old page's countryname filter looks up by alpha_2, but our countries helper calls that field code, so the old page always shows it empty. The old page itself is unchanged here.

backend/schema.graphql is regenerated. No database changes.

Testing

  • pytest api/reviews reviews/tests: 123 passed.
  • Refusal is tested for every operation: anonymous, plain user, staff without the permissions, reviewer of another conference, and grant session.
  • Also tested: the proposal payload including a "No vote" from another reviewer, markdown output with a <script> tag removed, cancelled and other-conference proposals not found, skipped proposals coming back, updating a vote while keeping the private comment, a score option from another session being refused, and saving "No vote".

Adds reviewSession, reviewProposal and nextProposalToReview queries
and a voteProposal mutation for the new Focus Mode screen. Every field
checks the same access as the old review page. A vote without a score
option saves "No vote". Votes only accept the session's own score
options, keep the private comment, and cancelled proposals are never
returned. Pitch and abstract are rendered from markdown with the same
filter as the old page.
@EdAbati
EdAbati added this pull request to stack #4870 November 16, 2026 21:40
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pycon Ready Ready Preview Nov 16, 2026 9:43pm UTC

@claude

claude Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Adds admin GraphQL operations (reviewSession, reviewProposal, nextProposalToReview, voteProposal) for one-at-a-time proposal review. Each goes through CanReviewSession.

Minor: next_proposal_to_review calls int() on exclude_tags and seen, and CanReviewSession passes review_session_id straight into filter(id=...). A non-numeric ID raises ValueError, so the client gets a generic internal error instead of a clean refusal or empty result. This only matters if the frontend can send malformed IDs, and it's cheap to guard.

No other issues found.

@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.42857% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.66%. Comparing base (fd76930) to head (9e08286).

Additional details and impacted files
@@                       Coverage Diff                        @@
##           claude/cfp-review-beta-shell    #4868      +/-   ##
================================================================
+ Coverage                         92.61%   92.66%   +0.04%     
================================================================
  Files                               360      367       +7     
  Lines                             10958    11098     +140     
  Branches                            953      959       +6     
================================================================
+ Hits                              10149    10284     +135     
- Misses                              684      689       +5     
  Partials                            125      125              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch was successfully deployed

1 active deployment
Preview — 9e082866 Deployed Nov 16, 2026 by vercel[bot]
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