Skip to content

Add Focus Mode to the new CFP review pages - #4869

Draft
EdAbati wants to merge 1 commit into
claude/cfp-review-apifrom
claude/cfp-review-focus-mode
Draft

EdAbati wants to merge 1 commit into
claude/cfp-review-apifrom
claude/cfp-review-focus-mode

Conversation

@EdAbati

@EdAbati EdAbati commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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

What

Focus Mode, the first real screen of My review: reviewers go through proposals one at a time.

  • Proposal: type, level, duration and language badges, with the tags on the right; title with Website and Edit links; elevator pitch, abstract and notes (collapsed). English and Italian versions show when both exist.
  • Votes card: each reviewer's vote as a coloured badge and their comment, with "You" on your own vote. The community ranking per tag sits below.
  • Speaker card: photo, gender and country, bio (cut to 4 lines with "Show more"), links, speaking experience, previous talk, grant status, and proposals sent with links to the others.
  • Vote bar, pinned at the bottom:
    • one button per score option, green for the best to red for the worst, plus "⊘ No vote";
    • comment box, Previous and Skip for now;
    • "Vote and go to the next", which becomes "Update vote" with a "You voted …" note when you've already voted.
    • Picking an option doesn't save it. A toast confirms each save.
  • Hide tags in the header hides proposals with the chosen tags from your queue.
  • Your own proposal shows "This is your proposal. Press No vote."
  • The current proposal and hidden tags are in the URL (?proposal=…&exclude=…), so a link opens the same proposal.
  • Below 1024px the side cards stack under the proposal, collapsed.

Empty states: "You've reviewed everything" with a link to the Shortlist, a message when the session has no score options, and a note when the community ranking hasn't been generated.

Testing

  • pnpm build produces both review-beta-*.html pages. Biome is clean. TypeScript isn't installed in custom_admin, so there's no type check.
  • Checked by hand on seeded data at 1440, 1280 and 900px wide:
    • voting, skipping, going back and changing a vote;
    • saving "No vote" and seeing it in the Votes list and the vote bar;
    • hiding tags until "You've reviewed everything" shows;
    • opening ?proposal=<id> directly;
    • the same vote showing on the old review page.

Reviewers go through proposals one at a time, fewest votes first. The
screen shows the proposal, the speaker, the other reviewers' votes and
the community ranking, with a vote bar pinned at the bottom: one button
per score option plus No vote, a comment, Previous and Skip for now.
The current proposal and hidden tags live in the URL, so a link opens
the same proposal.
@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:45pm UTC

@claude

claude Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Adds Focus Mode to the beta CFP review pages. Reviewers step through proposals one at a time with a vote bar, votes and speaker cards, a tag filter, and URL state.

Issues

  1. Race in fetchNext (focus-mode.tsx). There's no cancellation or ordering guard. Two quick actions, such as double-clicking Skip or voting and then skipping, can start two queries with the same seen. The slower response then overwrites history and position, so a proposal can be dropped from the history or shown twice. The same applies to the initial fetch. Ignore stale results with a request counter, or disable actions while loadingNext is true.
  2. fetchNext has no error handling. If the query throws, loadingNext stays true and the spinner never ends. Wrap it in try/finally and show an error state.
  3. Vote bar state is stale (vote-bar.tsx). choice and comment are initialised once from myVote. ProposalReview uses cache-and-network, so a vote that changes after the first render, such as the network refresh after a cached render, won't show in the bar. Key VoteBar on the vote data, or sync the state when myVote changes.
  4. Excluded tags can drop out of sync with the URL. readUrlState doesn't check the exclude IDs against reviewSession.tags. A stale or garbage ?exclude= value is passed straight to the backend as [ID!]. It's also never removed from the URL, because the TagFilter checkboxes only show known tags.
  5. TagFilter can add duplicates. toggle appends without checking whether the ID is already in excluded.
  6. Unverified focusUrl (speaker-card.tsx). If no focus screen is found, the links render as undefined?proposal=…. Fall back to a plain title when it's missing.
  7. Small points.
    • rel="noreferrer" is missing on the Grant link, which has target="_blank".
    • The user-supplied social URLs (website, linkedinUrl, facebookUrl, previousTalkVideo) are used as href without a scheme check. A javascript: URL entered in a profile would run in the admin origin.
    • The 140px bottom padding is hard-coded to the fixed vote bar height, which breaks when the bar wraps on narrow screens.

Tests. There are no frontend tests for the history/back/skip logic or the URL-state parsing. Both are easy to cover as unit tests.

@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.66%. Comparing base (9e08286) to head (c63f83b).

Additional details and impacted files
@@                  Coverage Diff                   @@
##           claude/cfp-review-api    #4869   +/-   ##
======================================================
  Coverage                  92.66%   92.66%           
======================================================
  Files                        367      367           
  Lines                      11098    11098           
  Branches                     959      959           
======================================================
  Hits                       10284    10284           
  Misses                       689      689           
  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 — c63f83bc 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