Commit Graph

215 Commits

Author SHA1 Message Date
Claude Chronicler #88
648f577446 fix: Node Health view — remove partial include, inline server-side render 2026-04-14 06:23:24 +00:00
Claude Chronicler #88
a01d7b9d7f feat: Node Health module — NC1 + TX1 thermal and system monitoring
- New route: /admin/node-health (30s auto-refresh)
- Temps via lm-sensors (k10temp + NVMe) displayed in both °C and °F
- RAM and disk progress bars with color thresholds
- Load averages, CPU %, uptime per node
- Nav item added under Operations
- lm-sensors installed on NC1 and TX1

Task #28 | Chronicler #88
2026-04-14 06:21:38 +00:00
Claude
c3af0d51e4 fix: inline card in matrix_body - EJS include not in scope with layout:false 2026-04-13 21:04:01 -05:00
Claude
6eac92cf88 fix: EJS include - use relative path without __dirname 2026-04-14 01:55:43 +00:00
Claude
a950694f67 fix: EJS include path in _matrix_body - use __dirname for partial resolution 2026-04-14 01:54:12 +00:00
Claude (Chronicler #83 - The Compiler)
a193523f31 Server Command Center: add subdomain + Cloudflare provisioning
- Migration: added subdomain, server_ip, server_port columns
- Seed: rewritten with hardcoded identifiers + full subdomain/IP/port data
  from Chronicler #87 audit (no more Pterodactyl API dependency)
- Route: POST /:id/provision-subdomain creates A + SRV records via
  Cloudflare API, saves subdomain to server_config
- Card: subdomain section shows FQDN if provisioned, provision button
  with inline input if not

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:46:27 -05:00
Claude (Chronicler #83 - The Compiler)
d16a525ffc Server Command Center: full build (REQ-2026-04-14)
New files:
- 139_server_config.sql — DB migration for short_name system
- 139_seed_server_config.js — auto-populates 17 servers from Pterodactyl
- src/services/uptimeKuma.js — Socket.IO direct (no npm wrapper)
- src/services/pterodactyl.js — power actions + console commands

Modified files:
- servers.js — 6 new POST routes (short-name, lock, createserver,
  delserver, power, console) + short_name-based channel detection
- _server_card.ejs — full rebuild with command center UI
- _matrix_body.ejs — refactored from 144 lines to 20 (uses partial)
- package.json — added socket.io-client

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 20:37:46 -05:00
Claude (Chronicler #83 - The Compiler)
e21a348b3b v1.0.5: Console fetch fix rolled across all 6 builds
Console /rules now fetches from Discord async (was returning hardcoded
fallback without attempting fetch). DIAG logging kept for observability.
All 6 builds at 1.0.5. CHANGELOG.md, INSTALL.md, ACTIVE_CONTEXT.md updated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:23:44 -05:00
Claude (Chronicler #83 - The Compiler)
98f4f5b82a v1.0.5: Fix console path — was never fetching from Discord
Console /rules hit early return before DIAG logs and before any
Discord fetch. Now fetches async like the player path. DIAG logs
moved before the player/console branch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:14:29 -05:00
Claude (Chronicler #83 - The Compiler)
b4fbfc6adf docs: Update CHANGELOG.md (v1.0.4 entry) + ACTIVE_CONTEXT.md
CHANGELOG now includes diagnostic builds. ACTIVE_CONTEXT reflects
full session state for Chronicler pickup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:10:45 -05:00
Claude (Chronicler #83 - The Compiler)
f23f71ef04 v1.0.4: Diagnostic build — INFO-level logging for config read path
Added [DIAG] logs to RulesCommand (token length, channel, messageId,
isValid) and DiscordFetcher (fetch attempt, raw messageId on failure).
1.20.1 only — for Otherworld debugging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 18:05:26 -05:00
Claude (Chronicler #83 - The Compiler)
29f0127a60 v1.0.3: Fix config read — wrong event bus + section header comments
1.20.1: ModConfigEvent fires on mod bus, not MinecraftForge.EVENT_BUS.
Moved Loading/Reloading to FMLJavaModLoadingContext.getModEventBus().
Added config file header warning about preserving [section] headers.
Debug logging in RulesCommand prints token length + channel at runtime.
All 6 builds bumped to 1.0.3.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:53:28 -05:00
Claude (Chronicler #83 - The Compiler)
60740386ac v1.0.2: Fix config reset — switch from SERVER to COMMON config type
SERVER configs in world/serverconfig/ are tied to the world load/unload
lifecycle, causing Forge to overwrite edited values on every restart.
COMMON configs in config/ load once at startup and persist reliably.

Config location changed:
  firefrostrules: config/firefrostrules-common.toml
  discordrules:   config/discordrules-common.toml

All 6 builds updated (3 firefrostrules + 3 discordrules).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:22:39 -05:00
Claude (Chronicler #83 - The Compiler)
996b59672f v1.0.1: Config reset fix + Loading handler + versioning (all 6 builds)
- Added ModConfigEvent.Loading handler to detect default config on startup
- Warns clearly in logs when bot_token is still YOUR_TOKEN_HERE
- Bumped all 6 builds to 1.0.1 (3 firefrostrules + 3 discordrules)
- Created CHANGELOG.md and INSTALL.md with correct install procedure
- Updated CLAUDE.md with install procedure note
- 1.16.5 uses ModConfig.Loading (different class hierarchy from 1.20.1+)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:06:31 -05:00
Claude (Chronicler #83 - The Compiler)
3197361557 Task #69: Discord Rules mod — generic fork for CurseForge
Fork firefrost-rules into discord-rules with configurable colors,
emoji strip toggle, MIT license, and generic branding. All 3 versions
compiled: 1.21.1 (NeoForge/NC1), 1.20.1 (Forge), 1.16.5 (Forge).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 16:47:34 -05:00
Claude
a65b21570d docs: fix config path in rules-mod CLAUDE.md
Config is in world/serverconfig/ not config/
Applies to all three versions (1.16.5, 1.20.1, 1.21.1)
README in NextCloud also updated.
2026-04-13 18:19:41 +00:00
Claude
c0b6bc5a22 Fix: pending_calibration shows Identify Version button instead of checkmark
Chronicler #85 direct fix (Code unavailable on mobile):
- ModpackAPIController: add pending_calibration flag to serverStatus response
- wrapper.tsx: add pending_calibration to StatusData interface
- wrapper.tsx: render Identify Version button when pending_calibration is true
Replaces false green checkmark for servers needing calibration.
2026-04-13 11:57:52 +00:00
Claude (Chronicler #83 - The Compiler)
cef0d8465e Fix: skip stale DB versions for installer-detected servers without file_id
Installer-method servers had full filenames as current_version (e.g.
"DeceasedCraft_Beta_DH_Edition_5.10.16") which prevented reaching
pending_calibration. Now only uses DB current_version if file_id is
also set (validated) or detection method isn't installer.

Migration clears existing stale rows → pending_calibration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 06:33:57 -05:00
Claude (Chronicler #83 - The Compiler)
27b2744786 Truth File strategy: never seed from latest, calibrate or detect
CheckModpackUpdates:
- Reads .modpack-checker.json Truth File from server filesystem
- Falls back to manifest.json, extracts fileID, writes Truth File
- NEVER seeds current_version from latest API result
- Unknown version → status: pending_calibration (not up_to_date)
- Removed seedCurrentVersion heuristic — replaced with Truth File
- writeTruthFile() helper writes .modpack-checker.json via Wings

ModpackAPIController:
- calibrate() now writes Truth File after DB update
- Persists across server reinstalls and cron runs

wrapper.tsx:
- pending_calibration: shows "Version unknown" + "Identify Version" button
- Ignored servers: muted card with "Resume" button (not hidden)
- Extracted renderCalibrateDropdown() for reuse
- Error state shows message instead of vanishing

Migration:
- Updates existing unknown+detected rows to pending_calibration

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 06:09:05 -05:00
Claude (Chronicler #83 - The Compiler)
0caddef86d Fix async error handling + build.sh copy/inject separation
wrapper.tsx:
- Added error state — shows graceful message instead of silent vanish
- useEffect catch sets error string, not null data
- refresh() catch sets error string, not empty catch
- Error UI shows gray card with message in widget slot

build.sh:
- ALWAYS copies TSX files (even on reinstall — fixes stale component bug)
- Separated copy step from injection step
- ErrorBoundary upgrade path: removes bare <ModpackVersionCard />,
  replaces with wrapped version
- Imports added independently (not as one sed block)
- Renumbered sections for clarity

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 01:31:44 -05:00
Claude (Chronicler #83 - The Compiler)
7e3ffe2577 Fix: clean version extraction + short display names
ModpackApiService: regex extracts semver from CurseForge displayName
  "All the Mods 9-0.1.0" → version: "0.1.0", display_name: full string

Widget: short name + version helpers
  "All the Mods 9 - ATM9" → "ATM9"
  Display: "ATM9 0.1.0 → 1.0.0 ↑" (update) or "✓ ATM9 — 1.0.0" (current)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 01:09:57 -05:00
Claude (Chronicler #83 - The Compiler)
1783055c99 Fix: graceful handling of missing modpack_installations table
- Cron and controller wrap modpack_installations queries in try/catch
- Falls through to egg variable / file detection if table missing
- Added migration with IF NOT EXISTS for fresh installs
- Migration won't drop the table (may be Pterodactyl-owned)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:44:28 -05:00
Claude (Chronicler #83 - The Compiler)
28608e9fa8 Build pipeline hardening: ErrorBoundary, no PHP copies, TS pre-flight
- ErrorBoundary.tsx wraps widget — crashes show fallback, not blank void
- build.sh v1.1.0: removed ALL PHP file copies (Chronicler deploys manually)
- Added set -e / set -u for fail-fast
- Added TypeScript pre-flight check (yarn tsc --noEmit) before build
- Added dynamic Blueprint controller detection via find
- Widget injection now wrapped in <ModpackErrorBoundary>
- Pre-commit PHP lint hook at scripts/pre-commit-hook.sh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:17:30 -05:00
Claude (Chronicler #83 - The Compiler)
dd05a41567 v1.1.0 Priority 3b: zero-click widget with recalibrate + ignore
Widget redesign:
- Zero-click: loads cached status on mount via GET /status (no API calls)
- Shows platform icon + modpack name + version comparison
- Orange background + arrow (current → latest) when update available
- Cyan + checkmark when up to date
- Refresh button triggers manual check
- Calibrate button opens dropdown with last 10 releases
- Ignore button hides non-modpack servers
- Current release highlighted in calibrate dropdown

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:44:21 -05:00
Claude (Chronicler #83 - The Compiler)
b84958c0ee v1.1.0 Priorities 2-5: date seeding, new endpoints, BCC detection
Priority 2 — Date-time seeding:
- fetchFileHistory() for CurseForge, Modrinth, FTB
- seedCurrentVersion() matches release closest to server install date
- Falls back to latest if no history or no install date

Priority 3 — New endpoints:
- GET /servers/{server}/status — zero-click cached status
- GET /servers/{server}/releases — recalibrate dropdown (10 releases)
- POST /servers/{server}/calibrate — save user's version selection
- POST /servers/{server}/ignore — toggle is_ignored flag

Priority 5 — BCC log parsing:
- detectFromBccLog() reads logs/latest.log for BetterCompatibilityChecker
- Extracts modpack name + version from BCC output line
- Skips CHANGE_ME values

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:42:34 -05:00
Claude (Chronicler #83 - The Compiler)
9415c1b984 v1.1.0 Priority 1+2b: file ID comparison + manifest version extraction
- Migration: adds current_file_id, latest_file_id, is_ignored columns
- ModpackApiService: all 4 platforms now return file_id in response
- CheckModpackUpdates: file ID comparison (preferred) with string fallback
- detectCurseForge: extracts manifest['version'] as installed_version
- Cron skips is_ignored servers
- Detection priority: manifest version > egg var > DB record > seed latest

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:38:41 -05:00
Claude (Chronicler #83 - The Compiler)
32e2d726bb Fix: manualCheck now checks modpack_installations + cron cache
Detection priority in manualCheck():
1. Egg variables
2. modpack_installations table (NEW)
3. DaemonFileRepository file scan
4. Cached cron data from modpackchecker_servers (NEW)

Also returns current_version and update_available in response
so the console widget can show version comparison.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:09:23 -05:00
Claude
c545d2409e docs: Add how-version-detection-works.md for BuiltByBit product page
Explains:
- First-run seeding behavior (why everything shows up_to_date initially)
- Manual current version override
- 3-step detection (no egg changes required)
- CurseForge API key requirement
- Check frequency and badge meanings
2026-04-13 04:06:39 +00:00
Claude (Chronicler #83 - The Compiler)
68ee40e89d Fix: seed current_version from latest on first detection
When a server is first detected, current_version is set to latest_version
(the pack was just installed = it's current). On future runs, if the API
returns a newer latest_version, the stored current_version stays and we
detect the update. Also preserves egg variable and existing DB values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 23:04:04 -05:00
Claude (Chronicler #83 - The Compiler)
31f245a1b9 Fix: trim CurseForge API key + add debug logging for 403 diagnosis
Key may have whitespace from dbGet. Added Log::debug with key length
and modpack ID to diagnose the 403.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:57:23 -05:00
Claude (Chronicler #83 - The Compiler)
36800ae7a7 Fix: remove orderBy on modpack_installations — table has no id column
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:52:22 -05:00
Claude (Chronicler #83 - The Compiler)
87d834942a Fix: remove finalized filter, use latest installation per server
Most modpack_installations rows have finalized=0 — filter was excluding
nearly everything. Now takes the most recent installation row regardless
of finalized status.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:48:37 -05:00
Claude (Chronicler #83 - The Compiler)
3b64110f01 Add modpack_installations table as primary detection source
Detection priority now:
1. modpack_installations table (panel's own install data — fastest)
2. Egg variables (MODPACK_PLATFORM/MODPACK_ID)
3. DaemonFileRepository file scan (last resort fallback)

This immediately detects all 19 CurseForge servers on the live panel
without any Wings calls or egg variable configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:41:19 -05:00
Claude (Chronicler #83 - The Compiler)
7ef83fd0a0 Add debug logging, alternate paths, and FTB detection to cron
- CurseForge: tries manifest.json + minecraftinstance.json
- Modrinth: modrinth.index.json (unchanged)
- FTB: version.json with parent ID detection
- All catch blocks now log exception messages for debugging
- Wings connection failures logged explicitly

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:39:50 -05:00
Claude (Chronicler #83 - The Compiler)
698273d636 Implement hybrid auto-detection for modpack cron (Magic & Manual)
- CheckModpackUpdates now scans ALL servers, not just egg-configured ones
- Step 1: egg variables (fastest)
- Step 2: DaemonFileRepository file detection (manifest.json, modrinth.index.json)
- Step 3: mark unconfigured if nothing found
- Respects is_user_overridden flag for manual configs
- New migration adds detection_method + is_user_overridden columns
- Per Gemini hybrid detection consultation (2026-04-06)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:35:24 -05:00
Claude (Chronicler #83 - The Compiler)
4e5ee7e49d Fix: getStatus returns all servers for root admins
accessibleServers() only returns explicitly assigned servers — admins
don't get them on the client API side. Now checks root_admin and
returns all servers for admin users.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:14:30 -05:00
Claude (Chronicler #83 - The Compiler)
0311249938 Add Node version detection + yarn build:production to build.sh
- Node <16 fails fast with helpful error
- Node 17+ gets --openssl-legacy-provider for CSS module compat
- yarn build:production runs automatically after all injections
- Graceful fallback if yarn missing or build fails (admin + console still work)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 22:06:43 -05:00
Claude (Chronicler #83 - The Compiler)
990542abc9 Phase 11D complete, badges deferred to v1.1.0, listings updated
- Moved dashboard badges to "Upcoming v1.1.0" in both BBB listings
- Updated ACTIVE_CONTEXT — all code-side Phase 11 work done
- Waiting on Michael for BBB listings + live panel green light

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:56:43 -05:00
Claude (Chronicler #83 - The Compiler)
bb7728fe0d Fix: add !important to callout backgrounds to override AdminLTE
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:48:47 -05:00
Claude (Chronicler #83 - The Compiler)
705960b61f Fix: callout boxes use dark background with accent border + heading
Dark #1a1a2e background, brand color borders and headings only,
light gray body text. Matches Pterodactyl dark theme.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:44:34 -05:00
Claude (Chronicler #83 - The Compiler)
c0dfc6e186 Fix: force white text on callout boxes for readability
Cyan/orange callout backgrounds need white text and underlined links.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:38:33 -05:00
Claude (Chronicler #83 - The Compiler)
9640505c43 Fix: remove missing settings-notices partial from admin view
Partial doesn't exist in Blueprint beta-2026-01.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:37:41 -05:00
Claude (Chronicler #83 - The Compiler)
bd9a5fcde3 Fix: admin view extends Pterodactyl layout with proper AdminLTE styling
Rewrote view.blade.php to use @extends('layouts.admin'), @section blocks,
AdminLTE box/callout/table classes, and standard Pterodactyl admin chrome.
Replaces custom inline styles with framework components.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:33:06 -05:00
Claude (Chronicler #83 - The Compiler)
fa5fb364c1 Fix: normalize order IDs to uppercase across all MVC endpoints
- LicenseService.php: strtoupper(trim()) before sending to Arbiter
- mvc.js: toUpperCase().trim() on activate, validate, deactivate, webhook
- verifymvc.js: toUpperCase().trim() on /verify-mvc Discord command

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:25:35 -05:00
Claude (Chronicler #83 - The Compiler)
1255c315ee Fix: build.sh overwrites Blueprint's auto-generated admin controller
Blueprint generates its own controller at app/Http/Controllers/Admin/
Extensions/modpackchecker/. Our controller.php with LicenseService DI
now overwrites it during build so the route uses the licensed version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:18:47 -05:00
Claude (Chronicler #83 - The Compiler)
d66ea6212d Phase 11F: BuiltByBit listing drafts — Standard + Professional + changelog
Standard ($14.99): CurseForge, Modrinth, Technic, daily checks, 48h support
Professional ($24.99): + FTB, custom intervals, Discord webhooks, 24h support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:16:03 -05:00
Claude (Chronicler #83 - The Compiler)
83333a47fa Fix: build.sh clears Laravel cache after copying PHP classes
The admin controller was failing because Laravel's DI container had stale
class resolution cache. Added php artisan optimize:clear at end of build.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 21:11:52 -05:00
Claude (Chronicler #83 - The Compiler)
9dd308f0bb Fix: build.sh also copies ModpackApiService.php to app/Services/
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:54:15 -05:00
Claude (Chronicler #83 - The Compiler)
44a304331f Fix: remove */6 from doc comment — PHP parses */ as end-of-comment
Changed cron example from '0 */6 * * *' to '0 0,6,12,18 * * *' to avoid
the */ closing the docblock prematurely and causing a syntax error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:52:19 -05:00
Claude (Chronicler #83 - The Compiler)
34cc2b7110 Fix: build.sh explicitly copies PHP classes to Laravel app/ tree
Blueprint's requests.app merge doesn't create new subdirectories reliably.
build.sh now copies LicenseService, ValidateLicense, CheckModpackUpdates,
and ModpackAPIController directly into app/ during blueprint -install.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 20:48:05 -05:00