Skip to content

Play in the browser and verify every frontend pairing - #20

Open
danspark wants to merge 12 commits into
feat/cli-clientfrom
feat/web-crossplay
Open

danspark wants to merge 12 commits into
feat/cli-clientfrom
feat/web-crossplay

Conversation

@danspark

@danspark danspark commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Adds a C# Blazor browser client with mouse and touch dragging, click/tap moves, SAN/UCI entry, promotion, side codes, matchmaking, opponent names, draw actions, and resignation. The ASP.NET host proxies the shared server API and participates in Aspire orchestration. Browser storage preserves pending request IDs so a reload after response loss can recover the same seat.

Dragging shows the moving piece, fades its source, and highlights legal destinations. Drops validate the current game, revision, orientation, and legal moves. Outside drops, Escape, lost input, and position changes cancel safely. Active one-finger chess drags cancel native touch movement so a browser fling cannot consume the promotion chooser's next tap.

Crossplay tests exercise every frontend pairing in both color assignments, plus browser/CLI matchmaking and waiting for an opponent move. They drive Chromium and the CLI process directly; native clients participate through their shared session, with separate native UI CI for the platform controls.

Validation: all 116 frontend tests pass in CI against each live backend, Akka and Orleans, with no skips: 38 web, 42 CLI, 21 crossplay, and 15 shared native tests. The touch regression detects a native fling with the original code; the repaired cases promote on the first tap and retain traces confirming no native fling on both backends. Coverage includes mouse/touch dragging, both sides and orientations, castling, en passant, cancellation, touch underpromotion, recovery, and the update transports. Separate native UI CI passed all six platform/backend jobs. CI retains reports, screenshots, and bounded browser input traces.

Gameplay videos

Actual Blazor games against a labeled scripted opponent. All White moves use dragging and each game ends in Scholar's Mate: 1. e4 e5 2. Bc4 Nc6 3. Qh5 Nf6 4. Qxf7#.

Desktop mouse

web-mouse-drag-gameplay.mp4

Phone touch

web-touch-drag-gameplay.mp4

Add a Blazor WebAssembly chess board with resumable side codes, notation entry, promotion, matchmaking, draw actions, and live updates through polling, SSE, or WebSockets. Aspire hosts its ASP.NET Core proxy beside the authoritative server and PostgreSQL.

Persist browser entry request IDs before sending so a lost response can recover the same seat after reload. The frontend runner checks the selected backend, requires all tests to execute, and validates CLI packaging.

All 69 client tests pass with zero skips on each backend: 20 CLI, 20 web, 21 pairwise crossplay, and eight native session tests. Browser and CLI cases run real UI/processes; native pairing cases exercise the shared session used by each app, with actual platform controls covered by separate CI. Desktop/mobile screenshots were inspected, and the Release web host publishes successfully.
@danspark
danspark added this pull request to stack #5 September 14, 2026 15:01
@danspark danspark changed the title feat/web crossplay Play in the browser and verify every frontend pairing Sep 14, 2026
@danspark
danspark marked this pull request as ready for review September 14, 2026 15:07
Carry the CLI PR's drawn Unicode board and mouse controls into the
browser layer so its review remains based on the updated CLI branch.
Allow pointer dragging while preserving square selection, keyboard controls, typed moves, and the promotion chooser. Bind drops to the current game, revision, orientation, and legal moves, and cancel interrupted gestures without a trailing board click.

Render the completed drop after touchend so Chromium does not suppress a rapid promotion tap. Real browser coverage verifies both sides and orientations, special moves, cancellation, touch promotion, and complete drag-to-checkmate games. All 37 web tests pass against the live Akka server.
Carry forward validated native drag input and the WPF mouse capture fix through the existing CLI branch while preserving the Blazor implementation.
Carry the Android verification input layout wait and native documentation through the existing CLI dependency. The web, CLI, crossplay, and shared native implementations match the 115-test suite that passed against Akka and Orleans.
Carry the repaired AppHost startup, Android artifact collection, and WPF window placement through the existing CLI dependency. Keep the stack bases and gameplay attachments intact while CI validates the updated native checks.
Carry the native input event-order fix and its real-input regression through the CLI base into the dependent web PR.
A touch promotion could receive pointer and touch press/release events without
a click or a move request. CSS blocked page panning, but Chromium still started
a native fling from the custom board drag. Cancel the native one-finger touch
movement after the chess drag threshold, leaving taps and pinch gestures alone.
The timeout before completing a drop did not prevent the failure and is removed.

Retain bounded Chromium input traces and screenshots for the promotion test,
which now covers two- and twelve-step drags. Against the original code the
12-step regression detects a native fling; both repaired cases deliver real
touch input, produce no fling, and promote to a knight on the first tap.
Full browser tracing changes timing enough to mask the intermittent missing
click, so the deterministic regression checks the unwanted native gesture too.

Validation: Release build without warnings; 38 web tests pass against Akka.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant