Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(settings): say the computer setup hint once (#4033)

Lovin Maxwellca3478ec60c9
diff --git a/src/components/LocalComputerSection.test.ts b/src/components/LocalComputerSection.test.ts
index 5664d519e2..a08af43367 100644
--- a/src/components/LocalComputerSection.test.ts
+++ b/src/components/LocalComputerSection.test.ts
@@ -297,6 +297,9 @@ describe("cloud computer inventory UI", () => {
const disconnected = renderCard({ configured: false });
expect(disconnected).toContain("Boat is not connected");
expect(disconnected).not.toContain("No cloud desktops found");
+ expect(disconnected.match(/Boat is not connected/g)).toHaveLength(1);
+ expect(disconnected).toContain("Connect your Boat account");
+ expect(disconnected).not.toContain("aria-busy");
const unavailable = renderCard({ unavailableReason: "boat.dev is unavailable" });
expect(unavailable).toContain("boat.dev is unavailable");
@@ -507,7 +510,10 @@ describe("VPS computer inventory UI", () => {
});
it("keeps disconnected, unavailable, and empty states distinct", () => {
- expect(renderCard({ configured: false, aliases: [] })).toContain("No VPS is set up yet");
+ const disconnected = renderCard({ configured: false, aliases: [] });
+ expect(disconnected).toContain("To use your own VPS, add its SSH alias");
+ expect(disconnected.match(/No VPS is set up yet/g)).toHaveLength(1);
+ expect(disconnected).not.toContain("aria-busy");
expect(renderCard({ unavailableReason: "SSH host cannot be reached" })).toContain("SSH host cannot be reached");
expect(renderCard()).toContain("No MausBot desktops found on your VPS");
});
diff --git a/src/components/LocalComputerSection.tsx b/src/components/LocalComputerSection.tsx
index 8df57e7392..a5c079a7fd 100644
--- a/src/components/LocalComputerSection.tsx
+++ b/src/components/LocalComputerSection.tsx
@@ -408,7 +408,7 @@ export function CloudComputersCard({
: t("vm.cloud.foundMany", { count: instances.length })}
</p>
- <div
+ {!(configured === false && !loading && !unavailableReason) && <div
aria-busy={loading || pending !== null}
className="mt-3 overflow-hidden rounded-xl border border-hairline/40"
>
@@ -492,7 +492,7 @@ export function CloudComputersCard({
</div>
);
})}
- </div>
+ </div>}
</Card>
);
}
diff --git a/src/components/VpsComputersCard.tsx b/src/components/VpsComputersCard.tsx
index 12a52ea6ac..e8d83a8c82 100644
--- a/src/components/VpsComputersCard.tsx
+++ b/src/components/VpsComputersCard.tsx
@@ -70,7 +70,7 @@ export function VpsComputersCard({
: t("vm.vps.foundMany", { count: instances.length })}
</p>
- <div
+ {!(configured === false && !loading && !unavailableReason) && <div
aria-busy={loading || removingName !== null}
className="mt-3 overflow-hidden rounded-xl border border-hairline/40"
>
@@ -150,7 +150,7 @@ export function VpsComputersCard({
</div>
);
})}
- </div>
+ </div>}
</Card>
);
}