Skip to content

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

UI polish round 11: models say what they're for, Settings shows it scrolls

aivsomkar3a135fb92b26
diff --git a/src/components/BotSettingsDialog.simple.test.ts b/src/components/BotSettingsDialog.simple.test.ts
index 54abcc0866..d3763d70fb 100644
--- a/src/components/BotSettingsDialog.simple.test.ts
+++ b/src/components/BotSettingsDialog.simple.test.ts
@@ -621,8 +621,8 @@ describe("the Details tab", () => {
it("says what routines are while the bot has none, with Add a routine, and lists them once it has some", () => {
const empty = botTab(makeBot());
expect(empty.html).toContain('data-panel-empty="routines"');
- expect(empty.html).toMatch(/>Jobs this bot runs on a schedule, like a news roundup every morning\.(<!-- -->)? <button/);
- expect(empty.html).toContain(">Every bot&#x27;s routines are in Automations.</button>");
+ 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.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 5af3475bdb..c6d74d205f 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()?.textContent).toBe("Sonnet 5.5");
+ expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? focused()?.textContent).toBe("Sonnet 5.5");
press("ArrowDown");
- expect(focused()?.textContent).toBe("Haiku 5.5");
+ expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? 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()?.textContent).toBe("Opus 5.5");
+ expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? focused()?.textContent).toBe("Opus 5.5");
press("p");
expect(press(" ").defaultPrevented).toBe(true);
- expect(focused()?.textContent).toBe("Opus 5.5");
+ expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? 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()?.textContent).toBe("Haiku 5.5");
+ expect(focused()?.querySelector("[data-simple-model-text] > :first-child")?.textContent ?? 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 fbcbd0ab6a..35ffee524c 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("names models without a second line; a blurb is only the row's tooltip", () => {
+ it("puts a model's one-line blurb under its name, and in 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(`data-simple-blurb="true" class="min-w-0 max-w-full truncate text-[12px] leading-4 text-ink-tertiary">${blurb}<`);
expect(html).toContain(`title="Sonnet 5.5 · ${blurb}"`);
});
diff --git a/src/components/PlaceLookCard.test.ts b/src/components/PlaceLookCard.test.ts
index 1b6e960090..cede8f07ac 100644
--- a/src/components/PlaceLookCard.test.ts
+++ b/src/components/PlaceLookCard.test.ts
@@ -92,7 +92,7 @@ it("this computer takes a colour and a picture, both shown at once; None and Rem
it("a solo Cloud's owner changes both its colour (on the Admin) and its picture", async () => {
const { workspaces } = await page(look({ name: "My Cloud", color: null, swatch: null }));
expect(host.textContent).toContain("My Cloud shows in this color at the top of the sidebar and on its icon on the left of the app.");
- expect(host.textContent).toContain("Everyone here sees it.");
+ expect(host.textContent).toContain("Everyone who uses these bots sees it.");
expect([swatch("rose").disabled, button("Use an image")?.disabled]).toEqual([false, false]);
await click(swatch("rose"));
expect(workspaces.color).toHaveBeenCalledWith("rose");
@@ -148,7 +148,7 @@ it("a browser or an older app: no colour and no tint, only the place's picture",
expect(host.querySelector("[data-swatch]")).toBeNull();
expect(host.querySelector("[data-place-tint]")).toBeNull();
expect(host.querySelector("[data-place-picture]")).toBeTruthy();
- expect(host.textContent).toContain("Your own image, faded into the top of the sidebar. Everyone here sees it.");
+ expect(host.textContent).toContain("An image faded into the top of the sidebar. Everyone who uses these bots sees it.");
await act(async () => root?.unmount());
vi.resetModules();
vi.doMock("@/state/store", () => ({ useStore: () => ({ state: { config: {} } }) }));
diff --git a/src/components/PlaceLookCard.tsx b/src/components/PlaceLookCard.tsx
index 0c1458b625..dc59832cca 100644
--- a/src/components/PlaceLookCard.tsx
+++ b/src/components/PlaceLookCard.tsx
@@ -36,7 +36,7 @@ export function PlaceLookRows() {
disabled={locked} offset="menu" none />
</SettingRow>
</div>}
- <PlacePicture banner={state.config?.workspaceBanner ?? null} canChange={admin} subtitle={t(computer ? "placeLook.sidebarPictureSub" : "placeLook.pictureSub")} />
+ <PlacePicture banner={state.config?.workspaceBanner ?? null} canChange={admin} subtitle={t(computer ? "placeLook.sidebarPictureSub" : "placeLook.sharedPictureSub")} />
</>;
}
diff --git a/src/components/SettingsSimplePages.tsx b/src/components/SettingsSimplePages.tsx
index 499f9a1271..eed01cedc1 100644
--- a/src/components/SettingsSimplePages.tsx
+++ b/src/components/SettingsSimplePages.tsx
@@ -112,7 +112,7 @@ export function SimpleGeneralPage({ has, peopleOpen, onLooks }: { has: Has; peop
function LooksRow({ onLooks }: { onLooks: () => void }) {
const current = SKINS.find((skin) => skin.id === resolveSkin(useSkinChoice()))?.name;
return (
- <SettingRow title={t("settings.theme.title")}>
+ <SettingRow title={t("settings.theme.title")} subtitle={t("settings.simple.themes.hint")}>
{current && <span data-looks-current className="me-3 text-[13px] text-ink-tertiary">{current}</span>}
<button type="button" className="ui-button" onClick={onLooks}>{t("settings.simple.themes.browse")}</button>
</SettingRow>
diff --git a/src/components/SimpleModelMenu.tsx b/src/components/SimpleModelMenu.tsx
index c2a636f20f..24cb05117c 100644
--- a/src/components/SimpleModelMenu.tsx
+++ b/src/components/SimpleModelMenu.tsx
@@ -54,6 +54,7 @@ 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"
@@ -62,7 +63,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 ?? modelBlurb(option)].filter(Boolean).join(" · ")}
+ title={[modelOptionLabel(option), option.provider, reason ?? blurb].filter(Boolean).join(" · ")}
tabIndex={-1}
onClick={() => onPick(instance, row.model ?? option.id, row.variant)}
className={SIMPLE_MENU_ROW}
@@ -71,6 +72,7 @@ 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/components/bot-panel/DetailsTab.tsx b/src/components/bot-panel/DetailsTab.tsx
index 541a33997b..bbf330868c 100644
--- a/src/components/bot-panel/DetailsTab.tsx
+++ b/src/components/bot-panel/DetailsTab.tsx
@@ -67,13 +67,11 @@ export function DetailsTab({ bot, derived, onOpen }: {
{derived.botRoutines.length === 0 ? (
<section data-panel-empty="routines">
<CardLabel>{t("botSettings.simple.routines")}</CardLabel>
- <p className="mx-3.5 text-[13px] leading-[18px] text-ink-tertiary">
- {t("botPanel.routines.emptyHint")}{" "}
- <button type="button" data-panel-automations onClick={() => dispatch({ type: "showRoutines", view: "list" })}
- className="inline-flex items-center gap-0.5 rounded-[4px] font-medium text-ink-secondary hover:text-ink">
- {t("botPanel.routines.seeAll")}<ChevronRight size={13} aria-hidden="true" className="rtl:-scale-x-100" />
- </button>
- </p>
+ <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-1.5 inline-flex items-center gap-0.5 rounded-[4px] text-[13px] font-medium text-ink-secondary hover:text-ink">
+ {t("botPanel.routines.seeAll")}<ChevronRight size={14} aria-hidden="true" className="rtl:-scale-x-100" />
+ </button>
<button
type="button"
data-panel-page="routines"
diff --git a/src/locales/en.json b/src/locales/en.json
index 7f42923316..8b7ff7aa0d 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -744,6 +744,7 @@
"placeLook.sidebarPicture": "Sidebar picture",
"placeLook.sidebarPictureSub": "Your own image, faded into the top of the sidebar.",
"placeLook.pictureSub": "Your own image, faded into the top of the sidebar. Everyone here sees it.",
+ "placeLook.sharedPictureSub": "An image faded into the top of the sidebar. Everyone who uses these bots sees it.",
"placeLook.useImage": "Use an image",
"placeLook.changeImage": "Change image",
"placeLook.removeImage": "Remove",
@@ -6533,6 +6534,7 @@
"settings.simple.looks.change": "Change",
"settings.simple.themes.title": "Color themes",
"settings.simple.themes.browse": "Browse themes",
+ "settings.simple.themes.hint": "Light or dark switches between Daylight and Midnight. Pick any other theme to keep it on.",
"settings.simple.looks.back": "Back",
"settings.simple.theme.system": "Follow system",
"settings.simple.language.system": "Follow system",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index e1ecb76164..1186d99b8b 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -730,6 +730,7 @@
"placeLook.sidebarPicture": "Imagem da barra lateral",
"placeLook.sidebarPictureSub": "Uma imagem sua, suavizada no topo da barra lateral.",
"placeLook.pictureSub": "Uma imagem sua, suavizada no topo da barra lateral e visível para todos aqui.",
+ "placeLook.sharedPictureSub": "Uma imagem esmaecida no topo da barra lateral. Todos que usam estes bots a veem.",
"placeLook.useImage": "Usar uma imagem",
"placeLook.changeImage": "Mudar imagem",
"placeLook.removeImage": "Remover",
@@ -6268,6 +6269,7 @@
"settings.simple.looks.change": "Alterar",
"settings.simple.themes.title": "Temas de cores",
"settings.simple.themes.browse": "Ver temas",
+ "settings.simple.themes.hint": "Claro ou escuro alterna entre Daylight e Midnight. Escolha qualquer outro tema para mantê-lo.",
"settings.simple.looks.back": "Voltar",
"settings.simple.theme.system": "Seguir o sistema",
"settings.simple.language.system": "Seguir o sistema",
diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.json
index f3b4ad6f74..4fda28c848 100644
--- a/src/locales/source-hashes.json
+++ b/src/locales/source-hashes.json
@@ -33322,7 +33322,9 @@
"settings.simple.themes.title": "eceab8df6ddf48352bc730a2784437d15472a4e9d81ee29834587d7f1a532e08",
"settings.simple.themes.browse": "5d7a5476ede9e8cb334ca24996a48200bea59e871006443754457753f797bf53",
"task.untitledChat": "4d4e126c2185da5e86b7478f0f12fc30009339941ef0d8627959aeb4641b6f69",
- "settings.theme.lightOrDark": "9c259901979dc2195dc36e59bf07ea998c75f090cbd266614bb4b3bcffe04333"
+ "settings.theme.lightOrDark": "9c259901979dc2195dc36e59bf07ea998c75f090cbd266614bb4b3bcffe04333",
+ "placeLook.sharedPictureSub": "6f65f006618295894fcd7f2158e066745e9c8eb621e8bcd81df21602663fb1a0",
+ "settings.simple.themes.hint": "c3a92ede69003cc37437a7d74d20acbfd8278bd43841fd124339c829497ce6ed"
},
"zh": {
"pro.fromPrice": "a48a04a457d60b08b54fc83e7a6c4584ffedb1e23621859084900c8521a3af7b",
diff --git a/src/styles.css b/src/styles.css
index aba7a6496f..006f549348 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -1588,9 +1588,14 @@ body {
initial-value: 0px;
}
@keyframes settings-fade {
- 0%, 94% { --settings-fade: 36px; }
+ 0%, 94% { --settings-fade: 20px; }
100% { --settings-fade: 0px; }
}
+/* A thin thumb that stays visible, so a long Settings page shows it goes on. */
+.settings-scroll {
+ scrollbar-width: thin;
+ scrollbar-color: var(--color-scrollbar) transparent;
+}
@supports (animation-timeline: scroll()) {
.settings-scroll {
mask-image: linear-gradient(to bottom, #000 calc(100% - var(--settings-fade)), transparent);