Skip to content

Sachin/process per candidate - #1220

Open
sachhayaKO wants to merge 3 commits into
mainfrom
sachin/process-per-candidate
Open

sachhayaKO wants to merge 3 commits into
mainfrom
sachin/process-per-candidate

Conversation

@sachhayaKO

Copy link
Copy Markdown
Collaborator

Summary

Adds a per-candidate lead vote counter to the Candidate Decider so ops can track progress during delibs and know when to move on to the next candidate.

  • Show "Lead Votes on Candidate N: X/Y" above the votes list (visible to leads only, same as the existing votes/comments section)
  • X = number of leads who have submitted a rating (not "no rating") for the current candidate
  • Y = leads added as authorized members on the instance; falls back to all leads if none were added
  • Only votes from the counted leads go toward X, so a lead from another team voting can't push it past the total

Notes

Setting up an instance for delibs: the total (Y in X/Y) is the number of leads added as authorized members when the instance is created at /admin/candidate-decider.
Ops/admins should add the leads who will actually be voting in that instance (e.g. that team's leads).

@sachhayaKO
sachhayaKO requested a review from a team as a code owner November 2, 2026 19:05
@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: d6e7b449-6665-4ea5-b3cf-61600620f4cb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

Tip

🎯 Customize your risk assessments

Guide how CodeRabbit assesses merge risk and security architecture risk. Highlight sensitive changes and explain your security boundaries using Merge Risk Instructions and Security Risk Instructions in your review settings. Security architecture risk assessments require the Advanced plan or above.

✅ Automatic approvals, with your rules

Let CodeRabbit approve pull requests once required threads are resolved, pre-merge checks pass, and your risk limits are met. Enable Automatic approvals in review settings, with overrides for teams or file paths.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@dti-github-bot

dti-github-bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

[diff-counting] Significant lines: 10.

@zkdlinyne zkdlinyne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey sachin, thanks for implementing this! I couldn't test locally because no apps were submitted and I'm not really sure how to implement them but aside from that I just left one small comment about authorizedMembers being used as the list of leads.

Other than that all good code-wise!

const userInfo = useSelf();
const allLeads = useMembers().filter((member) => LEAD_ROLES.includes(member.role));
// Count only the team's leads if an admin added them to this instance, otherwise all leads
const teamLeads = authorizedMembers.filter((member) => LEAD_ROLES.includes(member.role));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi sachin! This is small but I think if an admin adds one lead to authorizedMembers, countedLeads becomes only those leads (if that makes sense). I think it would be helpful to count every current lead and then stop using authorizedMembers as the lead list, since leads already have access to every instance. A normal instance has no leads on it, the count auto falls back to all leads.

Maybe keep allLeads from useMembers() and count a vote when LEAD_ROLES includes review.reviewer.role? In that case you could just remove the authorizedMembers prop.

This branch has not been deployed

No deployments
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.

3 participants