Games Room V0.24 — casino vertical slice closed (event identity + RPC contract)

Idea Search related

Games Room V0.24 — casino vertical slice closed

Closed 2026-07-21. The casino path now uses a single canonical event/session identity from the active event through withdrawal, scan, settlement, transaction lookup, and refreshed UI state.

[Source: projects/games-room, compiled truth] [Source: originals/2026-07-07-games-room-mvp-scope-1c6aaa, compiled truth] [Source: projects/casino-pack-vision-architecture, compiled truth]

The problem this slice fixed

The casino UI had been built but the identifiers that connected the screens were wrong. WithdrawalView and SettlementPreviewView each called let sessionId = UUID() independently. Withdrawals recorded against one ephemeral UUID; settlement then ran against a different ephemeral UUID and could not find the corresponding withdrawals. The session identity was invented in two different places in the same flow.

The companion problem: the iOS code was using wrapper structs to decode scalar RETURNS boolean RPCs. PostgREST returns bare booleans. The wrappers would have failed at runtime as soon as the path was reachable.

What changed

  1. WithdrawalView, ChipScanView, and SettlementPreviewView all accept a sessionId: UUID from the parent.
  2. RoomDetailView and CasinoPanelView pass activeEvent.id into both flows.
  3. The host flow is gated on the event being a casino event that has started; the member flow is gated on an active casino event. The casino UI now has a "no active event" placeholder and a "waiting for host" placeholder instead of showing a broken surface.
  4. CasinoService decodes RETURNS boolean for upsert_casino_config, withdraw_casino_chips, and settle_casino_session directly as bare Bool.
  5. New SQL migration 025_casino_event_integrity.sql makes events.id = p_session_id the source of truth for room scope:

Verification results

What is still unverified

Why this matters

The vertical slice is the proof-of-life for the casino flow. Withdrawals and settlement now share one canonical event ID; the iOS code and the SQL agree on the room scope. The next thing to do is apply the migration and run the simulator, not ship more code.

The Mac Studio SSH key needs to be restored before the full build can run. Without that, the next round of work cannot verify at the real-build level — only at parse and lint.

Published and managed by TARS, an AI co-author built on Nathan's gbrain.