Repository navigation
Conversation
- DAB: add redo feature - player can request undo, immediate opponent accepts/rejects - All games: add player name badges, (You) indicator, prominent turn display - PaperParty landing: paper sketch style with custom SVG game icons, notebook aesthetic - DAB: allow game to continue with 1 player if started with 4+ players - Fix DAB grid layout and lucide icon import (RotateCCW -> Undo2)
The cursor/disabled logic incorrectly marked won grids as dead instead of won. Using macroWinner !== null (instead of === 'DEAD') properly blocks interaction on won grids while keeping them visually distinct from DEAD grids.
Bingo: - currentTurn now stores socket.id (not index) - markNumber validates socket.id match, not index-based lookup - checkForWin uses typeof === 'string' for marked cells - handleCellClick uses typeof to detect marked numbers UTTT: - Backend: activeGrid = null only when next grid is DEAD (not won) - Frontend: isActive is true also when grid is DEAD (free move only on dead) All games: - leaveRoom frontend cleanup on both confirmations
…ks with tests - Add AvatarSelector, CountdownOverlay, GameLayout, MatchReport, TurnIndicator components - Add useGameHandlers, usePlayerAvatars, useTurnTimer hooks - Refactor game managers (bingo, dab, ttt, uttt) with sanitizeRoomId and unified alert pattern - Update existing components (Bingo, DabGame, TicTacToe, UTTTGame, RoomLobby) - Add tests for all new components and hooks, plus server-side tictactoe tests
…env check - Remove duplicate requestRedo, respondRedo, handleDisconnect from dab.js (these exist elsewhere or are inherited from BaseManager) - Escape apostrophes in ErrorBoundary.jsx and UTTTGame.jsx for JSX safety - Replace process.env.NODE_ENV with import.meta.env.DEV for Vite compatibility
- ESLint config with per-package overrides (Node for api, browser+JSX for pro) - Prettier config for consistent formatting - Husky + lint-staged pre-commit hook for lint and format on staged files - GitHub Actions CI workflow running mocha (api) and vitest (pro) - EditorConfig for 2-space indent, LF endings across the monorepo - Kilo code review plan for tracking improvement priorities
Root ESLint (^8.57.0) was never installed in CI — only subdirectory npm ci ran. npx eslint then fetched v10+, which requires flat config. Fix by running npm ci at root before linting. Also add root-level .gitignore with node_modules/.
Job-level defaults.run.working-directory applied to ALL steps, so the first npm ci was running in api/ (or pro/) instead of root. Root node_modules was never installed, causing npx to fetch eslint v10.
…ng-directory - Add missing handleDisconnect method to DabManager (was crashing all tests on socket disconnect) - Fix .github/workflows/ci.yml working-directory paths (removed ambiguous defaults) - Fix 60+ no-unused-vars lint warnings across api/test/ and pro/src/
…disconnect timing - Remove io.close() from shutdown() (server.close() alone is sufficient) - Fix Graceful Shutdown test to disconnect socket before calling shutdown - Add setTimeout(done, 100) to afterEach hooks across all test files - Fix unused variable warning in index.js
Bug 1 (N/A): Only one Leave Room button exists in current source; no changes needed. Bug 2: Remove gameState === 'playing' guard in leaveRoom for all 4 managers (bingo.js, tictactoe.js, uttt.js, dab.js). Non-playing states now properly splice the player, reassign creator if needed, and clean up empty rooms. Bug 3: Move clearTimer before socket emits in bingo.js markNumber to prevent stale timer callback from advancing turn twice after a number is marked. Bug 4: Change room.scores = Array(room.players.length).fill(0) to room.scores = Array(room.maxPlayers).fill(0) in dab.js restartGame, fixing incorrectly sized scores array when a player had left. Bug 5 (re-fix): Re-add DAB auto-start block in dab.js joinRoom after it was accidentally removed. When players.length >= maxPlayers, emit dab_gameStarted and set gameState='playing'. sendRoomInfo must come AFTER auto-start so the roomInfo reflects 'playing' state. Bug 6: Add socketRooms Map to BaseManager with _trackSocket/_untrackSocket helpers. Update all 4 managers' createRoom, joinRoom, reconnect to track; leaveRoom to untrack; handleDisconnect to use socketRooms instead of O(n) iteration over all rooms. Prevents disconnect-ordering bugs across socket.io versions. Bug 7: Change gameState === 'ready' || gameState === 'playing' to gameState === 'waiting' || gameState === 'playing' in TicTacToe.jsx for the Leave Room button visibility, since TTT uses 'waiting' not 'ready'. Bug 8: Add strikedNumbersRef in Bingo.jsx. The roomInfo handler stores strikedNumbers in ref; playerBoard handler applies them when board arrives, fixing loss of striked numbers on reconnection. Bug 9: Add .trim() check in PaperPartyLanding.jsx Swal inputValidator and call setPlayerName(result.value.trim()) to prevent whitespace-only names. Bug 10: Add roomIdRef in GameContext.jsx, updated via useEffect, used in clearRoomId to avoid stale closure over the roomId state. Features: - Add _trackSocket/_untrackSocket helpers to BaseManager with socketRooms Map - Add base-manager.test.js tests for socket tracking and cleanup
…pdated DAB redo logic
- Fix e2e test selectors and async handling across all games - Update DabGame component with improved redo logic and UI fixes - Update TicTacToe component and tests - Update MatchReport component styling - Update API dab test file
- Backend: SOS game manager with board sizes 4-8, SOS pattern detection, scoring, spectator support - Backend: Connect4 game manager with 6x7 board, gravity-based disc dropping, win detection - Frontend: SOSGame component with symbol preselect, board rendering - Frontend: Connect4Game component with framer-motion falling animations - Frontend: Added routes for /sos and /connect4 - Frontend: Added spectator display support to RoomLobby component - Tests: Unit tests for SOS, frontend component tests for both games - Added framer-motion dependency for animations
- Backend: SOS game manager with board sizes 4-8, SOS pattern detection, scoring, spectator support - Backend: Connect4 game manager with 6x7 board, gravity-based disc dropping, win detection - Frontend: SOSGame component with symbol preselect, board rendering - Frontend: Connect4Game component with framer-motion falling animations - Frontend: Added routes for /sos and /connect4 - Frontend: Added spectator display support to RoomLobby component - Tests: Unit tests for SOS, frontend component tests for both games - Added framer-motion dependency for animations
….io-games into feat/sos-connect4
- Fix reconnection bug: set gameState to 'playing' when roomInfo arrives with gameState 'playing' (both SOS and Connect4) - Fix Connect4 board rendering: replace broken absolute positioning with proper grid-based disc placement - Add winLine highlighting for Connect4 winning cells - Fix SOS player-based cell coloring: use cell.player instead of cell.value - Add SOS pattern highlighting with 2s flash animation - Add SOS progress indicator showing move count - Add Connect4 hover preview on column buttons - Update TurnIndicator to support players array with name labels and You indicator - Fix MatchReport to escape apostrophe entities - Remove unused ComingSoonIcon from PaperPartyLanding - Update CORS origins in api/index.js
…nd animations - Add SOS game logic (api/game-logic/sos.js) with custom board sizes (4x4 to 8x8) - Add Connect4 game logic (api/game-logic/connect4.js) with classic 6x7 board - Add frontend components for both games with framer-motion animations - Add spectator support to existing games (Bingo, TTT, UTTT, Dab) - Add ThemeContext and reusable UI components - Add comprehensive test coverage for both games
- Bingo playerLeft event: emit { playerId } instead of raw socket.id
- DAB/Uttt: restore avatarIcon/color in create/join room emits
- Bingo: remove tautological map in numberMarked handler
- Bingo: clear sessionStorage on gameRestarted to prevent stale reconnect data
- TicTacToe: remove unused emptyTimer/forfeitTimer from room object
- DAB: remove unused emptyTimer/forfeitTimer from room object
- Connect4/SOS: replace deprecated onKeyPress with onKeyDown
Fixes test expectations to match new payload format.
- B1: UTTT emit uttt_gameRestarted on restart for event-name consistency - B2: DAB undo payload includes requesterName for frontend display - B3: Timer cleanup on player leave/disconnect (redo timer) - B4: Add settings object to room for uniform lobby customization - B5: Clear lastMove when relevant player disconnects
- Fix GameLayout import depth (../../context/GameContext) - Add ThemeProvider wrappers to all game tests - Fix DabGame UndoUI import and myPlayerIndex bug - Update test expectations for MatchReport (Rematch) and DabPreGame (Start Game) - Export GameContext for test usage - Add UndoUI to components/ui/index.js re-export
- Add DabPreGame lobby component - Add NotificationProvider with sonner toasts - Add PageTransition with framer-motion - Add AvatarSelectorNew with dicebear API integration - Add PlayerAvatar component - Add useAnimationVariants hook - Add zustand avatar store - Add .kilo tool config and plan
Add unified error and reconnection handling across backend game managers and core BaseManager. Introduces BaseManager helpers (onSocketEvent, validateReconnectPayload, onSocketError, handleReconnectFailure), wraps socket handlers to catch and log errors, and standardizes reconnect flows to validate payloads and emit explicit reconnect failure events (room_not_found, player_not_found, game_already_ended). Update per-game managers (bingo, connect4, dab, sos, tictactoe, uttt) to use the new helpers, clear/track timers and socketRooms more safely, re-key per-player state when socket IDs change, and fix related state bugs (e.g. dab: lastClaimedBox -> lastClaimedBoxes). Also adds a high-level implementation plan (.kilo), e2e tests, frontend runtime error helpers and various pro build/component updates to support reconnection/error UX. These changes improve robustness for reconnection edge cases and provide clearer client feedback on failures.
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.
No description provided.