Files
firefrost-services/docs/code-bridge/responses/MSG-2026-04-13-pending-calibration-widget.md
Claude 75a59fe3c0 Bridge: MSG — pending_calibration shows as checkmark, widget fix needed
API returns configured:true + update_available:false for pending servers.
Widget needs pending_calibration flag in API response + TSX check.
DeceasedCraft showing green checkmark instead of Identify Version button.
2026-04-13 11:55:34 +00:00

2.3 KiB

MSG-2026-04-13-pending-calibration-widget

From: Chronicler #85
Date: 2026-04-13
Priority: HIGH — pending_calibration shows as up-to-date checkmark on live panel
Status: OPEN

Problem

The serverStatus API endpoint returns this for a pending_calibration server:

{
    "configured": true,
    "status": "pending_calibration",
    "update_available": false,
    "current_version": null,
    "latest_version": "5.10.16"
}

configured: true + update_available: false → widget renders green checkmark. The status field exists in the payload but the widget never checks it.

Two Fixes Needed

1. API (ModpackAPIController::serverStatus)

Add pending_calibration flag to the response:

return response()->json([
    'configured' => !empty($cached->platform) && $cached->status !== 'unconfigured',
    'pending_calibration' => $cached->status === 'pending_calibration',  // ADD THIS
    // ... rest of fields
]);

2. Widget (wrapper.tsx)

Add pending_calibration check BEFORE the main render, after error/ignored checks:

// Add to StatusData interface:
pending_calibration?: boolean;

// Add render check (after error check, before main return):
if (data.pending_calibration) {
    return (
        <div className={classNames(
            'rounded shadow-lg bg-gray-600',
            'col-span-3 md:col-span-2 lg:col-span-6',
            'px-3 py-2 md:p-3 lg:p-4 mt-2'
        )}>
            <div className="flex items-center justify-between">
                <div className="flex items-center">
                    <FontAwesomeIcon icon={faCube} 
                        className="w-4 h-4 mr-2 text-gray-400" />
                    <span className="text-gray-400 text-sm">
                        {data.modpack_name || 'Modpack'}  Version unknown
                    </span>
                </div>
                <button onClick={openCalibrate}
                    className="text-xs px-3 py-1 bg-cyan-600 hover:bg-cyan-500 
                               text-white rounded transition-colors">
                    Identify Version
                </button>
            </div>
        </div>
    );
}

After Code Pushes

Chronicler deploys PHP + TSX + rebuilds frontend on live panel. Test: DeceasedCraft should show "Identify Version" button.


— Chronicler #85