Repository navigation
Elemental Showdown: the reveal (#162) - #173
Merged
Merged
Conversation
jacobcheatley
added this pull request to stack #182
September 22, 2026 00:37
jacobcheatley
marked this pull request as ready for review
September 22, 2026 00:38
Casting a Vote now hands back the reveal: the five counts with the Voter's own Vote in them, the Vote that stands, the share who voted the same, a headline kind and the crowd's mean when the Matchup has enough Votes to have a verdict. The counts are a fresh per-request tally of that one Matchup, so a Voter always sees their own Vote counted, and a repeat Vote reads the first one back out of the table rather than echoing what was sent. A Matchup is stored from the lower-id Element's side and shown from the top Element's, so the server turns the whole reveal — counts, the Vote and the mean — into the orientation the Tug is showing before it leaves. The result carries a `state` tag, which is where the rate limit's `limited` and the unlock flag go later. On screen the seam stays where the Voter left it and the five tabs become five count bars: a fixed-width label, a faint divider, then a zero-based bar whose length is that value's share and nothing else. The Voter's own bar takes the pill's place with a heavier outline and a "your vote" tag, the dashed crowd line travels to the mean, and a card on the winner's side carries the headline, "N% voted the same, of M" and a draining bar. Under five Votes there is no mean line and no verdict, only "first to call it" or "early days". The next Matchup is drawn while the Voter reads, and slides in when the bar drains or at once on a tap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVEtgjCoEbaNHrYfzyCRNH
jacobcheatley
force-pushed
the
feat/162-reveal
branch
from
September 22, 2026 01:08
989191b to
e7f9445
Compare
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.
Closes #162. Part of #158.
Casting a Vote now returns the reveal: a fresh per-request split for that Matchup (the Vote just cast included), the Voter's stored value, the share that voted the same, the headline kind and the crowd's mean when there is a verdict. The server flips all of it into the as-shown orientation once, so the Tug never thinks about ids. A repeat Vote reveals the first Vote, which stands.
On screen the seam rests where the Voter left it, each tab becomes one ink shape with a zero-based count bar whose length is that value's share, the Voter's bar takes the pill's place with a "▲ your vote" tag, and a dashed line marks the mean. A card carries the headline, "N% voted the same, of M" and a 3.5s draining bar; the next Matchup is drawn while the Voter reads and slides in when the bar drains or at once on a tap. Under 5 Votes the card says "first to call it" or "early days, only N votes" with no mean line, no verdict and no share line.
Verification
Real-Postgres tests (counts include the Vote just cast; the reveal read from the top Element's side with the higher id on top; a repeat Vote), component tests on fake timers (nothing of the crowd before the Vote, the marked bar and headline, the
earlyform, advance on drain and on tap), and a headless Chromium pass at phone size beside prototype variant G.🤖 Generated with Claude Code
https://claude.ai/code/session_01AVEtgjCoEbaNHrYfzyCRNH