How We Built Bias-Free 50/50 Voting &
Every "Top 10" page on the internet tends to fall into one of two failure modes: Static SEO listicles with thin copy, affiliate links pretending to be rankings, and zero way for readers to challenge the order. Unstru
Every "Top 10" page on the internet tends to fall into one of two failure modes:
- Static SEO listicles with thin copy, affiliate links pretending to be rankings, and zero way for readers to challenge the order.
- Unstructured forum threads where loud opinions drown out primary-source specs, dates, and trade-offs.
When we built Top10Grid — a crowd-voted Top 10 & head-to-head comparison platform — we ran into three surprisingly tricky engineering problems that standard web dev playbooks don't talk about.
1. Ballot Neutrality Is a UI Bug Problem, Not Just a Copy Problem
In our early prototypes of Top10Grid Compare and our #1 vs #2 quick-vote cards, we noticed #1 won far more often than expected — even on genuinely divisive matchups like ChatGPT vs. Claude or Eminem vs. Tupac.
The culprit wasn't the crowd. It was visual framing bias:
- Slight contrast differences between the left and right vote buttons (
deltaLuminance > 0.01). - Asymmetric cover cropping where #1 got a larger hero tile than #2.
- Showing existing vote percentages before the user clicked (herding bias).
So we codified a strict template-level rule we call "The Receipts Arena":
- Both contenders in a
#1 vs #2ballot render at identical 50/50 widths with equal button luminance (deltaLuminance <= 0.01). - Live crowd percentages stay hidden until after you cast a 1-tap vote — then reveal in <150ms via optimistic state reconciled against Postgres.
- Every
#1entry must explicitly state "Who should skip #1" (trade-off honesty) backed by primary sources.
2. Catching a Silent Conversion Regression That Passed 100% of Unit Tests
Here is a real bug we shipped and caught in production logs this week:
Our /compare arena had over 17,000 views and nearly 2,000 post-vote signup prompts, yet GET /api/auth/fedcm-config (Google One-Tap FedCM) fired only twice across 7,483 sessions.
Every single Vitest test was green. Why?
// The bug: strictLadder defaulted to true in prod, false in Vitest!
const strictLadder = props.strictLadder ?? !process.env.VITEST;
In production, strictLadder hid the post-vote prompt component on Vote #1 and Vote #2 to keep the UI calm — which accidentally unmounted the useEffect that fired Google One-Tap FedCM on Vote #1. In tests, process.env.VITEST was truthy, so the tests never saw the production branch!
The fix: Decouple non-intrusive FedCM pre-warming from DOM banner visibility, fire promptGoogleOneTapFedCm() cleanly once on Vote #1 for anonymous voters, and add a compact inline 1-tap "Save vote with Google" action on /compare without adding modal clutter.
Takeaway: Never branch user-facing conversion paths on process.env.VITEST, and monitor real funnel ratios (fedcm_config_hits / anon_votes) in production rather than trusting green unit tests alone.
3. Dropping Entity Page TTFB from 27.1s to 0.31s with One Partial Index
While auditing crawl latency across 39,000+ entity hubs (like /entity/nvidia), we hit 14–27s uncached response times under bot concurrency. Two issues compounded:
- A
MediaVisionLedgerlookup ran aLEFT JOINwith anORcondition across unindexedimageUrlrows, causing a 3.84-second full table scan on every cold cache miss. - Splitting the
ORinto index-backedEXISTSchecks plus a single non-blocking partial index:
CREATE INDEX CONCURRENTLY idx_mvl_image_url_pass
ON "MediaVisionLedger" ("imageUrl")
WHERE "visionVerdict" = 'PASS';
dropped the query from 3,837 ms → 65.6 ms (58× faster), and combining that with in-flight promise deduplication (SWR) brought uncached entity pages down from 27.14s → 0.31s with zero 502s.
Try It & Break It
Top10Grid is 100% free with no forced login to vote:
- Head-to-Head Arena: top10grid.com/compare (try ChatGPT vs. Claude)
- Build Your Own Top 10: top10grid.com/create
- Full Methodology: top10grid.com/methodology
We're also launching on Product Hunt on Tuesday, Dec 8 — if you notice any UX friction on Vote #1 or want to suggest a tech/AI comparison matchup, drop it in the comments!
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.