docs: ACTIVE_CONTEXT — Server Command Center code complete

Full build inventory, deploy steps for Michael, session history.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude (Chronicler #83 - The Compiler)
2026-04-13 20:48:38 -05:00
parent a193523f31
commit 441dac4a54

View File

@@ -1,48 +1,63 @@
# Code Status Update
**Last Updated:** 2026-04-13 18:10 CDT
**Last Updated:** 2026-04-14 19:30 CDT
## Current Focus
Server Command Center (REQ-2026-04-14) — Arbiter feature build.
Server Command Center — CODE COMPLETE, ready for deploy.
## Session Summary (2026-04-13)
## Session Summary (2026-04-14)
### Server Command Center — CODE COMPLETE ✅
Full Arbiter feature build for REQ-2026-04-14.
**New files:**
- `migrations/139_server_config.sql` — server_config table (short_name, subdomain, IP, port)
- `migrations/139_seed_server_config.js` — 18 servers with hardcoded identifiers from Chronicler #87 audit
- `src/services/uptimeKuma.js` — Socket.IO direct (connect → login → CRUD → disconnect)
- `src/services/pterodactyl.js` — power actions, console commands, resource monitoring
**Modified files:**
- `src/routes/admin/servers.js` — 8 POST routes: set-short-name, lock, createserver (partial), delserver, power, console, provision-subdomain, plus existing sync/toggle
- `src/views/admin/servers/_server_card.ejs` — full rebuild: short name management, subdomain display + Cloudflare provisioning, Discord 5-channel detection, power controls
- `src/views/admin/servers/_matrix_body.ejs` — refactored from 144 lines to 20 (uses `_server_card` partial)
- `package.json` — added `socket.io-client`
**Key features:**
- `short_name` system replaces broken slug derivation for Discord channel detection
- Partial channel creation: createserver only creates missing channels (Farm Crossing 6 only needs -status)
- Cloudflare DNS provisioning: A record + SRV record via API (3 servers still need provisioning)
- Uptime Kuma: Socket.IO direct with username/password auth (no npm wrapper)
- Power controls: start/stop/restart via Pterodactyl client API
**Deploy steps (for Michael):**
1. `npm install` (adds socket.io-client)
2. `psql -f migrations/139_server_config.sql`
3. `node migrations/139_seed_server_config.js`
4. Add to `.env`: `UPTIME_KUMA_USERNAME`, `UPTIME_KUMA_PASSWORD`
5. Restart Arbiter
## Previous Session (2026-04-13)
### Task #69: Discord Rules CurseForge Fork — DONE ✅
- Forked `firefrostrules``discordrules` (generic, MIT license)
- Package: `com.firefrostgaming.rules``com.discordrules`
- Removed Fire/Frost/Arcane color detection → configurable `header_color`/`body_color`
- Emoji strip gated by `strip_emojis` config toggle
- All 3 versions compiled (1.21.1 NeoForge on NC1, 1.20.1 + 1.16.5 Forge locally)
- All 6 builds at v1.0.5 (3 firefrostrules + 3 discordrules)
- CurseForge project page copy pending from Chronicler
### Rules Mod Config Bug — FIXED ✅
- v1.0.5: All 6 builds working. DIAG logging kept for observability.
- WORKING on Otherworld. Ready for CurseForge submission.
- v1.0.5: Console fetch fix, COMMON config type, correct event bus, DIAG logging
- WORKING on Otherworld
### Server Command Center — IN PROGRESS 🔧
- Migration: `139_server_config.sql` — server_config table with short_name system
- Seed: `139_seed_server_config.js` — auto-populates 17 servers from Pterodactyl API
- Services: `uptimeKuma.js` (Socket.IO direct), `pterodactyl.js` (power/commands)
- Routes: 6 new POST endpoints (set-short-name, lock, createserver, delserver, power, console)
- Views: `_server_card.ejs` rebuilt with full command center UI, `_matrix_body.ejs` refactored to use partial
- Discord detection: uses `short_name` from DB instead of broken slug derivation
- Partial channel creation: createserver only creates missing channels
- **Status:** Code complete, needs deploy testing. Chronicler needs to add `UPTIME_KUMA_USERNAME` and `UPTIME_KUMA_PASSWORD` to `.env`.
### Bridge — WORKING ✅
- Both directions confirmed
- Queue clear
### Bridge Queue — CLEAR ✅
- All REQs have matching RES files
- Bridge confirmed working both directions (push + pull)
- Chronicler was missing `git push` after writing bridge files — fixed
## ModpackChecker Status (from previous session)
## ModpackChecker
- Phase 11 COMPLETE on Dev Panel
- v1.1.0 deploy blocked on CurseForge API rate limit (resets 2026-04-14)
- v1.1.0 deploy blocked on CurseForge API rate limit
- Waiting on Michael for BuiltByBit listings + resource IDs
## Build Router
- `ffg-build.sh` deployed at `/opt/mod-builds/ffg-build.sh`
- Routes 1.21.1 builds to NC1 (Vineflower RAM), others build locally
- SSH key: `/opt/mod-builds/ffg_build_rsa`
- NC1 user: `ffg-builder` — non-root, isolated
- `ffg-build.sh` at `/opt/mod-builds/ffg-build.sh`
- Routes 1.21.1 to NC1, others local
- NC1 user: `ffg-builder`
## Discipline Notes
- CHANGELOG.md updated with every version bump (including diagnostic builds)