Repository navigation
Feat/live gender ratio - #10
Merged
Merged
Conversation
Adds /admin/live-ratio: a standalone split-flap scoreboard showing the live split between men and women among submitted profiles, for display during an event. - GET /api/admin/live-ratio returns the two counts. It uses two parallel HEAD count queries rather than selecting the pronouns column and tallying in JS, so it transfers no rows on each poll and is not subject to PostgREST's row ceiling (which would silently undercount past 1000 submissions). Admin-only via requireAdminApi, and uncached. - The board polls every 5s and renders each digit as a split-flap card: the old digit's top half hinges down about the centre line while the new digit's bottom half swings up behind it, with a per-digit stagger so the ones place leads. Shows a women:men ratio and a proportional split bar alongside the counts. - src/lib/gender.ts holds the pronoun patterns. They mirror the mapping the matching algorithm uses (the nested getGender in matchmaker/embeddings.ts): he/him counts as men, she/her as women, and They/Them or Other are not counted. The two need to stay in step. - Themed via the existing CSS variables, plus a --color-women-pink token that is deliberately not theme-swapped, since --color-valentine-pink resolves to blue under the default theme. - Links from the admin dashboard header. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Caps every comment in the scoreboard files at two lines, keeping the reasoning that is not evident from the code and dropping the narration. The longest cuts were in globals.css: the split-flap header diagram, the crease explanation and the box-shadow interpolation note. Also moves a comment in FlapNumber.tsx back above endFlip, which it describes. An earlier edit had inserted the creaseKey declaration between the two, leaving it stranded above something unrelated. No change to behaviour; comments only. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
FlapNumber and LiveRatioBoard were colocated under the route directory; they now sit alongside the other shared components. The route keeps only page.tsx, so /admin/live-ratio is unchanged. Both imports become @/app/components/… aliases, matching how the rest of that folder is imported. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
candle08
marked this pull request as ready for review
October 7, 2026 04:58
patel-aaryan
self-requested a review
October 7, 2026 20:21
ad1t1-jha
approved these changes
Nov 10, 2026
ad1t1-jha
approved these changes
Nov 11, 2026
This branch was successfully deployed
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.
Live gender ratio on admin page. /admin/live-ratio
she/her -> woman
he/him -> man
everything else is ignored
Code was written without being able to connect to Supabase so probably doesn't work 💀