Skip to content

Release: staging → main (March 2026)#75

Merged
DIodide merged 17 commits into
mainfrom
staging
Mar 22, 2026
Merged

Release: staging → main (March 2026)#75
DIodide merged 17 commits into
mainfrom
staging

Conversation

@DIodide

@DIodide DIodide commented Mar 22, 2026

Copy link
Copy Markdown
Member

Summary

Promotes the staging branch into main. This is a major release covering game engine architecture, tournament system, developer experience overhaul, and new packages.

Highlights

New Game Engine & Arena System (Beacon Plugin)

  • Bridge, CTF, and PvP game implementations with full match lifecycle (BaseGame → GameRegistry → GameFactory pattern)
  • Arena management — YAML-driven arena configs with schematic loading, spawn points, and boundary definitions
  • Disconnect handling — grace period tracker with configurable reconnect policies
  • Debug commandsTestGame, EndGame, SetArena, SimulateDisconnect/Reconnect, TriggerObjective
  • Match world manager for isolated match worlds
  • ConvexClient + HTTP client refactor — centralized API interaction layer replacing scattered HTTP calls
  • Match telemetry overhaul — richer event output and structured telemetry service

Tournament System (Frontend + Backend)

  • Tournament creation, round-robin bracket views, match detail pages
  • Team management, user profiles with edit flows, image uploads
  • Seed script for development testing
  • Backend: tournaments.ts, tournamentMatches.ts, expanded teams.ts and userProfiles.ts
  • Schema additions for tournament and game_type fields

New Packages

  • @packages/shared — shared TypeScript types, match status enums, HTTP response types, and game-config.json (single source of truth for game constants across TS and Java)
  • @packages/bot-client — Mineflayer bot client library
  • @blockwarriors/sdk — Player SDK with starter bot template
  • @packages/game-tests — End-to-end game test harness with scenario scripts (pvp-1v1, bridge-1v1, ctf-4v4, tournament-flow) and bot scripts (attack, forfeit, rush, defend)

Bot Orchestrator (New App)

  • Full Next.js + Socket.IO app for controlling Mineflayer bots
  • Bot creation, server settings, minimap, entity panel, chat panel
  • Zustand state management with real-time socket updates

Docs Site (Frontend)

  • In-app documentation at /docs — getting started, game rules (PvP, Bridge, CTF), bot API reference, tournament guide, FAQ
  • Sidebar navigation with DocsLayoutClient

Developer Experience & Setup Changes

  • Node requirement bumped to 22 (.nvmrc) — required by minecraft-protocol
  • CI pipeline added (.github/workflows/ci.yml) — runs npm run validate, builds web, backend, bot-orchestrator, and Beacon (with Java 21)
  • .env.example files added for all runtimes (root, next, backend, bot-orchestrator, beacon)
  • .editorconfig + .prettierrc.json + .prettierignore — consistent formatting across the monorepo
  • Root package.json scripts overhaul:
    • dev:web, dev:backend, dev:bot-orchestrator for targeted dev
    • build:web, build:backend, build:shared, build:bot-orchestrator, build:beacon
    • validate = lint + typecheck
    • test:beacon (Maven), test:http, test:game
    • codegen:beacon — generates Java game config from shared JSON
    • deploy:beacon / deploy:beacon:dry-run
    • format:check / format:write
  • Beacon deploy automation (scripts/deploy-beacon.mjs) — build, upload to Pterodactyl, sync config, restart server
  • Beacon game config codegen (scripts/generate-beacon-game-config.mjs) — generates Java constants from packages/shared/constants/game-config.json
  • Supabase removed — all Supabase schemas, migrations, config, and dependencies (@supabase/ssr, @supabase/supabase-js, supabase CLI) removed in favor of Convex
  • Warrior telemetry plugin removed (deprecated)
  • README rewritten with quick start, common commands, and branch flow
  • Docs updated: onboarding.md, contributing.md, stack.md rewritten; new beacon-deploy.md, match-system-architecture.md; supabase.md removed
  • Root .gitignore expanded.next/, dist/, target/, .env, .env.local
  • turbo.json updated for new build targets
  • JIT package pattern for Convex bundler compatibility with shared types
  • Dashboard sidebar now highlights active page

Backend (Convex)

  • HTTP routes refactored with type-safe match update mapping
  • New tournamentMatches.ts and tournaments.ts modules
  • Expanded teams.ts (team CRUD, invites, roster management)
  • Expanded userProfiles.ts and tokens.ts
  • NEXT_PUBLIC_CONVEX_URL added to CI env for web build
  • seed.ts for development data

Setup Changes for Developers

  1. Update Node to v22: nvm install (reads .nvmrc)
  2. Run npm ci to pick up new workspace packages and updated lockfile
  3. Copy env files: each runtime has its own .env.example
  4. Run npm run codegen:beacon if working on the Beacon plugin
  5. Supabase is gone — remove any local Supabase config; the backend is fully Convex now

Test Plan

  • CI passes on this PR (node + beacon jobs)
  • npm run validate passes locally
  • npm run build succeeds for all workspaces
  • Beacon plugin builds with npm run build:beacon
  • Dashboard loads, sidebar active states work
  • Tournament creation and bracket views render correctly
  • Docs site pages load at /docs/*

🤖 Generated with Claude Code

DIodide and others added 17 commits March 12, 2026 23:13
…r-telemetry

Remove deprecated warrior telemetry plugin
Adds a deploy script that replaces the manual panel upload workflow.
Developers can target their own Fast Dev server by name via .env.local.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Bump .nvmrc from 20.9.0 to 20.19.0 to fix CI (@noble/ciphers
  requires >= 20.19.0)
- Add config.yml sync: writes CONVEX_SITE_URL and CONVEX_HTTP_SECRET
  to the server's beacon config after upload
- Add detailed setup instructions for getting API keys and Convex
  settings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Next.js build fails at static generation when ConvexReactClient
has no URL. Set the env var at the job level so build:web succeeds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…automation

feat: Beacon deploy automation with server name resolution
…Beacon plugin

Phase 0 — Beacon rearchitecture:
- Split MatchPollingService (744→393 lines) into MatchInitializer, MatchWorldManager
- Remove all legacy fallback code from MatchPollingService and MatchEventListener
- Wire EntityDamageByEntityEvent through BaseGame.handleDamage()

Phase 0.5 — Public /docs route:
- Add 10-page docs site at /docs with sidebar navigation
- Covers getting started, bot API reference, game rules (PvP, Bridge, CTF),
  tournaments, and FAQ
- Add "Docs" link to landing page navbar

Phase 1 — Player SDK:
- Create @blockwarriors/sdk with Strategy pattern API wrapping BotClient
- Add starter-bot template with single-bot and multi-bot launchers
- Create bot-client and game-tests packages

Phase 2 — Bridge game (1v1):
- Two platforms over void, build across, score by entering enemy goal zone
- First to 5 wins, 5-minute time limit with sudden death

Phase 3 — CTF game (4v4):
- Flag pickup/carry/drop/capture/return mechanics
- 80x80 arena with team bases and mid-field cover
- 5-second respawn, 30-second disconnect grace period
- First to 3 captures wins, 8-minute time limit
- Update CTF config from 5v5 to 4v4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…x match lifecycle

Game tests:
- Add forfeit-based test scenarios for PvP, Bridge, CTF (deterministic, <60s each)
- Add tournament flow test verifying game_type propagation and token counts
- Add process-level error handler for bot keepalive timeouts
- All 4 tests pass: pvp-1v1 (37s), bridge-1v1 (49s), ctf-4v4 (102s), tournament-flow (24s)

Arena building:
- Add WorldEdit 7.4.0 dependency (provided scope) with SchematicLoader utility
- BaseGame.loadArena() tries schematic first, falls back to programmatic generation
- Catch NoClassDefFoundError when WorldEdit not installed on server
- Improve Bridge arena (checkerboard floor, goal arches, pillars)
- Reduce CTF arena from 80x80 to 50x50 with staggered player teleports
- Add simple PvP arena platform at y=64

Tournament flow:
- Add game_type field to tournaments schema
- createTournament accepts gameType parameter (pvp, bridge, ctf)
- createTournamentGame resolves "auto" matchType from tournament's game_type
- Add Game Type selector to tournament creation UI
- Fix hardcoded 'pvp' in tournament match detail page
- Add winner_team_id support to match update API

Match lifecycle fixes:
- Fix match never finishing: Convex HTTP handler was passing undefined fields
- Fix disconnect during countdown ignored: use hasEnded() instead of isActive()
- Fix CTF both-teams-disconnect hanging forever: terminate match
- Store team IDs on MatchManager for winner team resolution
- Increase bot keepalive timeout to 180s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fixes CI lint failure: 'CodeBlock' is defined but never used.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use explicit typed object instead of Record<string, unknown> to satisfy
Convex mutation type constraints while still excluding undefined fields.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tead)

The node CI job doesn't have Java installed, so mvn test fails.
The beacon CI job already runs the full Maven build with tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All CI checks green. Merging to staging for manual verification of docs pages and tournament game type UI before promoting to main.
Use usePathname() to detect the current route and apply a Princeton
Orange accent bar + tinted background to the active nav item, so users
can immediately see which page they're on.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…bar-active-state

feat: highlight active page in dashboard sidebar
@DIodide DIodide merged commit 9c9a6e7 into main Mar 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant