Commit Graph

11 Commits

Author SHA1 Message Date
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)
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)
b0aa52c2c8 fix(blueprint): Review fixes — API key lookup, tier enforcement, safety
Fixes 10 issues from Blueprint extension code review:
- CurseForge API key now reads via Blueprint dbGet() matching admin save
- PRO-tier fields (webhook, interval) enforced server-side, not just UI
- json_decode results validated before accessing parsed data
- Null user guard on getStatus() endpoint
- 429 response uses consistent error key format
- Modrinth slug derivation strips special chars, documented as fallback
- Check interval dropdown reflects saved value
- API key input changed to password type
- TypeScript error typing narrowed from any to unknown
- Removed unused DB import from ModpackApiService

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-12 13:53:37 -05:00
Claude (Chronicler #63)
05d2164dce fix(modpackchecker): Console card redesign - StatBlock style + short errors
wrapper.tsx complete rewrite:
- Matches Pterodactyl StatBlock styling exactly
- Uses col-span classes for proper grid layout
- Icon with status color (orange=update, cyan=current, gray=idle)
- Clickable card instead of separate button
- Short error codes for better UX:
  - 'Not configured' (no modpack variables)
  - 'Wait 60s' (rate limited)
  - 'Not found' (404)
  - 'API error' (general failure)
  - 'Check failed' (long error truncated)

build.sh:
- Injects into AfterInformation.tsx (right column)
- Card appears after Network stats

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 12:32:41 +00:00
Claude (Chronicler #63)
c160647f0b fix(modpackchecker): Move card to right column, match StatBlock style
build.sh:
- Changed injection from ServerConsoleContainer to AfterInformation.tsx
- Card now appears in right column after Network stats

wrapper.tsx:
- Redesigned to match Pterodactyl StatBlock aesthetic
- Uses Tailwind classes (bg-gray-600, rounded, etc.)
- FontAwesome cube icon with status colors
- Compact layout: title + Check button on one line
- Fire (#FF6B35/orange-400) for updates, Frost (#4ECDC4/cyan-400) for current

Fixes layout issue identified in Wizard review.

Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 12:21:19 +00:00
Claude (Chronicler #63)
5a607c8c8b refactor(modpackchecker): Batch 3+4 fixes - frontend, admin, docs
BATCH 3 - Frontend & UI:

wrapper.tsx (Console Widget):
- FIXED: API URL from .../ext/modpackchecker/check to .../check
- Added 429 rate limit handling with user-friendly message

UpdateBadge.tsx (Dashboard Badge):
- Added 60-second TTL to global cache (was infinite)
- Prevents stale data during client-side navigation

admin/view.blade.php:
- Disabled Discord webhook field (PRO TIER badge)
- Disabled Check Interval field (PRO TIER badge)
- Added support callout linking to Discord

BATCH 4 - Documentation:

README.md:
- Fixed architecture diagram (server_uuid, status string)
- Added app/Services/ModpackApiService.php to file structure
- Fixed API endpoint URLs throughout
- Updated installation for BuiltByBit (.blueprint package)
- Updated 'Adding New Platform' instructions for Service pattern
- Added Support section with Discord link
- Changed license to explicit commercial terms

NEW: CHANGELOG.md
- Version history for future updates
- Documents v1.0.0 features

Reviewed by: Gemini AI (Architecture Consultant)
Signed-off-by: Claude (Chronicler #63) <claude@firefrostgaming.com>
2026-04-06 11:47:20 +00:00
Claude (Chronicler #62)
1eda8894d5 fix: ModpackChecker Phase 3 complete - working end-to-end pipeline
PHASE 3 COMPLETE - All systems operational on Dev Panel

Changes:
- Renamed controllers/ to Controllers/ (PSR-4 case sensitivity fix)
- Updated namespace to use capital C in Controllers
- Fixed getEggVariable() method to use correct Pterodactyl model structure
  - Changed from whereHas('variable'...) to direct where('env_variable'...)
  - Changed return from variable_value to server_value
- Updated routes/client.php with correct namespace
- Updated wrapper.tsx with correct API path (/api/client/extensions/...)
- Added build.sh for React component injection via sed

Tested and verified:
- Admin UI renders correctly
- Client panel loads without 500 error
- React component appears on server console page
- API call executes successfully
- Returns proper 'no modpack detected' message for unconfigured servers

Key learnings documented:
- Blueprint wrapper field is for Blade only, not TSX
- TSX components require build.sh + sed injection + yarn build
- PHP-FPM OPCache requires restart after adding new classes
- Controller namespace must match directory case exactly

Dev Panel: http://64.50.188.14:128
Test Server UUID: c0a133db-6cb7-497d-a2ed-22ae66eb0de8

Next: Phase 4 - Real modpack testing with CurseForge API

Signed-off-by: Claude (Chronicler #62) <claude@firefrostgaming.com>
2026-04-06 01:39:04 +00:00
Claude (Chronicler #62)
35aded99fe feat(modpackchecker): add Blueprint extension Phase 2 - core architecture
Task #26 Phase 2 Complete — Core Architecture

Files created:
- conf.yml: Blueprint manifest with all paths configured
- admin/controller.php: Admin settings controller (BYOK key, webhook, interval)
- admin/view.blade.php: Admin UI with Trinity-inspired styling
- controllers/ModpackAPIController.php: Client API with all 4 platform integrations
- routes/client.php: Client route for manual version checks
- views/server/wrapper.tsx: React component for server overview page
- database/migrations: Per-server tracking table

Platform Support (all implemented):
- CurseForge (BYOK API key)
- Modrinth (open, no key)
- Technic (open, no key)
- FTB/modpacks.ch (open, no key)

Detection Strategy:
1. Egg Variables (MODPACK_PLATFORM, MODPACK_ID, platform-specific vars)
2. File fingerprinting via DaemonFileRepository (manifest.json, modrinth.index.json)
3. Manual override via admin UI

Next: Phase 3 - Testing on Dev Panel (64.50.188.128)

Signed-off-by: Claude (Chronicler #62) <claude@firefrostgaming.com>
2026-04-06 00:35:01 +00:00