Routed via node
+
+ {viaNode}
+
+ + Credential will be configured on the node agent. NyxID + never sees or stores it. +
+ + ) : null} + {shape === "no-auth" ? (
This service doesn't need a credential. Click Connect to
diff --git a/frontend/src/wizard-entry.test.tsx b/frontend/src/wizard-entry.test.tsx
new file mode 100644
index 00000000..f7cf286a
--- /dev/null
+++ b/frontend/src/wizard-entry.test.tsx
@@ -0,0 +1,23 @@
+import { describe, expect, it } from "vitest";
+
+import { shouldShowDisconnectBanner } from "./wizard-entry";
+
+describe("shouldShowDisconnectBanner", () => {
+ it("returns false when the CLI is still connected", () => {
+ expect(shouldShowDisconnectBanner("claimed", false)).toBe(false);
+ });
+
+ it.each(["claimed", "secret", "acking"] as const)(
+ "returns true for disconnected non-terminal phase %s",
+ (phase) => {
+ expect(shouldShowDisconnectBanner(phase, true)).toBe(true);
+ },
+ );
+
+ it.each(["done", "cancelled"] as const)(
+ "returns false for disconnected terminal phase %s",
+ (phase) => {
+ expect(shouldShowDisconnectBanner(phase, true)).toBe(false);
+ },
+ );
+});
diff --git a/frontend/src/wizard-entry.tsx b/frontend/src/wizard-entry.tsx
index efa83999..062ca81c 100644
--- a/frontend/src/wizard-entry.tsx
+++ b/frontend/src/wizard-entry.tsx
@@ -1,3 +1,5 @@
+/* eslint-disable react-refresh/only-export-components -- standalone entry exports a pure helper for focused tests. */
+
/**
* Standalone entry for the CLI's locally-served wizard (Mode A).
*
@@ -105,6 +107,14 @@ const queryClient = new QueryClient({
},
})
+export function shouldShowDisconnectBanner(
+ phase: ModeAPhase["phase"],
+ disconnected: boolean,
+): boolean {
+ if (!disconnected) return false
+ return phase !== "done" && phase !== "cancelled"
+}
+
function WizardApp() {
const [stage, setStage] = useState