## Major Features Added - **🎛️ Complete Admin Dashboard**: Real-time player monitoring with detailed stats - **👥 Player Management**: Individual and mass player kicking with proper notifications - **🎯 Global Round Control**: Advance/retreat rounds across all rooms simultaneously - **⏸️ Game Control**: Pause/resume games from admin interface - **🔔 Client Notifications**: Players receive alerts for kicks and round changes ## Technical Improvements - **🏗️ Official Colyseus API**: Replaced global variable hacks with `matchMaker.query()` and `matchMaker.remoteRoomCall()` - **📡 Proper Client Communication**: Implemented broadcast messages for `adminKicked`, `gamePaused`, `gameResumed`, `roundChanged` - **🎮 Enhanced GameRoom Methods**: Added `pauseGame()`, `resumeGame()`, `advanceRound()`, `previousRound()`, `_forceClientDisconnect()`, `_forceDisconnectAllClients()`, `getInspectData()` ## UI/UX Enhancements - **📊 Detailed Player Info**: Name, room, role, producer type, and current tokens (🦃☕🌽) - **🚫 Proper Kick Notifications**: Clients auto-redirect to home with clear messaging - **🎨 Improved Admin Interface**: Better organized controls for non-technical commentators - **📱 Responsive Design**: Works well on different screen sizes ## Bug Fixes - **🔧 Fixed Admin Service URLs**: Now correctly calls Colyseus server (port 2567) instead of admin server (port 3001) - **✅ Mass Kick Notifications**: All players receive proper notifications when expelled en masse - **🔄 Auto-redirect**: Kicked clients properly return to home screen ## Architecture - **🏗️ Clean API Design**: All admin endpoints use official Colyseus patterns - **🔒 Type Safety**: Maintained TypeScript sync between server and clients - **📦 Microservices Ready**: Separated concerns between game server and admin interface **Breaking Changes:** None - fully backward compatible **Migration:** No migration needed
40 lines
1.5 KiB
Markdown
40 lines
1.5 KiB
Markdown
# TODO - SnatchGame
|
|
|
|
## Problemas Técnicos Pendientes
|
|
|
|
### TypeScript - Tipos en Game.vue
|
|
**Problema:** Se tuvo que usar `any` en Game.vue para el prop `gameClient` debido a incompatibilidades de tipos entre Vue y la clase GameClient.
|
|
|
|
**Archivo afectado:** `client/src/components/Game.vue`
|
|
```typescript
|
|
const props = defineProps<{
|
|
gameClient: any // TEMPORAL - debería ser GameClient
|
|
}>()
|
|
```
|
|
|
|
**Causa:** Vue está infiriendo mal el tipo de GameClient cuando se pasa como prop/emit, causando errores como:
|
|
```
|
|
Type 'GameClient' is missing the following properties from type 'GameClient': client, room
|
|
```
|
|
|
|
**Solución pendiente:**
|
|
- Investigar la causa raíz del problema de inferencia de tipos
|
|
- Posiblemente usar una interface en lugar de clase
|
|
- O definir tipos de props más explícitos
|
|
|
|
**Prioridad:** Media (funciona pero no es tipo-seguro)
|
|
|
|
### Admin API - Métodos pauseGame y resumeGame
|
|
**Problema:** Los endpoints `/api/admin/pause-game` y `/api/admin/resume-game` usan `matchMaker.remoteRoomCall` para llamar métodos que no existen en GameRoom.
|
|
|
|
**Archivos afectados:**
|
|
- `server/src/app.config.ts` - Endpoints que llaman a `pauseGame` y `resumeGame`
|
|
- `server/src/rooms/GameRoom.ts` - Falta implementar los métodos
|
|
|
|
**Solución pendiente:**
|
|
- Implementar método `pauseGame()` en GameRoom.ts
|
|
- Implementar método `resumeGame()` en GameRoom.ts
|
|
- Los métodos deben modificar `gamePhase` en el estado del juego
|
|
- Agregar logs apropiados para debugging
|
|
|
|
**Prioridad:** Alta (endpoints fallarán hasta que se implemente) |