Skip to content

feat: implement React-based ChessBoard to replace legacy ChessClient in LessonOverlay - #86

Merged
F-Hejazi merged 5 commits into
mainfrom
feature/chess-client-integration
Oct 8, 2025
Merged

F-Hejazi merged 5 commits into
mainfrom
feature/chess-client-integration

Conversation

@F-Hejazi

@F-Hejazi F-Hejazi commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator

This work introduces a fully React-based ChessBoard component and integrates it into LessonOverlay, replacing the previous iframe-dependent ChessClient setup.

Key changes:

  • Removed iframe and postMessage logic
  • Added prop-based callbacks (onMove, onReset, onPromote) for interaction with LessonOverlay
  • ChessBoard component handles move validation, undo, pawn promotion, and visual feedback using chess.js
  • Integrated game status notifications (check, checkmate, draw)
  • Exposed board orientation, reset, and lesson move tracking via useImperativeHandle

This implementation lays the foundation for future integrations, including live mentor-student gameplay and real-time lesson progress tracking.

@khushita28 khushita28 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this refactor. The ChessBoard integration feels smooth and way cleaner than the old iframe setup. The hooks make the logic easy to follow, and the state handling looks solid.

@F-Hejazi
F-Hejazi merged commit 53b8e23 into main Oct 8, 2025
1 check passed
@F-Hejazi
F-Hejazi deleted the feature/chess-client-integration branch October 8, 2025 14:07
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