Skip to content

feat(admin): add on-demand game server healthcheck#540

Open
garrappachc wants to merge 14 commits intomasterfrom
feat/game-server-healthcheck
Open

feat(admin): add on-demand game server healthcheck#540
garrappachc wants to merge 14 commits intomasterfrom
feat/game-server-healthcheck

Conversation

@garrappachc
Copy link
Member

Summary

  • Adds an on-demand healthcheck to the admin game servers panel that verifies three things in sequence: RCON connectivity, RCON command execution, and UDP log round-trip
  • Results are shown in real-time via an HTMX-polled modal dialog (500ms polling, stops automatically when done)
  • Healthcheck state is ephemeral (in-memory, 5-min TTL); only available for free/online servers; one concurrent check per server

New files

  • src/static-game-servers/healthcheck-store.ts — in-memory store (Map<checkId, result> + Map<serverId, checkId>) with 5-min TTL cleanup
  • src/static-game-servers/with-rcon-for-server.ts — RCON helper that accepts StaticGameServerModel directly (uses internalIpAddress + Number(port))
  • src/static-game-servers/run-healthcheck.ts — orchestrates the three phases, writes phase updates to the store
  • src/static-game-servers/views/html/healthcheck-modal.tsx — modal fragment rendered by both POST (initial) and GET (poll) responses

Modified files

  • src/routes/admin/game-servers/index.tsindex.tsx — adds POST /:id/healthcheck and GET /healthcheck/:checkId routes
  • src/admin/game-servers/views/html/static-game-server-list.tsx — adds "Health" column with per-server "Check" button and modal swap target

Test Plan

  • All 201 unit tests pass (pnpm test)
  • pnpm build compiles cleanly
  • Admin game servers page shows "Health" column with "Check" buttons
  • Clicking "Check" on a free/online server opens the modal and shows phase progress in real-time
  • Modal shows "✓ All checks passed" or "✗ Check failed" with per-phase details
  • Close button dismisses the modal
  • "Check" button is disabled for offline or game-assigned servers
  • Triggering a check on a server that already has one in-flight returns the existing modal (no duplicate)

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

github-actions bot commented Mar 11, 2026

Playwright test results

passed  196 passed
flaky  1 flaky

Details

stats  197 tests across 29 suites
duration  8 minutes, 57 seconds
commit  454688b

Flaky tests

chromium › 10-queue/09-tracks-online-players.spec.ts › tracks online players @6v6 @9v9

garrappachc and others added 12 commits March 11, 2026 19:24
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds POST /:id/healthcheck and GET /healthcheck/:checkId routes to the
admin game server panel, backed by the in-memory healthcheck store and
runHealthcheck orchestrator.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@garrappachc garrappachc force-pushed the feat/game-server-healthcheck branch from 220bb57 to 49c383b Compare March 11, 2026 18:24
garrappachc and others added 2 commits March 11, 2026 19:28
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant