Skip to content

go: mark dead stones and accept in the scoring - #455

Merged
aaylward merged 2 commits into
mainfrom
claude/zen-euler-y3qze2
Oct 19, 2026
Merged

aaylward merged 2 commits into
mainfrom
claude/zen-euler-y3qze2

Conversation

@aaylward

@aaylward aaylward commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Part of muchq/MoonBase#1668. Client half of go dead-stone marking; the server half is muchq/MoonBase#1676.

  • In phase scoring, a seat taps a stone to toggle its group dead (markDead) and presses Accept (accept). Dead stones are drawn faded.
  • The status line shows the running count and who has accepted.
  • The seat on turn can still play an empty point to play on. Watchers can't mark or accept.
  • The clock keeps running for the side to move during scoring.

Merge this first. It's inert until the hub sends scoring. An old client facing the new hub would get stuck in scoring until a clock ran out.

The review panel was not run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PF5CZafkFhmkCfxasKpme9

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PF5CZafkFhmkCfxasKpme9
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
muchq 3d0e95f Commit Preview URL

Branch Preview URL
Oct 18 2026, 02:01 AM

@cursor

cursor Bot commented Oct 18, 2026

Copy link
Copy Markdown

Four-lens panel (React / a11y-UX / wire-flow / tests) ran read-only — the PR noted it had not.

Altitude / wire: Right half. Thin view-driven client for hub scoring; client-first is correct (inert until the hub sends the phase; old client + new hub would stick). markDead / accept / play-on / clock-during-scoring match MoonBase#1676. React wiring is clean: either seat marks, only side-to-move plays empties, Accept disables once you’re in acceptedBy, shared sent gates the board.

Four things before merge:

1. Dead stones are opacity-only — white nearly vanishes (should fix). .stone[data-dead='true'] { opacity: 0.35 } on #dcb35c leaves dead white ≈ board-colored. Add a second cue (stroke/dash, X, or fill change) so both colors stay readable; pin data-dead (or the cue) in the scoring test, not only the aria string.

2. Scoring status is wrong for watchers (should fix). Everyone gets Mark the dead stones, then accept. Watchers can’t. Describe the phase for them (marks + count + who accepted); keep the imperative line for seats.

3. Status never says the seat to move can play on (should fix). Clock still runs and empty points stay Play …, but role="status" only talks about marking/accepting. One clause for the side to move (and not for the other / watchers) would match the PR contract.

4. Accept leaves focus on a control that disables (should fix). Pass already moves focus to the board before sent flips. Accept is onClick={table.accept} with no refocus — keyboard users land on a disabled Accept until the next view. Same board-focus pattern as Pass.

Tests (testing bar). Happy path is real; these branches can regress green:

  • Off-turn seat marks (bob) — wire says either seat; only alice’s mark is asserted.
  • Clock data-running on the side to move during scoring.
  • Scoring UI respects table.sent (Accept disabled + no mark).
  • Status You accept. when self is in acceptedBy.
  • Hook test: after mark + gameState, assert sent === false before accept (name claims “until the next view”).

Nits: resign cancel still says “Keep playing” in scoring; fine unless you want phase-aware copy.

Copy link
Copy Markdown
Contributor Author

Addressed in 3d0e95f:

  1. Dead stones get a red cross on top of the fade. The test pins it by point (go-dead-x-y).
  2. Watchers see "Scoring: the players mark dead stones." plus the count and who has accepted.
  3. The seat on turn sees ", or play on". The other seat doesn't.
  4. Accept moves focus to the board before it disables, the same way Pass does.

Tests added: the off-turn seat marking, the clock running on the side to move during scoring, sent holding Accept and marks, "You accept.", and the hook's sent === false after the view arrives.

The "Keep playing" wording stays as it is.


Generated by Claude Code

@cursor

cursor Bot commented Oct 18, 2026

Copy link
Copy Markdown

Re-check at 3d0e95f. All four review items and the testing-bar gaps are fixed:

  1. Red cross on dead stones (go-dead-x-y), with the fade kept.
  2. Watcher status describes the phase.
  3. Side-to-move gets , or play on; off-turn does not.
  4. Accept refocuses the board like Pass.

Tests cover off-turn mark, clock data-running, sent hold, You accept., and hook sent === false after the view. LGTM.

@aaylward
aaylward merged commit 5ca0fc0 into main Oct 19, 2026
2 checks passed
@aaylward
aaylward deleted the claude/zen-euler-y3qze2 branch October 19, 2026 17:29
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.

2 participants