Repository navigation
Fix camera move tracking and redesign mobile overlay UI - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Railway deployment
b90be769-8de2-42bc-b61a-e51093ad04ebcompleted 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,e2e4advancing to the opponent's turn, ande7e5producing 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.