Skip to content

chess: right click marks a square - #464

Merged
aaylward merged 2 commits into
mainfrom
chess-square-marks
Oct 19, 2026
Merged

aaylward merged 2 commits into
mainfrom
chess-square-marks

Conversation

@aaylward

Copy link
Copy Markdown
Contributor

Change

Right-clicking a square toggles a red mark on it and suppresses the browser context menu. A left press on the board clears all marks, the way lichess does.

  • Marks are client-only. Nothing is sent to the hub.
  • They work off turn and for watchers.
  • They're keyed to gameId, so they don't carry into the next game.
  • They sit above the last-move and premove tints.

Not handled: on touch devices a long-press fires contextmenu, so it will mark the square too. That seemed harmless, so I left it.

Tests

  • Component tests: toggle without a move or the browser menu, a left press clears but a right press doesn't, and marking works for a watcher but resets on a new game.
  • Negative tests bite: removing the left-button check, and removing the gameId keying, each fail one test.
  • typecheck, lint, the full test suite and build pass locally.
  • Not tried in a real browser: the chess table needs the MoonBase backend. Please check on the Cloudflare preview.
  • The four-agent review panel did not run.

Generated by Claude Code

A right click toggles a mark on a square, as on lichess, without the
browser menu; a left press on the board clears them. Marks are the
viewer's alone, work off turn and for watchers, and do not carry into the
next game.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 19, 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 a2b1e71 Commit Preview URL

Branch Preview URL
Oct 19 2026, 08:41 PM

@aaylward
aaylward merged commit 00f85ab into main Oct 19, 2026
2 checks passed
@aaylward
aaylward deleted the chess-square-marks branch October 19, 2026 20:42
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