Homepage now shows only a "Spielen" card (links to /play), public games,
last 3 games as mini-board thumbnails for logged-in users, and live games.
New /play page contains all game-mode cards (create, vs AI, friends,
correspondence, tournament).
Bug fix: /ai page was constructing Chess instances from FEN on every move,
discarding the full PGN history. Switching to loadPgn() preserves all moves
so the saved game can be fully reviewed in the archive.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace header admin link + profile modal with a dropdown menu
- Dropdown contains: profile, settings, admin (admins only), join-game form, logout
- Remove join-game card from homepage for logged-in users (now in dropdown)
- AuthModal now only handles guest/login/register flows
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GET /v1/games/live returns all active games with both players assigned,
including current FEN (computed server-side via chess.js)
- LiveGames component on homepage: mini chessboard tiles (160px) that
auto-refresh every 3s, clickable to join as spectator
- Tournament page: 'Zuschauen' button for non-players on ongoing rounds
(bot vs bot, human vs human, human vs bot all spectatable)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Issue #1 - Bot vs Bot Turnierspiele:
- triggerBotMove ruft sich rekursiv selbst auf wenn der nächste Spieler
auch ein Bot ist (bot vs bot läuft jetzt vollautomatisch durch)
- startNextRoundGames erstellt aktive Spiele für die nächste Runde wenn
eine Runde endet; bot vs bot Spiele starten sofort ohne Spectator
- updateRoundResult gibt jetzt die nächste Runden-Daten zurück statt void
- Alle Handler (sendMove, claimAbandoned, claimTimeout, triggerBotMove)
starten die nächste Runde automatisch
Issue #2 - Bot-Schwierigkeit zu hoch:
- randomChance zu StockfishLevel hinzugefügt: Level 1=80%, 2=50%,
3=15%, 4=3%, 5-6=0% zufällige Züge statt Stockfish-Best-Move
- Gilt sowohl für Socket-Bot-Züge als auch /v1/ai/move REST-Endpoint
Issue #3 - Turnier beenden + Zurück-Button:
- POST /:code/cancel Endpoint (nur Host), setzt status='finished'
- Turnier-Seite: 'Turnier beenden' Button für Host (rot, outline)
- tournamentCode Feld im Game-Typ; wird beim Erstellen von Turnierspielen
gesetzt (inkl. Folgerunden)
- GamePage zeigt '← Zur Turnierübersicht' Link wenn tournamentCode gesetzt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- DB: elo column on user table (default 1200, added via ALTER TABLE IF NOT EXISTS)
- ELO calculated after every game save (K=32, min 100)
- Bots use their fixed ELO values; only human players' ELO changes
- AI page games save with bot name (e.g. 'Holzpferd Heinz') instead of 'Stockfish'
- User profile shows ELO badge below name
- Header shows current ELO for logged-in users (links to profile)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- 5 bot profiles (Holzpferd Heinz to Meister Magnus, ELO 200-1400) in
server/bots.ts and client/bots.ts with emoji + descriptions
- Bot users auto-created in DB on server startup (role='bot')
- AI page replaced difficulty buttons with bot profile cards
- Tournament host can add bots via dropdown (POST /:code/add-bot)
- Bot auto-moves triggered on joinLobby and after each human move
- Fixed clock start order so bot-as-white games initialize correctly
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New InviteFriendsModal component: fetches friends list, sends game
invite via notification socket with per-friend sent confirmation
- Multiplayer (GamePage): invite button below copy link, hidden after game ends
- Correspondence: invite button in waiting-for-opponent card
- Tournament: invite button for joined players while status is waiting
- Invite links use mode-prefixed codes (correspondence/XYZ, tournament/XYZ)
so notification "Beitreten" button navigates to the correct page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix login: role field was missing from session (admin page inaccessible)
- Add onlineUsers map in socket/state.ts to track connected users
- Join personal user:${id} socket room on connect for targeted notifications
- Emit friendRequestReceived/friendRequestAccepted socket events from friends controller
- Add sendGameInvite socket event handler on server
- New NotificationContext: global socket provider for registered users
- New NotificationPanel: bell icon with unread badge and dropdown in header
- Friends page: inline game invite input per friend with sendGameInvite
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Homepage: Grid-Layout mit 3 Karten (Spiel erstellen, KI, Freunde/Beitreten)
statt vertikalem Stack mit Dividers
- CreateGame: kompakteres Styling, auf Deutsch, in Primary-Card integriert
- Einladungslink: APP_URL statt hardcoded ches.su in GamePage und CopyLink
- JoinGame: URL-Parsing für beliebige Domains (nicht nur ches.su)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>