Merged
Conversation
Adds a per-topic "Fair mode" toggle that ensures each user is picked before any user is repeated. When enabled, entries attributed to already-picked users are excluded from the candidate pool until every user with entries in the topic has been selected, then the round resets. - New fairMode and fairModePickedUserIds fields in topic data - pickRandom respects fair mode filtering - recordPick tracks picked users and resets when round completes - UI checkbox toggle in picker card - State persisted in localStorage - DECISIONS.md updated with rationale Agent-Logs-Url: https://github.com/K-Cully/random-picker/sessions/f269db2d-b428-46c1-a8a3-2b4f925e4ec9 Co-authored-by: K-Cully <2370032+K-Cully@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add pseudo random mode to picker for fair distribution
Add fair mode (pseudo-random) to picker
May 7, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an optional per-topic “Fair mode” to reduce repeat picks by excluding users already selected in the current round until all users with entries have been picked, with the state persisted in localStorage.
Changes:
- Extended topic persistence/migration and topic creation to include
fairMode+fairModePickedUserIds. - Updated picker logic (
pickRandom/recordPick) to enforce fair-mode eligibility and round reset behavior. - Added a Fair mode checkbox in the picker UI with accompanying styles, and documented the decision in
DECISIONS.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| js/app.js | Adds fair-mode topic state, selection logic, and UI wiring for the new toggle. |
| css/styles.css | Styles the fair mode toggle and aligns picker action row contents. |
| DECISIONS.md | Documents the rationale and implementation notes for fair mode. |
Owner
|
@copilot review the comments and address the issues identified |
- Add fairMode/fairModePickedUserIds defaults to v1→v2 migration - Remove side effect from pickRandom(), keep it pure - Move round reset logic into recordPick() before tracking - Disable fair mode checkbox during spin animation Agent-Logs-Url: https://github.com/K-Cully/random-picker/sessions/15435e48-9aea-49b2-90a0-4e373a1e41f9 Co-authored-by: K-Cully <2370032+K-Cully@users.noreply.github.com>
Contributor
Author
All three review issues addressed in c8a8edb:
|
Agent-Logs-Url: https://github.com/K-Cully/random-picker/sessions/15435e48-9aea-49b2-90a0-4e373a1e41f9 Co-authored-by: K-Cully <2370032+K-Cully@users.noreply.github.com>
K-Cully
approved these changes
May 7, 2026
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.
pickRandomto respect fair mode when enabled