Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
UI polish round 14: a first screen that doesn't repeat itself, quieter light tables
aivsomkar100177bdf4da
diff --git a/src/components/ChatView.setup-offer.test.ts b/src/components/ChatView.setup-offer.test.tsindex 4a4ea9cfa6..ddecb5d9d2 100644--- a/src/components/ChatView.setup-offer.test.ts+++ b/src/components/ChatView.setup-offer.test.ts@@ -57,7 +57,7 @@ afterAll(() => {describe("the setup card in the chat", () => {it("is drawn under a blank bot's greeting and sends a pick's words for this conversation", async () => {await draw(profile());- expect(card()?.textContent).toContain("What should I help you with first?");+ expect(card()?.textContent).toContain("Pick a starting point");expect(firstAnswer()?.textContent).toBe("AResearch and digging into topics");sent.length = 0;flushSync(() => firstAnswer()!.click());diff --git a/src/components/ModelPicker.simple.test.ts b/src/components/ModelPicker.simple.test.tsindex 23080944e9..5caee128d6 100644--- a/src/components/ModelPicker.simple.test.ts+++ b/src/components/ModelPicker.simple.test.ts@@ -237,11 +237,10 @@ describe("the model picker in Simple mode", () => {expect(renderToStaticMarkup(chip)).toContain(">Claude Sonnet 5</span>");});- it("names models without a second line; a blurb is only the row's tooltip", () => {+ it("names models without a second line or a ranking claim, in the row and its tooltip", () => {const html = menu(open(bot()).html);- const blurb = "Fast and smart. Good for most work.";- expect(html).not.toContain(`>${blurb}<`);- expect(html).toContain(`title="Sonnet 5.5 · ${blurb}"`);+ expect(html).not.toContain("Fast and smart. Good for most work.");+ expect(html).toMatch(/title="Sonnet 5\.5( · [^"]+)?"/);});it("opens a provider's long list in place with Show all, and offers a search once the menu holds more than twelve models", () => {diff --git a/src/components/SettingsSimplePages.tsx b/src/components/SettingsSimplePages.tsxindex 1a68377326..edd649b36f 100644--- a/src/components/SettingsSimplePages.tsx+++ b/src/components/SettingsSimplePages.tsx@@ -110,9 +110,11 @@ export function SimpleGeneralPage({ has, peopleOpen, onLooks }: { has: Has; peop}function LooksRow({ onLooks }: { onLooks: () => void }) {- const current = SKINS.find((skin) => skin.id === resolveSkin(useSkinChoice()))?.name;+ const choice = useSkinChoice();+ const current = SKINS.find((skin) => skin.id === resolveSkin(choice))?.name;+ const hint = choice === "system" ? t("settings.simple.themes.followHint") : t("settings.simple.themes.fixedHint", { name: current ?? "" });return (- <SettingRow title={current ? `${t("settings.theme.title")} · ${current}` : t("settings.theme.title")} subtitle={t("settings.simple.themes.hint")}>+ <SettingRow title={current ? `${t("settings.theme.title")} · ${current}` : t("settings.theme.title")} subtitle={hint}><button type="button" className="ui-button" onClick={onLooks}>{t("settings.simple.themes.browse")}</button></SettingRow>);diff --git a/src/components/SetupOffer.test.ts b/src/components/SetupOffer.test.tsindex f65863f4cc..41c9298fc2 100644--- a/src/components/SetupOffer.test.ts+++ b/src/components/SetupOffer.test.ts@@ -70,7 +70,7 @@ describe("the setup card under a new bot's greeting", () => {it("asks what to help with first, with the greeting's own answers lettered in order, then Something else", () => {const view = renderOffer(offered);- expect(view.html).toContain("What should I help you with first?");+ expect(view.html).toContain("Pick a starting point");expect(view.choices.map(label)).toEqual(["A|Plan my trips", "B|Watch the news", "C|Something else"]);});@@ -134,7 +134,7 @@ describe("the setup card under a new bot's greeting", () => {it("settles quietly, with no answer, when the person writes something else first", () => {for (const text of ["What's the weather in Paris?", "/learn the inbox"]) {const view = renderOffer(offered, [offered, { id: "u1", role: "user", kind: "text", at: 2, text } as Message]);- expect(view.html).toContain("What should I help you with first?");+ expect(view.html).toContain("Pick a starting point");expect(view.html).not.toContain("Your answer");expect(view.choices.every((node) => node.props.disabled === true)).toBe(true);}diff --git a/src/components/SetupOffer.tsx b/src/components/SetupOffer.tsxindex da6d84b15a..b464721935 100644--- a/src/components/SetupOffer.tsx+++ b/src/components/SetupOffer.tsx@@ -71,7 +71,7 @@ export function SetupOffer({ botId, threadId, message, transcript }: { botId: stshowedWait.current = pending || updating;const quiet = settled || updating;const choices = pending ? [] : shown.current!.choices;- const title = t("chat.setupCard.title");+ const title = t("chat.setupCard.heading");const ask = (text?: string) => {if (sending.current || settled) return;diff --git a/src/components/SetupOffer.waiting.test.ts b/src/components/SetupOffer.waiting.test.tsindex b011285955..59c28f16a5 100644--- a/src/components/SetupOffer.waiting.test.ts+++ b/src/components/SetupOffer.waiting.test.ts@@ -45,7 +45,7 @@ afterEach(() => {describe("the setup card while its answers are written", () => {it("keeps a quiet frame with the title and the close button, takes no letter, and closes", () => {show(greeting({ setupChoicesPending: true }));- expect(card()!.textContent).toContain("What should I help you with first?");+ expect(card()!.textContent).toContain("Pick a starting point");expect(card()!.getAttribute("aria-busy")).toBe("true");expect(container.querySelectorAll("[data-setup-waiting] > div")).toHaveLength(6);expect(container.querySelectorAll("kbd")).toHaveLength(0);diff --git a/src/components/SimpleModelMenu.tsx b/src/components/SimpleModelMenu.tsxindex b533c62918..0aa29ff86b 100644--- a/src/components/SimpleModelMenu.tsx+++ b/src/components/SimpleModelMenu.tsx@@ -3,7 +3,6 @@ import { Check, ChevronDown, ChevronRight, ChevronUp, Download, Loader2, LogIn,import type { Bot, InstanceInfo } from "@/state/store";import type { EffortLevel } from "../../shared/wire";import type { MenuGroup, MenuModelRow, SimpleMenu } from "@/lib/simple-model-menu";-import { modelBlurb } from "@/lib/model-friendly";import { modelOptionLabel } from "@/lib/model-label";import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";@@ -62,7 +61,7 @@ function MenuModel({ instance, row, onPick }: { instance: InstanceInfo; row: Mendisabled={row.blocked}aria-pressed={row.current}aria-label={[modelOptionLabel(option), option.provider, reason].filter(Boolean).join(" · ")}- title={[modelOptionLabel(option), option.provider, reason ?? modelBlurb(option)].filter(Boolean).join(" · ")}+ title={[modelOptionLabel(option), option.provider, reason].filter(Boolean).join(" · ")}tabIndex={-1}onClick={() => onPick(instance, row.model ?? option.id, row.variant)}className={SIMPLE_MENU_ROW}diff --git a/src/components/bot-panel/DetailsTab.tsx b/src/components/bot-panel/DetailsTab.tsxindex d047fd55a9..1a0efc13bd 100644--- a/src/components/bot-panel/DetailsTab.tsx+++ b/src/components/bot-panel/DetailsTab.tsx@@ -69,7 +69,7 @@ export function DetailsTab({ bot, derived, onOpen }: {<CardLabel>{t("botSettings.simple.routines")}</CardLabel><p className="mx-3.5 text-[13px] leading-[18px] text-ink-tertiary">{t("botPanel.routines.emptyHint")}</p><button type="button" data-panel-automations onClick={() => dispatch({ type: "showRoutines", view: "list" })}- className="mx-3.5 mt-0.5 inline-flex min-h-7 items-center gap-0.5 rounded-[4px] text-[13px] font-medium text-ink-secondary underline-offset-2 hover:text-ink hover:underline focus-visible:underline">+ className="mx-3.5 mt-0.5 inline-flex min-h-7 items-center gap-0.5 rounded-[4px] text-[13px] font-medium text-ink underline decoration-ink/30 underline-offset-2 hover:decoration-ink">{t("botPanel.routines.seeAll")}<ChevronRight size={14} aria-hidden="true" className="rtl:-scale-x-100" /></button><buttondiff --git a/src/lib/model-friendly.test.ts b/src/lib/model-friendly.test.tsindex 5129f0689a..1b8ef509b4 100644--- a/src/lib/model-friendly.test.ts+++ b/src/lib/model-friendly.test.ts@@ -1,19 +1,5 @@import { describe, expect, it } from "vitest";-import { displayModelLabel, modelBlurb, shortModelLabel } from "./model-friendly";--describe("model blurbs", () => {- it("describes the well-known Claude families", () => {- expect(modelBlurb({ id: "claude-opus-5-5", label: "Opus 5.5" })).toMatch(/Smartest/);- expect(modelBlurb({ id: "claude-sonnet-5-5", label: "Sonnet 5.5" })).toMatch(/most work/);- expect(modelBlurb({ id: "claude-haiku-4-5-20251001", label: "Haiku 4.5" })).toMatch(/Quickest/);- });-- it("calls small variants light without guessing at unknown models", () => {- expect(modelBlurb({ id: "gpt-5-mini", label: "GPT-5 mini" })).toMatch(/light/);- expect(modelBlurb({ id: "minimax-m2", label: "MiniMax M2" })).toBeUndefined();- expect(modelBlurb({ id: "grok-4", label: "Grok 4" })).toBeUndefined();- });-});+import { displayModelLabel, shortModelLabel } from "./model-friendly";describe("a model's name where no provider heading is beside it", () => {it("puts the provider before a bare word, so the chip says what is running", () => {diff --git a/src/lib/model-friendly.ts b/src/lib/model-friendly.tsindex 8e6e433892..8670aad3bc 100644--- a/src/lib/model-friendly.ts+++ b/src/lib/model-friendly.ts@@ -1,19 +1,3 @@-import { t } from "@/lib/i18n";-import type { LocaleKey } from "@/locales";--const BLURBS: readonly [RegExp, LocaleKey][] = [- [/opus/, "model.blurb.smartest"],- [/sonnet/, "model.blurb.balanced"],- [/haiku/, "model.blurb.fastest"],- [/\b(mini|nano|flash|lite)\b|-(mini|nano|flash|lite)\b/, "model.blurb.light"],-];--export function modelBlurb(option: { id: string; label: string }): string | undefined {- const name = `${option.id} ${option.label}`.toLowerCase();- const match = BLURBS.find(([pattern]) => pattern.test(name));- return match ? t(match[1]) : undefined;-}-export function displayModelLabel(label: string, provider: string, custom = false): string {if (custom || !provider || /\d/.test(label) || label.toLowerCase().startsWith(provider.toLowerCase())) return label;return `${provider} ${label}`;diff --git a/src/locales/en.json b/src/locales/en.jsonindex b854144636..b3d6467069 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -6551,6 +6551,8 @@"settings.simple.themes.title": "Color themes","settings.simple.themes.browse": "Browse themes","settings.simple.themes.hint": "Follow system switches between Daylight and Midnight. Other themes stay fixed until you change them.",+ "settings.simple.themes.followHint": "Follows your computer: Daylight when it is light, Midnight when it is dark.",+ "settings.simple.themes.fixedHint": "Using {name}. Choose Follow system to switch between Daylight and Midnight on its own.","settings.simple.looks.back": "Back","settings.simple.theme.system": "Follow system","settings.simple.language.system": "Follow system",@@ -7529,7 +7531,8 @@"chat.savedSteps.forgotten": "Forgotten","chat.savedSteps.forgetFailed": "Couldn't forget these steps. Try again.","chat.setupCard.title": "What should I help you with first?",- "chat.setupCard.hint": "Pick one and I'll set myself up for it, or type your own below.",+ "chat.setupCard.hint": "Choose a focus for this bot, or type your own below. You can change it later.",+ "chat.setupCard.heading": "Pick a starting point","chat.setupCard.other": "Something else","chat.setupCard.answer": "Your answer","chat.setupCard.research": "Research and digging into topics",diff --git a/src/locales/pt-br.json b/src/locales/pt-br.jsonindex 6ec2f750d7..c0bd01666a 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -6285,6 +6285,8 @@"settings.simple.themes.title": "Temas de cores","settings.simple.themes.browse": "Ver temas","settings.simple.themes.hint": "Seguir o sistema alterna entre Daylight e Midnight. Outros temas ficam fixos até você mudar.",+ "settings.simple.themes.followHint": "Segue o seu computador: Daylight quando está claro, Midnight quando está escuro.",+ "settings.simple.themes.fixedHint": "Usando {name}. Escolha Seguir o sistema para alternar entre Daylight e Midnight sozinho.","settings.simple.looks.back": "Voltar","settings.simple.theme.system": "Seguir o sistema","settings.simple.language.system": "Seguir o sistema",@@ -7456,7 +7458,8 @@"voice.libraryHint": "A voz que você escolher entra na sua lista de vozes.","voice.adding": "Adicionando…","chat.setupCard.title": "Com o que devo ajudar primeiro?",- "chat.setupCard.hint": "Escolha uma e eu me configuro para isso, ou digite a sua abaixo.",+ "chat.setupCard.hint": "Escolha um foco para este bot ou digite o seu abaixo. Você pode mudar depois.",+ "chat.setupCard.heading": "Escolha um ponto de partida","chat.setupCard.other": "Outra coisa","chat.setupCard.answer": "Sua resposta","chat.setupCard.research": "Pesquisar e se aprofundar em assuntos",diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.jsonindex fa0a6fd95f..413886109a 100644--- a/src/locales/source-hashes.json+++ b/src/locales/source-hashes.json@@ -33399,7 +33399,7 @@"phone.code.pairingCode": "1c5ea2f7ed52a91c82993d40cf16581ac6ccff5283e1840cad1a1857311d1121","phone.code.typeIntro": "eefcfc11ed512a8866f3764a972fa5a7c7bdd01bcbe4cb1681c37ae697f69fe1","phone.signIn.emailCode": "81c2e322abeb89f738de06ccdbefa7893c976a129b89c194299c75bd490fe128",- "chat.setupCard.hint": "0cf6fcebf1c62c47a8977b17944d4f3d11beeee04dda18ee3dedb1808cb96696",+ "chat.setupCard.hint": "c6ddd65e5fdd0145d1711ce1a16c81129537e39f2b81f1ee165aa231d6e208d8","inbox.emptyHint": "0105954275918cda7ea87a1d942173015f96aaf820ba74a4bd07386d6426b4d8","settings.simple.group.typing": "0b96af8bce90a78a3ab5958209736b8738fe952deefc38fc958a14fbbeb75ef6","model.simple.auto": "0286249762f7c94349cdc0ba3bb2255baf9a80036e2193ead1d77696f888582f",@@ -33441,7 +33441,10 @@"botLimit.paused.chosen": "bb6b6546373e7d0c6fb29ab15dc00f64cdc965f77cf5689478c71c51fbc6549f","botLimit.paused.badge": "e159b06187d369a0615f66ce577582b5c983d4ea59b3a62b702049f61753f0bf","botLimit.paused.saveFailed": "680c88ccf5d4c9fe60c44c3a541c39e5aa80c9d6e76377c886e7c00a1421dc0d",- "botLimit.paused.chooseAction": "a79a6acb715b89549164ec01e72282653c74175dff445e98a40612870f8e650e"+ "botLimit.paused.chooseAction": "a79a6acb715b89549164ec01e72282653c74175dff445e98a40612870f8e650e",+ "chat.setupCard.heading": "c55d59f402bbe025ee81dbf0efa20086040334938ed8617f340ab81db478b196",+ "settings.simple.themes.followHint": "d42ba551158199061ebfda7029c05ad07f84ebad29cfc8c24ffe4a7323ed5629",+ "settings.simple.themes.fixedHint": "f9f6d89b8466b6e648c56e78ab47cf53d6c9aea2b457efdaae0ed12f5de14220"},"zh": {"pro.fromPrice": "a48a04a457d60b08b54fc83e7a6c4584ffedb1e23621859084900c8521a3af7b",diff --git a/src/styles.css b/src/styles.cssindex 006f549348..9c6f9fe599 100644--- a/src/styles.css+++ b/src/styles.css@@ -1161,6 +1161,13 @@[data-reply-bubble] [data-table-card] thead {background: color-mix(in srgb, var(--color-card), var(--color-ink) 7%);}+/* On Daylight's pale bubble the inset table steps back to a whisper of ink. */+:root[data-skin="daylight"] [data-reply-bubble] [data-table-card] {+ background: color-mix(in srgb, var(--color-card), var(--color-ink) 2%);+}+:root[data-skin="daylight"] [data-reply-bubble] [data-table-card] thead {+ background: color-mix(in srgb, var(--color-card), var(--color-ink) 4%);+}/* A section that opens right after a table keeps the space a heading gets elsewhere in the reply. */[data-reply-bubble] > [data-reply-table] + * .chat-md > .md-heading:first-child {margin-top: 6px;