Repository navigation
Award feats immediately and add dice, streak, rating, and pace feats - #122
Conversation
Feats like One-Inch Punch, Natural, and Scratch Fever cannot depend on how the game ends, but were only written at completion. game-action now replays the game's actions after any punch, submission, Mulligan, or five-of-a-kind roll and stores newly earned instant feats in the same move. Completion still computes every feat and skips the ones already stored for the game. Instant feats earned before a Rage Quit stand. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
# Conflicts: # supabase/functions/game-action/index.ts
Rolling 2 through 8 Suckers in one game now earns Seeing Double, Hat Trick, Four Score, High Five, Six Pack, Lucky Seven, and Crazy Eights. A Sucker counts once per run of rolls, which starts over at each submission and Mulligan, so rolling again with all five held does not count twice. Also adds Back-to-Back, Anything You Can Do, Lightning Strikes Twice, Straight Out the Gate, Four on the Floor, and Daylight Robbery, plus the Sucker Punched defeat. All are instant feats. A migration credits finished games with their Sucker count tiers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0a1517ce2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A Mulligan in the response window discards the turn just submitted, so its replay is that turn again, not the next one. Back-to-Back and Anything You Can Do no longer count the discarded turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
game-action now awards Flurry, Thanks I Needed That, Backfire, Do-Over, and Should've Kept It the moment they happen, and Rope-a-Dope, Wire to Wire, Dead Heat, the 400 and 500 Clubs, Spotless, and Double Digits at completion. A replay is judged against the score of the turn it erased. The completion trigger awards Giant Killer, Banana Peel, Blitz, and The Long Game per game, and the Hot Streak, On Fire, Got Your Number, and Sucker Collector milestones. player_standings.sucker_faces tracks the Sucker faces each player has rolled, and the migration backfills those bits and the new milestones. Instant feats replay a game's actions on most moves, so turn_actions gets a (game_id, created_at) index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52a10a846a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A Mulligan discards every roll so far, so a Sucker rolled before it no longer marks the turn for Back-to-Back or Anything You Can Do. The Sucker count still includes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Feats like One-Inch Punch were only written when a game completed, so a player who landed a 1 saw nothing on their profile until the end. Feats that can't depend on the outcome are now awarded on the move that earns them.
instantFeatKeysinshared/feats.ts): One-Inch Punch, Revenge Is Sweet, Counter Culture, Natural, Bought It, Worth Every Penny, Whiff City, Can't Miss Missed, Boomerang, Sucker Born Every Minute, All In All Gone, Bought a Goose Egg, Buyer's Remorse, Scratch Fever. Each only ever turns on as more actions are replayed, so a later move can't take one back.game-actionreplays the game's actions and adds newplayer_featsrows to the same atomic move. Other moves skip the read.AGENTS.md: try-out URLs use the Tailscale MagicDNS name, and the local Supabase URL must be reachable over the tailnet.New dice feats
All of these are instant feats.
mayEarnInstantFeatnow takes the roll number, so the first-roll feats only replay the game on a turn's first roll.20261028140000_backfill_sucker_count_feats.sqlcredits finished games with their Sucker count tiers, using the same counting in SQL. Games still in progress pick theirs up on their next qualifying move. The other new feats apply going forward.main, which fixes theexpo-notificationsversion check that failed the App job.deno.lockpicks up the same bump.Streak, rating, pace, replay, and scorecard feats
player_standings.sucker_facescolumn keeps the faces as bits 1 to 6, so the check never rescans history.20261029120000_add_streak_rating_and_pace_feats.sqladds that column, replacesapply_completed_game_standings, and backfills the faces and the new milestones on the game that earned each one. Per-game feats start with games finished after it.turn_actions (game_id, created_at)index. Instant feats load a game's actions on most moves, andturn_actionshad no index ongame_id.Needs
supabase db pushand agame-actiondeploy.Testing
npm run typecheck,npm run typecheck:edge,npm run test,npm run test:edgenpm run test:integration:supabase(47 passed). The completion test now checks that Natural and Scratch Fever are stored mid-game and that completion doesn't insert them twice.🤖 Generated with Claude Code