Widget calls /servers/{uuid}/status but route is /status (no uuid).
useEffect hits 404, widget shows nothing until manual refresh.
Option A preferred: register route with {server} param.
1.6 KiB
1.6 KiB
REQ-2026-04-13-status-route-mismatch
Filed by: Chronicler #85
Date: 2026-04-13
Priority: HIGH — widget does not auto-load on page open
Status: OPEN
Problem
The widget's useEffect fires on page load and calls:
GET /api/client/extensions/modpackchecker/servers/{uuid}/status
But the registered route is:
GET /api/client/extensions/modpackchecker/status
Result: useEffect hits a 404 on load → catch(() => setData(null)) fires → widget shows nothing. Only the manual refresh button works because it hits /check (POST) which IS registered correctly.
Evidence
Route list from Dev Panel:
GET|HEAD api/client/extensions/modpackchecker/status ModpackAPIController@...
POST api/client/extensions/modpackchecker/servers/{server}/check ModpackAPIController@...
Widget call in wrapper.tsx line 46:
http.get(`/api/client/extensions/modpackchecker/servers/${uuid}/status`)
What Needs to Fix
Either:
- Option A: Update the route registration to match the widget:
servers/{server}/status - Option B: Update the widget's
useEffectto call the existing route (passing uuid as a query param)
Option A is cleaner — keeps the route pattern consistent with /check and future endpoints.
Files Involved
- Route registration: check
routes/directory in blueprint extension - Controller:
app/Http/Controllers/ModpackAPIController.php— status method may need$serverparameter - Widget:
views/server/wrapper.tsxline 46 (may not need changes if Option A)
After Code Pushes
Chronicler will pull, redeploy PHP + routes to Dev Panel, verify widget auto-loads on page open.