games: the felt that knows which seat is yours, and the rail you can talk on

Phase C frontend: the hold'em felt runs on the shared-table runtime.

- holdem.js reads view.your_seat instead of assuming seat zero — every "you"
  test (layout, your cards, the burst on a pot you win, the verdict) is keyed on
  it now, so a joiner at seat 2 sees their own hand at the bottom.
- Leaving is its own endpoint, and a bust closes a solo table; play() animates a
  session-ending hand (the last showdown) before the felt clears.
- A live table: one EventSource per seated player. The server pushes a nudge on
  every table change and a chat line as it is said; a nudge refetches the player's
  own redacted view (a hole card must never ride a frame that fans to the table),
  and a frame that lands mid-animation is held until the script finishes.
- Chat on the felt (a _chat panel, messages only) and a lobby that lists tables
  with a seat going spare. Two-cookie dev rig (reala + bob), with the turn clock
  and reaper live under it.

Browser-confirmed for solo: sit renders your seat and the rail, a hand deals and
conserves to the chip (bought in 100, 100 in front), chat sends. The two-browser
multiplayer pass (join, live sync between windows, shared-table conservation) is
still owed before this deploys.

Claude-Session: https://claude.ai/code/session_013M5nD7PgUboJXoDcYHzpuJ
This commit is contained in:
prosolis
2026-07-14 16:49:27 -07:00
parent 5139385350
commit 4ad96dcb5e
5 changed files with 301 additions and 44 deletions

View File

@@ -2369,6 +2369,27 @@ html[data-room] .pete-felt {
.pete-poker-verdict[data-tone="win"] { background: #4caf7d; color: #fff; }
.pete-poker-verdict[data-tone="lose"] { background: rgba(255,255,255,0.9); color: #7a5c50; }
/* The rail. Chat runs along the felt — messages only, no typing indicators, and
it never leaves for Matrix. Your own lines lean the other way and take the
accent, so a glance tells you who is talking. */
.pete-chat-line {
display: flex;
gap: 0.4rem;
align-items: baseline;
padding: 0.15rem 0.1rem;
line-height: 1.35;
}
.pete-chat-who {
flex-shrink: 0;
font-weight: 700;
color: var(--accent);
}
.pete-chat-body {
color: color-mix(in srgb, var(--ink) 85%, transparent);
word-break: break-word;
}
.pete-chat-mine .pete-chat-who { color: color-mix(in srgb, var(--ink) 55%, transparent); }
/* The action bar. Raise is a slider, because a raise is a *size* and a text box
makes you type a number you have not thought about. */
.pete-raise {

File diff suppressed because one or more lines are too long