Skip to content

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

UI polish round 12: honest model menu, neutral switches, a link that reads as one

aivsomkarf7ef779adb7c
diff --git a/src/components/BotSettingsDialog.simple.test.ts b/src/components/BotSettingsDialog.simple.test.ts
index d3763d70fb..3cb726b992 100644
--- a/src/components/BotSettingsDialog.simple.test.ts
+++ b/src/components/BotSettingsDialog.simple.test.ts
@@ -622,7 +622,7 @@ describe("the Details tab", () => {
const empty = botTab(makeBot());
expect(empty.html).toContain('data-panel-empty="routines"');
expect(empty.html).toContain(">Jobs this bot runs on a schedule, like a news roundup every morning.</p>");
- expect(empty.html).toContain(">Every bot&#x27;s routines are in Automations.<svg");
+ expect(empty.html).toContain(">See every bot&#x27;s routines in Automations<svg");
expect(empty.html.match(/data-panel-page="routines"/g)).toHaveLength(1);
const add = find(empty, "data-panel-page", "routines");
expect(empty.html).toMatch(/data-panel-page="routines"[^>]*>.*<span class="truncate">Add a routine<\/span><\/button>/);
diff --git a/src/components/ModelPicker.dom.test.ts b/src/components/ModelPicker.dom.test.ts
index c6d74d205f..5af3475bdb 100644
--- a/src/components/ModelPicker.dom.test.ts
+++ b/src/components/ModelPicker.dom.test.ts
@@ -109,9 +109,9 @@ describe("choosing a model with the keyboard", () => {
expect(chip().getAttribute("aria-expanded")).toBe("true");
press("ArrowDown");
- expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? focused()?.textContent).toBe("Sonnet 5.5");
+ expect(focused()?.textContent).toBe("Sonnet 5.5");
press("ArrowDown");
- expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? focused()?.textContent).toBe("Haiku 5.5");
+ expect(focused()?.textContent).toBe("Haiku 5.5");
press("ArrowUp");
press("Enter");
await settle();
@@ -139,10 +139,10 @@ describe("choosing a model with the keyboard", () => {
render(scout("claude-sonnet-5-5"));
await openWith("click");
press("o");
- expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? focused()?.textContent).toBe("Opus 5.5");
+ expect(focused()?.textContent).toBe("Opus 5.5");
press("p");
expect(press(" ").defaultPrevented).toBe(true);
- expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? focused()?.textContent).toBe("Opus 5.5");
+ expect(focused()?.textContent).toBe("Opus 5.5");
expect(fixture.dispatch).not.toHaveBeenCalled();
expect(menu()).not.toBeNull();
});
@@ -154,7 +154,7 @@ describe("choosing a model with the keyboard", () => {
press("ArrowDown");
expect(focused()?.hasAttribute("data-current-model")).toBe(true);
press("h");
- expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? focused()?.textContent).toBe("Haiku 5.5");
+ expect(focused()?.textContent).toBe("Haiku 5.5");
press("End");
expect(focused()?.hasAttribute("data-simple-manage")).toBe(true);
press("Home");
diff --git a/src/components/ModelPicker.simple.test.ts b/src/components/ModelPicker.simple.test.ts
index 35ffee524c..fbcbd0ab6a 100644
--- a/src/components/ModelPicker.simple.test.ts
+++ b/src/components/ModelPicker.simple.test.ts
@@ -237,10 +237,10 @@ describe("the model picker in Simple mode", () => {
expect(renderToStaticMarkup(chip)).toContain(">Claude Sonnet 5</span>");
});
- it("puts a model's one-line blurb under its name, and in its tooltip", () => {
+ it("names models without a second line; a blurb is only the row's tooltip", () => {
const html = menu(open(bot()).html);
const blurb = "Fast and smart. Good for most work.";
- expect(html).toContain(`data-simple-blurb="true" class="min-w-0 max-w-full truncate text-[12px] leading-4 text-ink-tertiary">${blurb}<`);
+ expect(html).not.toContain(`>${blurb}<`);
expect(html).toContain(`title="Sonnet 5.5 · ${blurb}"`);
});
diff --git a/src/components/SettingsPrimitives.tsx b/src/components/SettingsPrimitives.tsx
index 13aacf5f7c..7a48928893 100644
--- a/src/components/SettingsPrimitives.tsx
+++ b/src/components/SettingsPrimitives.tsx
@@ -25,13 +25,14 @@ export function Switch({
className={cn(
"relative cursor-pointer h-6 w-11 shrink-0 rounded-full transition-colors enabled:hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-40 motion-reduce:transition-none",
"in-data-[settings-look=simple]:h-5 in-data-[settings-look=simple]:w-8",
- checked ? "bg-accent" : "bg-control in-data-[settings-look=simple]:bg-ink/[0.12] in-data-[settings-look=simple]:ring-1 in-data-[settings-look=simple]:ring-inset in-data-[settings-look=simple]:ring-ink/45",
+ checked ? "bg-accent in-data-[settings-look=simple]:bg-ink" : "bg-control in-data-[settings-look=simple]:bg-ink/[0.12] in-data-[settings-look=simple]:ring-1 in-data-[settings-look=simple]:ring-inset in-data-[settings-look=simple]:ring-ink/45",
className,
)}
>
<span
className={cn(
"absolute top-[3px] h-[18px] w-[18px] rounded-full bg-white transition-[left] motion-reduce:transition-none",
+ checked && "in-data-[settings-look=simple]:bg-app",
"in-data-[settings-look=simple]:top-0.5 in-data-[settings-look=simple]:size-4",
checked ? "left-[21px] in-data-[settings-look=simple]:left-[14px]" : "left-[3px] in-data-[settings-look=simple]:left-0.5",
)}
diff --git a/src/components/SimpleModelMenu.tsx b/src/components/SimpleModelMenu.tsx
index 24cb05117c..c2a636f20f 100644
--- a/src/components/SimpleModelMenu.tsx
+++ b/src/components/SimpleModelMenu.tsx
@@ -54,7 +54,6 @@ function RowLines({ label, children }: { label: ReactNode; children?: ReactNode
function MenuModel({ instance, row, onPick }: { instance: InstanceInfo; row: MenuModelRow; onPick: SimpleMenuActions["onPick"] }) {
const { option } = row;
const reason = row.blocked ? t("model.orgBlocked") : undefined;
- const blurb = modelBlurb(option);
return (
<button
type="button"
@@ -63,7 +62,7 @@ function MenuModel({ instance, row, onPick }: { instance: InstanceInfo; row: Men
disabled={row.blocked}
aria-pressed={row.current}
aria-label={[modelOptionLabel(option), option.provider, reason].filter(Boolean).join(" · ")}
- title={[modelOptionLabel(option), option.provider, reason ?? blurb].filter(Boolean).join(" · ")}
+ title={[modelOptionLabel(option), option.provider, reason ?? modelBlurb(option)].filter(Boolean).join(" · ")}
tabIndex={-1}
onClick={() => onPick(instance, row.model ?? option.id, row.variant)}
className={SIMPLE_MENU_ROW}
@@ -72,7 +71,6 @@ function MenuModel({ instance, row, onPick }: { instance: InstanceInfo; row: Men
<RowLines label={row.label}>
{row.route && <span data-simple-route className={SIMPLE_MENU_META}>{row.route}</span>}
{reason && <span data-simple-org-blocked className={SIMPLE_MENU_META}>{reason}</span>}
- {!row.route && !reason && blurb && <span data-simple-blurb className={SIMPLE_MENU_META}>{blurb}</span>}
</RowLines>
{row.current && <Check size={14} className="shrink-0 text-ink" aria-hidden="true" />}
</button>
diff --git a/src/locales/en.json b/src/locales/en.json
index 8b7ff7aa0d..2967d5493a 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -4263,7 +4263,7 @@
"botPanel.tab.library": "Library",
"botPanel.routines.empty": "Routines are recurring tasks this bot runs on a schedule. Ask it in chat to set one up.",
"botPanel.routines.emptyHint": "Jobs this bot runs on a schedule, like a news roundup every morning.",
- "botPanel.routines.seeAll": "Every bot's routines are in Automations.",
+ "botPanel.routines.seeAll": "See every bot's routines in Automations",
"botPanel.routines.add": "Add a routine",
"botPanel.library.empty": "Pages, files, and apps this bot makes show up here",
"botPanel.library.pages": "Pages",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index 1186d99b8b..79f05c8064 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -7320,7 +7320,7 @@
"botPanel.tab.library": "Biblioteca",
"botPanel.routines.empty": "Rotinas são tarefas recorrentes que este bot executa em horários definidos. Peça no chat para ele criar uma.",
"botPanel.routines.emptyHint": "Tarefas que este bot executa em um horário, como um resumo de notícias toda manhã.",
- "botPanel.routines.seeAll": "As rotinas de todos os bots ficam em Automações.",
+ "botPanel.routines.seeAll": "Ver as rotinas de todos os bots em Automações",
"botPanel.routines.add": "Adicionar uma rotina",
"botPanel.library.empty": "As páginas, os arquivos e os apps que este bot cria aparecem aqui",
"botPanel.library.pages": "Páginas",
diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.json
index 4fda28c848..f33e6865ff 100644
--- a/src/locales/source-hashes.json
+++ b/src/locales/source-hashes.json
@@ -33314,7 +33314,7 @@
"settings.simple.group.typing": "0b96af8bce90a78a3ab5958209736b8738fe952deefc38fc958a14fbbeb75ef6",
"model.simple.auto": "0286249762f7c94349cdc0ba3bb2255baf9a80036e2193ead1d77696f888582f",
"botPanel.routines.emptyHint": "b540483c412961de856a2336db7643a5a7f3bc816afe8d3b9985b0fba6bf4cf0",
- "botPanel.routines.seeAll": "3aa5c0523d0e945b3a99f06aeffd3b8375849bffa01940d9bc962ed1d2768935",
+ "botPanel.routines.seeAll": "b19d361a58c13c0aa6ee4636d2948af133bb809425fe678c135b21eefb0f7775",
"settings.userBubbles.simpleTitle": "376821eb1ffb476bbbe293fe9c8f43d79e8f64417292afade8a351e443941aaa",
"chat.openBotPanel": "1f9ede9056d58ca37a4f7f79dd7da5226a8f30d0f1b616ac7eaaca6dcebaccbf",
"model.simple.thinkingAuto": "d197c7577cb9c63227b5e04ef066f6e69b1552577edd17788f88da04883ff3b5",