Skip to content

fix(react-chess-game): sound and keyboard control improvements#80

Merged
dancamma merged 3 commits into
mainfrom
fix/sound-and-keyboard-improvements
Mar 10, 2026
Merged

fix(react-chess-game): sound and keyboard control improvements#80
dancamma merged 3 commits into
mainfrom
fix/sound-and-keyboard-improvements

Conversation

@dancamma

Copy link
Copy Markdown
Owner

Summary

  • Fix sound override merging bug (missing spread operator in Sounds.tsx)
  • Add check sound support with proper priority ordering: checkmate > capture > check > move
  • Sounds now only trigger on new moves, preventing audio on initial FEN load
  • Scope keyboard controls to focused board by default (multi-board support)
  • Add containerRef option for custom keyboard scoping
  • Ignore keyboard shortcuts when focus is on input/textarea/select/contenteditable elements
  • Use ResizeObserver for responsive promotion menu positioning
  • Fix promotion menu positioning for black orientation
  • Fix deepMergeChessboardOptions using mergeWith instead of merge

Test plan

  • All existing tests pass
  • New tests for sound priority and move detection
  • New tests for keyboard scoping and input element filtering
  • New tests for board container context
  • New tests for array overwrite behavior in deep merge

🤖 Generated with Claude Code

- Fix sound override merging (missing spread operator)
- Add check sound support with proper priority (checkmate > capture > check > move)
- Sounds only trigger on new moves, not on initial FEN load
- Scope keyboard controls to focused board by default
- Add containerRef option for custom keyboard scoping
- Ignore keyboard shortcuts when focus is on input/textarea/select/contenteditable
- Use ResizeObserver for responsive promotion menu positioning
- Fix promotion menu positioning for black orientation
- Fix deepMergeChessboardOptions using mergeWith instead of merge
- Add extensive test coverage for all changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Mar 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 62b9a93

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@react-chess-tools/react-chess-puzzle Patch
@react-chess-tools/react-chess-game Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Mar 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-chess-tools Ready Ready Preview, Comment Mar 10, 2026 10:55pm

@dancamma
dancamma merged commit ea81945 into main Mar 10, 2026
3 checks passed
@dancamma
dancamma deleted the fix/sound-and-keyboard-improvements branch March 10, 2026 22:58
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