fix(queue): persist clear plate state across page refresh (#410)

After clicking "Clear Plate & Start Next", refreshing the page showed
the button again because the frontend determined the state purely from
the printer's FINISH/FAILED status. The backend already tracked a
plate_cleared flag in memory but never exposed it to the frontend.

- Add plate_cleared field to PrinterStatus schema and API response
- Pass plateCleared prop to PrinterQueueWidget
- Skip clear plate UI when plate is already acknowledged
- Add 2 tests for plateCleared=true behavior
This commit is contained in:
maziggy
2026-02-17 12:14:47 +01:00
parent 20e06bcf0c
commit a0abeba394
9 changed files with 35 additions and 6 deletions
+2
View File
@@ -250,6 +250,8 @@ export interface PrinterStatus {
big_fan2_speed: number | null; // Chamber/exhaust fan
heatbreak_fan_speed: number | null; // Hotend heatbreak fan
firmware_version: string | null; // Firmware version from MQTT
// Queue: user has acknowledged plate is cleared for next queued print
plate_cleared: boolean;
}
export interface PrinterCreate {