diff --git a/apps/web/src/SetupWizard.tsx b/apps/web/src/SetupWizard.tsx index 3eb600a..6c656d4 100644 --- a/apps/web/src/SetupWizard.tsx +++ b/apps/web/src/SetupWizard.tsx @@ -603,6 +603,15 @@ function DeviceForm({ // sections below (a relay setting and an input setting, respectively), so // skip them here to avoid rendering them twice. See OutputEditor/InputEditor. .filter((f) => !(isController && (f.key === "pulseMs" || f.key === "inputRestingHigh"))) + // Printer transport is exclusive: when Connection = USB the network fields + // (host/port/status-page) don't apply, and vice-versa the USB device path + // doesn't. Hide the irrelevant side so the form can't mislead (e.g. a USB + // path lingering under a Network printer). Driven by config.transport. + .filter((f) => { + const transport = String(config.transport ?? "tcp-ip"); + if (transport === "usb") return !["host", "port", "httpPort"].includes(f.key); + return f.key !== "devicePath"; + }) .map((f) => f.type === "boolean" ? ( // Boolean config field → a real checkbox (stores a true/false boolean, not