mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3408] [MERGED] feat(turn-games): add No-Limit Texas Hold'em poker as the third conversation-mode table game #5923
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5923
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3408
Author: @Romuromylus
Created: 7/9/2026
Status: ✅ Merged
Merged: 7/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/turn-games-poker📝 Commits (9)
b1e4f02feat(turn-games): add No-Limit Texas Hold'em poker engined351e0bfeat(turn-games): dealer announcements in the bot loop + [poker] commande4d380bfeat(turn-games): poker table board, setup modal, and client wiring2cbc44cdocs(changelog): poker entry + missed v2.1.2 turn-game framework notesb538a67fix(turn-games): don't manufacture a poker side pot from a folder's dead money8339a37fix(turn-games): let the poker bet field accept partial typing6ceb543docs(changelog): move the #3308 turn-game notes to their shipped release (2.1.0)6d073a7Merge remote-tracking branch 'pasta/staging' into feat/turn-games-poker6b6e011fix(turn-games): address CodeRabbit review — debug-log dealer prompt, narrow bet-input reset📊 Changes
29 files changed (+3124 additions, -10 deletions)
View changed files
📝
CHANGELOG.md(+6 -0)📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+5 -0)📝
packages/client/src/components/chat/ChatSetupWizard.tsx(+1 -0)📝
packages/client/src/components/chat/ConversationInput.tsx(+9 -2)📝
packages/client/src/components/chat/ConversationView.tsx(+10 -2)➕
packages/client/src/components/chat/PokerBoard.tsx(+476 -0)➕
packages/client/src/components/chat/PokerSetup.tsx(+228 -0)📝
packages/client/src/hooks/use-generate.ts(+7 -0)➕
packages/client/src/hooks/use-poker.ts(+146 -0)📝
packages/client/src/lib/slash-commands.ts(+14 -0)➕
packages/client/src/stores/poker-game.store.ts(+36 -0)📝
packages/server/src/routes/conversation-calls.routes.ts(+2 -0)📝
packages/server/src/services/conversation/character-commands.ts(+16 -0)📝
packages/server/src/services/generation/conversation-command-runtime.ts(+14 -2)📝
packages/server/src/services/generation/turn-game-command-runtime.ts(+71 -0)📝
packages/server/src/services/turn-games/turn-game-bot-runner.service.ts(+223 -3)📝
packages/server/src/services/turn-games/turn-game-runner.service.ts(+11 -0)📝
packages/shared/scripts/generate-feature-registries.mjs(+1 -1)📝
packages/shared/src/features/turn-games/engine.types.ts(+20 -0)➕
packages/shared/src/features/turn-games/poker/deck.ts(+128 -0)...and 9 more files
📄 Description
Linked issue
Closes #3407
Why this change
Conversation mode had two table games (UNO, chess) but no betting game — and poker is where character personality matters most: bluffing, needling, folding under pressure, and shoving all-in are in-character acts, not just game logic. This adds No-Limit Texas Hold'em as the third turn-game on the existing conversation-mode framework, giving group chats a reason to gather at a table where each character's temperament actually changes how they play. It also introduces a selectable dealer so a chosen character (or a silent house dealer) narrates the hand in their own voice while the engine deals fairly.
What changed
Shared — deterministic poker engine (
packages/shared/src/features/turn-games/poker/)deterministicShuffle(seed, handNumber), so message edits / regenerations rewind to identical deals), full no-limit betting with all-ins, incomplete-raise capping, the big-blind option, and layered side pots.next_handstep between hands.hiddenInformation: true, so the framework keeps each seat's hole cards private.TurnGameEnginecontract —announcerCharacterIdanddrainAnnouncements— for the dealer-narration feature. UNO and chess implement neither and are entirely unaffected.Server — dealer announcements +
[poker]command[poker]conversation command (advertise + dispatch, seats human + non-offline characters capped at 8) mirroring[uno]/[chess].Client — table board + setup
PokerBoard(community cards, seat strip with button/blind/status badges, hole cards + live hand label, fold/check/call/bet-raise/all-in action bar, showdown recap with best-five highlighting,Next handpacing) andPokerSetup(player picker, dealer dropdown — house or any character, stakes).turn_game_state_patchhandlers,/poker, the natural-language launcher, and the conversation command toggles.Docs
CHANGELOG.md: poker under[Unreleased]; also back-filled the previously-undocumented turn-game framework work (#3308 personality-driven bot moves, seat-aware in-chat game context, personality-gated hand/plan secrecy) under its shipped release[2.1.0](verified via tag ancestry). No version bump in this PR.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What the author ran and verified:
pnpm check(shared + server + client build + lint) — exited 0 (including after merging currentstagingin to resolve aCHANGELOG.mdconflict).tsx --test): poker hand-evaluator (21 cases incl. a 2000-hand brute-force fuzz), poker engine (21 cases incl. a chip-conservation invariant fuzz across 30+ full sessions), poker server runner (5 cases incl. a no-hidden-information-leak assertion and voiced/silent dealer drains). UNO/chess/framework regression suites all green, re-run after the staging merge.next_hand. The dealer character announced each street in character with accurate facts; bots played in character; a UI fold fired the bot loop; a page reload rehydrated the board; the game survived a container restart mid-hand.Partial coverage (why the edge-cases box is left unticked): a dedicated light/dark theme toggle sweep and mobile-viewport pass of the poker board specifically was not performed by the author — the board reuses the same theme-token (
var(--…)) andflex-wrapresponsive patterns as the already-shipped UNO/chess boards, but this has not been independently re-verified for poker. A maintainer should tick that box after their own light/dark + mobile check.To manually verify in a browser: enable the Poker command toggle in a conversation chat with 1+ characters, run
/poker, pick a character dealer and stakes, and play a hand — check the action bar (fold/check/call/bet/raise/all-in), the showdown recap,Next hand, and dealer narration; also glance at light + dark theme and a mobile width.Docs and release impact
UI evidence (if applicable)
Summary by CodeRabbit
New Features
Bug Fixes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.