Commit Graph

67 Commits

Author SHA1 Message Date
Stefan d83387debc feat: Improve move history table UX
- Remove auto-scroll to prevent page jumping when moves are added
- Add evaluation change column (Eval Δ) showing centipawn change per move
- Color-code evaluation changes (green=good, red=bad) based on player color
- Use moveHistory state instead of chess.js history for richer data display
- Keep chess board in view as primary focus
2025-11-25 19:34:52 +01:00
Stefan 35df6e145f fix: Handle undefined evaluation score in hint request
- Fix second instance of evaluation.score comparison
- Ensures production build completes successfully
2025-11-25 19:16:26 +01:00
Stefan 95bbb7bf7c fix: Handle undefined evaluation score in Tutor component
- Add proper null check for evaluation.score before comparison
- Prevents TypeScript build error in production build
2025-11-25 19:12:59 +01:00
Stefan cd6cab367a Add unified FEN/PGN import with auto-detection
- Create chessFormatDetector utility for automatic format detection
- Update StartScreen with textarea supporting both FEN and PGN input
- Add real-time format detection with visual feedback indicators
- Update translations for all 4 languages (EN, DE, FR, IT)
- Add markdown rendering for Tutor chat messages
- Add comprehensive tests for format detection (20 tests)
- Update game initialization to handle both FEN and PGN formats

This completes the fix/stale-analysis-data branch with:
- Fixed stale evaluation data in hint/best move requests
- Clarified AI's dual role (opponent + tutor) to prevent hint rejection
- Stored complete evaluation history (P0, P1, P2) for all moves
- Improved end-game analysis with better mistake detection
- Fixed duplicate analysis runs with useRef flag
- Added markdown rendering for formatted analysis output
- Added unified FEN/PGN import with auto-detection
2025-11-25 17:54:25 +01:00
google-labs-jules[bot] 4d5ec5ecc3 fix(analysis): Ensure fresh evaluation for hints and analysis
This commit fixes a bug where the AI tutor and end-game analysis would use stale data from previous evaluations.

The `Tutor` component now receives the live `game` instance and has a new function, `evaluateCurrentPosition`, which is called on-demand when a user requests a hint or the best move. This ensures the LLM receives up-to-date information.

The end-game analysis was also corrected to use the proper evaluation data when constructing the move history, preventing incorrect analysis of mistakes and blunders.

The test suite was improved by restoring deleted tests, adding a new test to verify the fix, and making existing tests more robust.
2025-11-25 13:15:49 +00:00
Stefan 1dd54e8937 fixes 2025-11-24 17:53:48 +01:00
Stefan b923f68841 sounds + layout 2025-11-24 16:12:58 +01:00
Stefan 1f2300e476 footer 2025-11-23 20:56:30 +01:00
Stefan c5b763d646 tag fix 2025-11-23 17:55:11 +01:00
Stefan 0aa4370f64 bug fixes and first try of github docker 2025-11-23 16:43:47 +01:00
Stefan 74016f08c6 docker compose fix 2025-11-23 13:47:55 +01:00
Stefan 2383960cdb i18n files 2025-11-23 13:37:43 +01:00
Stefan a4a42488bb i18n 2025-11-23 13:36:10 +01:00
Stefan ad104f2c31 screenshots 2025-11-23 11:58:27 +01:00
Stefan 8a6d6bd780 game ready 2025-11-23 11:44:05 +01:00
Stefan 30f1e9e3a5 working app 2025-11-23 10:51:00 +01:00
Stefan f6480a43c6 Initial commit from Create Next App 2025-11-22 10:57:29 +01:00