Skip to content

Fix camera move tracking and redesign mobile overlay UI - #5

Merged
Pyrexus merged 5 commits into
mainfrom
fix/mobile-camera-coach
Nov 24, 2026
Merged

Pyrexus merged 5 commits into
mainfrom
fix/mobile-camera-coach

Conversation

@Pyrexus

@Pyrexus Pyrexus commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Camera scans could invent piece types, alter kings to repair an illegal position, and suppress the next move after an unchanged or failed analysis. The new detector calibrates a standard starting layout or an exact supplied FEN, then tracks legal moves while preserving piece identities and side to move. Cached results retain the full suggestion, and uncertain frames clear stale arrows.

The redesigned mobile-first UI keeps the camera/photo, detected boundary, move arrow, and plain-language move in one 1:1 frame. It adds automatic orientation, camera switching, manual corner alignment, reliable request cancellation, and clear setup/connection states. Railway serves the frontend and API from one deployment; duplicated frontend files have been removed.

Recognition boundary: arbitrary midgame piece types require one exact FEN setup. This implementation measures color and occupancy rather than claiming a trained physical-piece classifier. Starting positions calibrate automatically, and subsequent scans can track one or two legal moves between frames.

Validation:

  • 85 backend tests passed, including perspective/letterbox geometry, legal move tracking, castling, en passant, promotion ambiguity, FEN legality, caching, and engine fallback.
  • 5 overlay geometry/API-origin tests passed.
  • 10 Chrome browser tests passed at mobile/tablet/desktop widths, including camera permission races, stale responses, opponent turns, auto orientation, empty boards, demo switching, and local backend integration.
  • Added GitHub Actions to repeat the suites with Stockfish and upload rendered screenshots.

Railway deployment b90be769-8de2-42bc-b61a-e51093ad04eb completed successfully. The deployed HTTPS UI passed the Chrome overlay smoke test. Live API camera-image verification with Stockfish passed starting-board lock, a cached repeat suggestion, e2e4 advancing to the opponent's turn, and e7e5 producing the next legal suggestion. Responses in that run took approximately 640–781 ms including network time. GitHub regression CI passed: https://github.com/Pyrexus/Chess-machine/actions/runs/45463925401.

Live app: https://backend-production-e51676e6.up.railway.app/

Real physical sets and lighting can still require overhead framing or one-time calibration. The live image verification used synthetic camera fixtures; it does not establish universal physical-piece recognition accuracy.

@Pyrexus
Pyrexus merged commit bb6667d into main Nov 24, 2026
2 checks passed
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