undef-engine 2025-11-14
Decompose monolithic server into modular handlers and add session persistence
119 files · 24,203+ · 2,419-

Server module decomposition

8 files changed
  • game_handlers_judge.py Judge-specific game action handlers extracted from main.py
  • game_handlers_player.py Player-specific game action handlers
  • game_utils.py Shared game utility functions
  • routes.py HTTP route definitions separated from main
  • session_store.py Persistent game session management layer
  • main.py Reduced main.py after handler extraction
  • config.py Improved server configuration module
  • defaults.py Updated server defaults
  • Split server/main.py into separate modules for judge handlers, player handlers, game utils, and routes decouple architectural
    5 files
    • game_handlers_judge.py
    • game_handlers_player.py
    • game_utils.py
    • routes.py
    • main.py
  • Created session_store.py for persistent game session management instantiate behavioral
    1 file
    • session_store.py

Frontend state management and E2E testing

6 files changed
  • GameBoard.tsx Enhanced game board with better state handling
  • Lobby.tsx Improved lobby component
  • RoomList.tsx Updated room list component
  • useWebSocket.ts More robust WebSocket connection management
  • gameStore.ts Richer game state management
  • full-game-5-players.spec.ts Full 5-player end-to-end game flow test
  • Enhanced GameBoard, Lobby, and RoomList components with better state handling streamline internal
    3 files
    • GameBoard.tsx
    • Lobby.tsx
    • RoomList.tsx
  • Improved WebSocket hook with more robust connection management harden internal
    1 file
    • useWebSocket.ts
  • Added full 5-player E2E test spec for complete game flow qualify behavioral
    1 file
    • full-game-5-players.spec.ts

Backend WebSocket and test improvements

4 files changed
  • ws_manager.py Improved WebSocket connection tracking
  • test_models.py Updated model tests
  • ws_client.py WebSocket test client
  • ws_room_prep.py Room preparation test utilities
  • Updated WebSocket manager with improved connection tracking streamline internal
    1 file
    • ws_manager.py
  • Added WebSocket test utilities for integration testing qualify internal
    3 files
    • ws_client.py
    • ws_client_interactive.py
    • ws_room_prep.py