Skip to content

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

Match the Starter e2e tests to two turns at once and five awake bots (#4884)

Milind Sonid7ce39ea08e2
diff --git a/server/memory-order.e2e.test.ts b/server/memory-order.e2e.test.ts
index a46a7995fb..c96790b970 100644
--- a/server/memory-order.e2e.test.ts
+++ b/server/memory-order.e2e.test.ts
@@ -55,10 +55,9 @@ it("starts the person's own line ahead of a hand-off that was already waiting fo
expect(f.ended().indexOf(person.id)).toBeLessThan(f.ended().indexOf(second.id));
}), 120_000);
-it("on Starter with 13 bots, hand-offs to busy bots start at once: one thread per bot holds only what a person or a routine starts", () => fixture(async (f) => {
- // A team made before it moved to Starter: the plan limits the bots it makes, never those it has.
+it("on Starter, hand-offs to busy bots start at once: one thread per bot holds only what a person or a routine starts", () => fixture(async (f) => {
const bots: any[] = [];
- for (let at = 0; at < 13; at += 1) bots.push(await f.bot(`Teammate ${at}`));
+ for (let at = 0; at < 5; at += 1) bots.push(await f.bot(`Teammate ${at}`));
writeFileSync(join(f.dataDir, "test-starter"), "");
expect((await f.api("/api/config", undefined, "GET")).cloudStarter).toBe(true);
const [chief, target, other] = bots;
diff --git a/server/parallel-threads.e2e.test.ts b/server/parallel-threads.e2e.test.ts
index 19df8a6e8e..78f26c52ab 100644
--- a/server/parallel-threads.e2e.test.ts
+++ b/server/parallel-threads.e2e.test.ts
@@ -454,11 +454,13 @@ describe("a Starter Cloud", () => {
await whenStarted(a.threads[0]!);
await send(f, b.botId, b.threads[0]!, "Ben's own job");
await whenStarted(b.threads[0]!);
- await send(f, c.botId, c.threads[0]!, "Cyd's own job");
- await whenStarted(c.threads[0]!);
const toBen = await startThread(a.threads[0]!, "For Ben", b.botId);
expect(toBen.status, JSON.stringify(toBen.body)).toBeLessThan(300);
await whenStarted(await ownThread(b.botId, "For Ben"));
+ // Starter runs two turns at once, so Cyd's own job takes the place Ben's leaves.
+ f.finish(b.threads[0]!);
+ await send(f, c.botId, c.threads[0]!, "Cyd's own job");
+ await whenStarted(c.threads[0]!);
// From a third bot: Ben asking Ada back while Ada waits on Ben would be refused as a loop (crossed-handoffs.e2e).
const toAda = await startThread(c.threads[0]!, "For Ada", a.botId);
expect(toAda.status, JSON.stringify(toAda.body)).toBeLessThan(300);
diff --git a/src/components/AwakeBotsPicker.tsx b/src/components/AwakeBotsPicker.tsx
index 1afa9e3a60..303d3d339f 100644
--- a/src/components/AwakeBotsPicker.tsx
+++ b/src/components/AwakeBotsPicker.tsx
@@ -39,13 +39,13 @@ export function AwakeBotsPicker({ limit, onSaved }: { limit: number; onSaved: ()
return (
<div className="mt-4 w-full text-start" data-awake-bots="">
<p className="mb-1.5 text-[12px] text-ink-tertiary">{t("botLimit.paused.chosen", { chosen: chosen.size, count: wanted })}</p>
- <ul className="max-h-[220px] overflow-y-auto rounded-md border border-line">
+ <ul className="max-h-[220px] overflow-y-auto rounded-md border border-hairline">
{bots.map((bot) => {
const on = chosen.has(bot.id);
return (
<li key={bot.id}>
<button type="button" role="checkbox" aria-checked={on} disabled={!on && chosen.size >= wanted} onClick={() => toggle(bot.id)}
- className="flex w-full items-center gap-2.5 px-3 py-2 text-[14px] hover:bg-surface-hover disabled:opacity-50">
+ className="flex w-full items-center gap-2.5 px-3 py-2 text-[14px] hover:bg-raised disabled:opacity-50">
<BotAvatar bot={bot} size={22} animated={false} />
<span className="min-w-0 flex-1 truncate">{bot.name}</span>
{!on && <span className="text-[12px] text-ink-tertiary">{t("botLimit.paused.badge")}</span>}