docs: finalise Arma 3 UX enhancement plan and update project docs
- .claude/plan/arma3-ux-enhancement.md: full plan review pass
- Add Progress Tracker table for session handoff
- Fix Phase 1 field names to match ServerConfig model (password_admin,
battleye, disable_von)
- Fix Phase 2 rotation endpoints to use ServerService(db) inline pattern
- Fix Phase 4 router/service: add get_by_slot() to PlayerRepository,
add get_rcon_client() to ThreadRegistry, fix BanRepository.create()
signature (expires_at not duration_minutes), correct router pattern
- Fix Phase 6: already implemented, mark as SKIP
- Fix CSS class names: btn-secondary→btn-ghost, input-base→neu-input
- Add 19 implementation decisions from Q&A session to Coding Conventions
- CLAUDE.md: update status table, type mapping table, add plan summary
and new endpoint list, add key implementation gotchas section
- frontend/README.md: replace Vite boilerplate with project README
- frontend/tests-e2e: E2E test improvements from previous session
(mock-based login error test, full dashboard mock coverage)
This commit is contained in:
46
CLAUDE.md
46
CLAUDE.md
@@ -30,26 +30,55 @@ FastAPI + SQLite backend, React 19 + TypeScript + Vite frontend. See ARCHITECTUR
|
||||
### Backend: Fully implemented (42+ endpoints)
|
||||
All routers, services, repositories, game adapter system, WebSocket, background threads, and scheduled cleanup are complete.
|
||||
|
||||
### Frontend: Mostly implemented
|
||||
### Frontend: Fully implemented (baseline)
|
||||
|
||||
| Route | Status | Notes |
|
||||
|-------|--------|-------|
|
||||
| `/login` | Complete | Zod + react-hook-form validation |
|
||||
| `/` | Complete | Dashboard with server grid |
|
||||
| `/` | Complete | Dashboard with server grid + Start/Stop/Restart quick actions |
|
||||
| `/servers/:id` | Complete | 7-tab detail page (overview, config, players, bans, missions, mods, logs) |
|
||||
| `/servers/new` | Complete | 4-step wizard with per-step validation via `trigger()` |
|
||||
| `/settings` | Complete | Password change + admin user management |
|
||||
|
||||
### Frontend Type Mapping (API → Frontend)
|
||||
|
||||
Types below reflect the **current** API shape. Fields marked `(planned)` will be added during the UX enhancement plan.
|
||||
|
||||
| API Resource | Frontend Type | Key Fields |
|
||||
|---|---|---|
|
||||
| Server (enriched) | `Server` in useServers.ts | `game_port`, `current_players`, `max_players`, `cpu_percent`, `ram_mb` |
|
||||
| Mission | `Mission` in useServerDetail.ts | `name`, `filename`, `size_bytes` |
|
||||
| Mod | `Mod` in useServerDetail.ts | `name`, `path`, `size_bytes`, `enabled` |
|
||||
| Mission | `Mission` in useServerDetail.ts | `name`, `filename`, `size_bytes`, `terrain` *(planned)* |
|
||||
| Mod | `Mod` in useServerDetail.ts | `name`, `path`, `size_bytes`, `enabled`, `display_name` *(planned)*, `workshop_id` *(planned)* |
|
||||
| Ban | `Ban` in useServerDetail.ts | `id`, `server_id`, `guid`, `name`, `reason`, `banned_by`, `banned_at`, `expires_at`, `is_active`, `game_data` |
|
||||
| Player | `Player` in useServerDetail.ts | `id`, `slot_id`, `name`, `guid`, `ip`, `ping` |
|
||||
|
||||
### Upcoming: UX Enhancement Plan
|
||||
|
||||
**Plan file:** `.claude/plan/arma3-ux-enhancement.md` — approved, ready to implement.
|
||||
|
||||
| Phase | Feature | Status |
|
||||
|-------|---------|--------|
|
||||
| 1 | Config field UI widgets (textarea/toggle/select/tag-list per field) | Pending |
|
||||
| 2 | Mission rotation table + multi-file upload | Pending |
|
||||
| 3 | Mod display names (mod.cpp) + split-pane selector | Pending |
|
||||
| 4 | Player Kick/Ban from Players tab via RCon | Pending |
|
||||
| 5 | Historical log file browser + live log level filter | Pending |
|
||||
|
||||
**New endpoints added by the plan:**
|
||||
- `GET /api/servers/{id}/config/schema` — per-field widget hints
|
||||
- `GET|PUT /api/servers/{id}/missions/rotation` — mission rotation
|
||||
- `POST /api/servers/{id}/players/{slot_id}/kick`
|
||||
- `POST /api/servers/{id}/players/{slot_id}/ban`
|
||||
- `GET /api/servers/{id}/logfiles`
|
||||
- `GET /api/servers/{id}/logfiles/{filename}/download`
|
||||
- `DELETE /api/servers/{id}/logfiles/{filename}`
|
||||
|
||||
**New backend additions:**
|
||||
- `Arma3ConfigGenerator.get_ui_schema()` — widget schema per config field
|
||||
- `PlayerRepository.get_by_slot()` — lookup player by slot_id
|
||||
- `ThreadRegistry.get_rcon_client()` — expose live RCon client for kick/ban
|
||||
- `RPTParser.list_log_files()` / `get_log_file_path()` — historical log access
|
||||
|
||||
## Test Commands
|
||||
|
||||
```bash
|
||||
@@ -62,8 +91,9 @@ cd frontend && npx tsc --noEmit
|
||||
# Backend (no test suite yet)
|
||||
```
|
||||
|
||||
## Future Enhancements (user requested)
|
||||
## Key Implementation Notes
|
||||
|
||||
- Config sub-tab redesign for user-friendliness (non-technical users)
|
||||
- "Choose mission" button that auto-selects mission for server config
|
||||
- Mission rotation management
|
||||
- `BanRepository.create()` takes `expires_at` (ISO string), not `duration_minutes` — convert in service
|
||||
- `slot_id` is stored as a string in the `players` table — cast with `str(slot_id)` in queries
|
||||
- Config field names in `ServerConfig` Pydantic model: `password_admin` (not `admin_password`), `battleye` (not `battle_eye`), `disable_von` (not `von`)
|
||||
- Log directory defaults to `ARMA3_LOG_DIR` env var, falls back to `{server_dir}/logs`
|
||||
Reference in New Issue
Block a user