fix(web): setup allows adding a printer with no controller configured
Second half of the printer/relay decoupling: the category section's
add-button gate ("add a controller first — a printer points at one of
its relays") blocked every non-access category while zero controllers
existed — hit on the lab bench (USB printer test, no relays on hand).
Printers don't bind (role + failoverRank route jobs), so the gate now
exempts them like the form's requirement already does.
Claude-Session: https://claude.ai/code/session_01Xcm6ikLgGoCxxHrxtjkk5V
This commit is contained in:
@@ -257,8 +257,10 @@ function CategorySection({
|
||||
const [formFor, setFormFor] = useState<Assignment | "new" | null>(null);
|
||||
const [warnings, setWarnings] = useState<string[]>([]);
|
||||
|
||||
// Binding categories need a controller to point at first.
|
||||
const isBound = category !== "access";
|
||||
// Binding categories need a controller to point at first. Printers do NOT bind
|
||||
// (role + failoverRank route print jobs — see printer-routing.ts), so they are
|
||||
// addable on a controller-less box (e.g. the lab bench testing a USB printer).
|
||||
const isBound = category !== "access" && category !== "printer";
|
||||
const blockedNoController = isBound && controllers.length === 0;
|
||||
const editing = formFor && formFor !== "new" ? formFor : undefined;
|
||||
|
||||
|
||||
@@ -2477,3 +2477,11 @@ June park-buzi install defaulted under $HOME). [[appliance-provisioning]] §7a n
|
||||
root_directory after every install + the sed one-liner fix; also notes `sudo systemctl restart
|
||||
periphery` → "unit not found" (user unit) and that the single-use onboarding key survives a
|
||||
pre-connect crash.
|
||||
|
||||
## [2026-07-07] update | Setup: printers addable with NO controller configured
|
||||
|
||||
Lab bench (USB printer test, no relays on hand) hit a SECOND printer/relay coupling the
|
||||
2026-07-06 fix missed: the category section's add-button gate ("Shto fillimisht një kontroller…")
|
||||
blocks every non-access category while zero controllers exist. Printers are now exempt there too
|
||||
— the binding fix removed the requirement inside the form; this removes the gate in front of it.
|
||||
A controller-less box can configure + test a printer.
|
||||
|
||||
Reference in New Issue
Block a user