Commit Graph

9 Commits

Author SHA1 Message Date
Tran G. (Revernomad) Khoa
d45345a094 feat: fix mods tab, add client/server split, and scaffold server dirs
Mods tab bug fixes:
- mod_manager: fix wrong kwargs in set_enabled_mods, fix scan dir to use
  mods/ subdir instead of server root, migrate old string-list format to
  dict format on read
- service: replace dead server_mods SQL JOIN with get_enabled_mods()
  call through the mod_manager capability; pass is_server_mod to
  build_mod_args
- mods_router: accept list[EnabledModEntry] objects (name + is_server_mod)
  instead of bare strings

Client/server mod split:
- Mods now stored as list[{"name": str, "is_server_mod": bool}]; old
  string-list format auto-migrated on read
- is_server_mod=true routes to -serverMod= arg; false to -mod= arg
- ModList UI: amber Client/Server badge in selected pane; toggle button
  in split-pane selector

Directory scaffold:
- process_config: adds "mods" to dir layout; provides get_dir_readme()
  with per-directory README.txt content
- file_utils: ensure_server_dirs() gains readme_provider kwarg; writes
  README.txt idempotently if absent
- service.create_server: passes readme_provider via hasattr probe
- main.py startup: backfills all existing servers with correct subdirs
  and README files (idempotent)

Docs: API.md and FRONTEND.md updated for new mod schema and types
Test __init__.py files added for pytest discovery
2026-04-20 10:54:56 +07:00
Tran G. (Revernomad) Khoa
bf09a6ed1c fix: fix Arma 3 log discovery and improve config editor UX
- Fix logfiles_router and thread_registry to resolve .rpt log files
  from Path(server["exe_path"]).parent/server/ instead of the languard
  data dir, which never contained log files — log list and live tail
  both now work correctly
- Rewrite get_ui_schema() in config_generator to cover all ~80 fields
  across all 5 sections (server/basic/profile/launch/rcon) with proper
  toggle/select/number/password/tag-list/hidden widgets and labels;
  missions field is hidden (managed by Missions tab)
- Add formatSelectDisplay() to ConfigEditor so select fields show
  descriptive text (e.g. "0 - Never") instead of raw numbers in view mode
- Add ToggleDisplay for boolean fields (Enabled/Disabled with indicator dot)
- Add section tab labels and descriptions to ConfigEditor
- Add MissionList UX hints and dynamic Add/In Rotation button labels
- Add "hidden" to FieldSchema widget union type
- Update API.md, ARCHITECTURE.md, CLAUDE.md, FRONTEND.md, MODULES.md,
  THREADING.md to document log path fix and schema coverage
2026-04-18 15:56:04 +07:00
Tran G. (Revernomad) Khoa
b7d670a91c test: add E2E server-detail tests and fill coverage gaps to 83.9%
- Add Playwright E2E for all 5 UX phases (Config/Missions/Mods/Players/Logs)
  with ServerDetailPage POM and fully mocked API routes
- Add logger.test.ts: dynamic module re-import pattern for level-gating tests
- Add useUpdateServer + useKillServer tests to useServers.test.tsx
- Add CreateServerPage edge cases: non-admin gate, API error handling, step 2 render
- Add auth.store rehydration and null-branch coverage tests
- Update FRONTEND.md, MODULES.md, API.md, README.md to reflect current state
  (167 unit tests, 38 E2E tests, 9 useServers hooks, all UX phases implemented)
2026-04-18 10:24:03 +07:00
Tran G. (Revernomad) Khoa
8bac29fb68 docs: mark phases 3-5 complete, update API/FRONTEND/MODULES/CLAUDE.md 2026-04-17 20:50:19 +07:00
Tran G. (Revernomad) Khoa
fe3bd81cae docs: update API.md, FRONTEND.md, MODULES.md, CLAUDE.md for Phase 1 and 2 completion
- API.md: add GET /config/schema endpoint docs; add GET|PUT /missions/rotation endpoints;
  fix mission response shape (name/filename/size_bytes/terrain); mark Phase 1+2 as done
- FRONTEND.md: add TagListEditor, useServerConfigSchema, useServerMissionRotation,
  useUpdateMissionRotation; update Mission/Mod type notes; remove planned hooks now live
- MODULES.md: update config_generator and missions_router descriptions
- CLAUDE.md: mark Phase 1 and 2 as Done
2026-04-17 20:35:39 +07:00
Tran G. (Revernomad) Khoa
e71dd9a600 docs: update root .md files to reflect current frontend state and planned UX enhancements
- ARCHITECTURE.md: fix diagram (Server Detail was "planned", now complete), expand
  frontend directory listing with all 5 pages, all server components, all hooks
- FRONTEND.md: note planned terrain/display_name/workshop_id fields on Mission/Mod
  types; add planned hooks table for Phases 1-5 of UX enhancement plan
- MODULES.md: annotate PlayerRepository with get_by_slot() and ThreadRegistry with
  get_rcon_client() as planned additions in Phase 4
- API.md: add "Upcoming Endpoints" section documenting all planned routes for
  Phases 1-5 of the UX enhancement plan
- README.md: update unit test count (69 → ~120), update frontend structure comment
  to list all current pages/components/hooks
2026-04-17 15:50:33 +07:00
Tran G. (Revernomad) Khoa
6511353b55 feat: implement full backend + frontend server detail, settings, and create server pages
Backend:
- Complete FastAPI backend with 42+ REST endpoints (auth, servers, config,
  players, bans, missions, mods, games, system)
- Game adapter architecture with Arma 3 as first-class adapter
- WebSocket real-time events for status, metrics, logs, players
- Background thread system (process monitor, metrics, log tail, RCon poller)
- Fernet encryption for sensitive config fields at rest
- JWT auth with admin/viewer roles, bcrypt password hashing
- SQLite with WAL mode, parameterized queries, migration system
- APScheduler cleanup jobs for logs, metrics, events

Frontend:
- Server Detail page with 7 tabs (overview, config, players, bans,
  missions, mods, logs)
- Settings page with password change and admin user management
- Create Server wizard (4-step; known bug: silent validation failure)
- New hooks: useServerDetail, useAuth, useGames
- New components: ServerHeader, ConfigEditor, PlayerTable, BanTable,
  MissionList, ModList, LogViewer, PasswordChange, UserManager
- WebSocket onEvent callback for real-time log accumulation
- 120 unit tests passing (Vitest + React Testing Library)

Docs:
- Added .gitignore, CLAUDE.md, README.md
- Updated FRONTEND.md, ARCHITECTURE.md with current implementation state
- Added .env.example for backend configuration

Known issues:
- Create Server form: "Next" buttons don't validate before advancing,
  causing silent submit failure when fields are invalid
- Config sub-tabs need UX redesign for non-technical users
2026-04-17 11:58:34 +07:00
Tran G. (Revernomad) Khoa
b17d199301 fix: address design review ACT NOW items (6 risk gaps)
- Add migrate_config() to ConfigGenerator protocol for schema version upgrades
- Add per-server operation lock to ProcessManager to prevent start/stop races
- Add busy_timeout retry/backoff strategy (exponential: 1s, 2s, 4s) for DB lock exhaustion
- Add ConfigForm testing strategy and error boundary for malformed schemas
- Add schema cache invalidation on adapter version change
- Add ConfigMigrationError to typed adapter exceptions
2026-04-16 17:29:19 +07:00
Tran G. (Revernomad) Khoa
624d7594e2 feat: multi-game adapter revamp, council protocol merge, and frontend design doc
- Revamp architecture for modular game server support (Arma 3 first, extensible)
- Merge ConfigSchema into ConfigGenerator per council decision (8→7 protocols)
- Add has_capability() method to GameAdapter protocol for explicit capability probing
- Add FRONTEND.md: production-grade dark neumorphism design with amber/orange palette
- Update all docs (ARCHITECTURE, MODULES, DATABASE, API, IMPLEMENTATION_PLAN, THREADING)
  to reflect protocol merge and multi-game adapter patterns
2026-04-16 17:05:04 +07:00