[ui-a] Play section: lobby, deck builder, match, results, tutorial #26

Merged
claude merged 18 commits from night/ui-a/play-shell into night/2026-11-16 2026-11-17 05:34:48 +00:00
18 Commits
Author SHA1 Message Date
claude c80c6cd2b4 Merge remote-tracking branch 'origin/night/2026-11-16' into night/ui-a/play-shell
# Conflicts:
#	src/App.tsx
2026-11-17 00:25:31 -05:00
claudeandClaude Opus 5.5 b5fa6d3609 Play: lobby leaderboards (mode players, network hosts); compact phone dock
Host credit per #6: hosted modes show their top players and the network's
host leaderboard (matches hosted). Same-origin GETs, strings capped and
rendered as text. On phones the lobby actions fit one row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 00:06:00 -05:00
claudeandClaude Opus 5.5 a3c280b922 Play: review follow-ups (night-review, council-critic)
Lane plate shows Opp total on top and You below with the Portal rule and
tie-break reason; results use the engine's lane leaders (on-topic tie);
opponent fizzles never name a card in hand; guest names no longer use
secret characters; pick one of the four starter decks in the lobby;
'+N saved' energy in the turn banner; keyword words fit; hand fade hint;
phones hide node chrome on the Play route and keep the Play button clear
of the floating account button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:59:15 -05:00
claudeandClaude Opus 5.5 c4636530ef Play: bots see only viewFor output (MatchView.engine = { view, seat })
Per night-lead's rule on #5 the adapter no longer exposes MatchState to
bots; a test checks no RNG state, seed or deck order leaks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:55:58 -05:00
claudeandClaude Opus 5.5 fa1fee98f8 Merge night/2026-11-16 (engine #25/#27, card data #28); use engine derivation and §2.1 starter decks
Owned NFTs derive with deriveCard() and council-data's percentile table
(check 'unchecked': cost capped, no live trend in browser practice).
Loaner pool = the four §2.1 starter decks; the deck builder can start
from any of them; the bot plays one picked by seed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:51:17 -05:00
claudeandClaude Opus 5.5 efea1b70c7 Play: online results from each player's side; finish timer survives polls
Found with a two-browser test against the modes host: the seat-1 player
saw Defeat after winning (ResultView is now viewer-relative), and a poll
could cancel the move to the results screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:43:00 -05:00
claudeandClaude Opus 5.5 60af45262d Play: online lobbies for modes hosted on this node; MatchBoard split
MatchBoard renders any PlayerView; the local controller runs the engine
and bot, the online controller polls the host lobby API (create, join,
draft picks, actions, resign). Player secret is HMAC(master, hostOrigin)
per night-review. Illegal local moves no longer throw inside a state
updater.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:33:02 -05:00
claudeandClaude Opus 5.5 dcb2c45af2 Play: owner-prefixed board card ids; hide account button via :has() too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:29:49 -05:00
claudeandClaude Opus 5.5 a2573129a5 Play: wire the real shared/game engine (DESIGN v1 Edit War)
Replace the mock with an adapter over shared/game/index.ts: Topics with
stats and hidden Portals, home-stat icons and on-topic hints, queued
plays with undo, interleaved reveal log, engine deck validation, loaner
starter decks, interim NFT derivation (cost-capped). Lobby reads the
modes API (self + peers) and links to peer hosts; the account chip uses
the SSO hook; the floating account button hides during a match.
MatchView.engine / UIAction.engine expose engine state for ui-b's bots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:25:29 -05:00
claude fac7b605cc Merge remote-tracking branch 'origin/night/2026-11-16' into night/ui-a/play-shell 2026-11-16 23:20:51 -05:00
claude 8a150ca269 Merge remote-tracking branch 'origin/night/engine/core' into night/ui-a/play-shell 2026-11-16 23:19:10 -05:00
claudeandClaude Opus 5.5 8988316152 Play: clearer tiebreak result text; lanes fill the phone screen
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:17:20 -05:00
claudeandClaude Opus 5.5 c938407d36 Engine tests: viewFor never leaks opponent hand, deck order, seed or RNG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:17:04 -05:00
claudeandClaude Opus 5.5 b6dcd74cc3 Play section: lobby, deck builder, match, results, tutorial
Mobile-first game UI in src/game/, built against a UI-side EngineAdapter.
A temporary mock 3-lane engine (src/game/mock/) stands in until
shared/game lands. Tap a card, then tap a lane; bottom thumb dock; bottom
sheets instead of hover; full-screen match on phones. Lobby lists local
and peer modes (GET /api/game/modes, parsed defensively) and shows the
eom.dev login state through a stub hook for the SSO team.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:16:18 -05:00
claudeandClaude Opus 5.5 e0ac157ee1 Engine: trendDown -200 default; nullable loaner pageId counts copies per cardId (DESIGN #23/#24)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:14:51 -05:00
claudeandClaude Opus 5.5 ec24437838 Engine core: implement frozen DESIGN v1 (PR #17) and publish ENGINE_API.md
Interleaved reveal, alternating initiative, energy carry, onTopicBonus by cost,
consensus tie-break, hidden Portals with visible stats, laneCapacity 3, Portal
capacity/canPlay/atScoring/allOnTopic hooks, keywordsEnabled dispatch, §10.3
default Topic pool, global reveal seq. KEYWORDS/PORTALS left to engine-b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 23:13:14 -05:00
claudeandClaude Opus 5.5 f3b6097640 Engine core: align with DESIGN.md draft (Edit War)
mulberry32 uint32 seed with the §4 draw order, Topics with stats and Portals,
staggered reveal, initiative and underdog rules, queue/undo/commit/timeout
actions, §9 flat RulesConfig with zod bounds, viewFor hidden info, replay.
cards.ts left to engine-b; placeholder loaners in starter.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:55:51 -05:00
claudeandClaude Opus 5.5 7c86ed35f5 Game engine scaffold: seeded RNG, types, Ruleset schema, core loop
Pure deterministic off-chain engine in shared/game: createMatch, legalActions,
applyAction, isOver, result, viewFor, serialize/deserialize, replay. Placeholder
Snap-style lanes rules until DESIGN.md v1; keyword hook registry for engine-b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 22:50:45 -05:00