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 3: one-surface Inbox, clearer panel rows, header screen button
aivsomkar2e1c7fb79e70
diff --git a/src/components/BotSettingsDialog.simple.test.ts b/src/components/BotSettingsDialog.simple.test.tsindex 64b585e4f3..9cc878da6a 100644--- a/src/components/BotSettingsDialog.simple.test.ts+++ b/src/components/BotSettingsDialog.simple.test.ts@@ -621,7 +621,7 @@ 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).toContain(">Routines are recurring tasks this bot runs on a schedule. Ask it in chat to set one up.<");+ expect(empty.html).toContain(">Jobs this bot runs on a schedule, like a news roundup every morning.<");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/ChatView.tsx b/src/components/ChatView.tsxindex b011980f16..76f860a4d6 100644--- a/src/components/ChatView.tsx+++ b/src/components/ChatView.tsx@@ -1120,12 +1120,12 @@ export function ChatView({ bot: profile }: { bot: Bot }) {onClick={(event) => { if (!state.computerOpen) rememberComputerPanelOpen({ botId: bot.id, opener: event.currentTarget, tabs: event.detail === 0 }); dispatch({ type: "toggleComputer" }); }}className={cn("relative",- "flex size-8 items-center justify-center rounded-full transition-colors hover:bg-ink/[0.06]",+ "flex size-8 items-center justify-center rounded-full", ELEVATED_FLOAT, ELEVATED_HOVER,state.computerOpen ? "text-accent" : "text-ink-secondary hover:text-ink",)}title={t("chat.computer")} aria-label={busy && place === "browser" ? `${t("chat.computer")}, ${t("place.live")}` : t("chat.computer")}>- <Monitor size={18} />{busy && place === "browser" && <span aria-hidden="true" className="absolute right-1 top-1 size-1.5 animate-pulse rounded-full bg-success" data-testid="computer-button-live" />}+ <Monitor size={16} />{busy && place === "browser" && <span aria-hidden="true" className="absolute right-1 top-1 size-1.5 animate-pulse rounded-full bg-success" data-testid="computer-button-live" />}</button>}{phoneMenu ? <ChatMoreMenu bot={bot} phoneHeader /> : (advanced || remoteClient) && <ChatHeaderMenu key={`menu:${bot.threadId}`} bot={bot} />}</div>diff --git a/src/components/ModelPicker.simple.test.ts b/src/components/ModelPicker.simple.test.tsindex f7d9aa03e5..7649ccde07 100644--- a/src/components/ModelPicker.simple.test.ts+++ b/src/components/ModelPicker.simple.test.ts@@ -374,7 +374,7 @@ describe("the model picker in Simple mode", () => {expect(String(chip.props.className)).toContain("rounded-full");expect(String(chip.props.className)).not.toMatch(/\bborder\b|bg-control/);expect(markup).not.toContain("@max-4xl/chathead");- expect(markup).toContain('<span class="min-w-0 max-w-[160px] truncate">Opus 5.5</span>');+ expect(markup).toContain('<span class="min-w-0 truncate max-w-[160px]">Opus 5.5</span>');expect(markup).toContain("opacity-60");fixture.advanced = true;const advanced = render(bot("high")).nodes.find((node) => node.props["data-tour"] === "model")!;@@ -403,11 +403,11 @@ describe("the model picker in Simple mode", () => {it("lets the contained trigger shrink inside the bot panel's Model row, and the loose one keep its size", () => {const contained = render(bot(), { contained: true }).nodes.find((node) => node.props["data-tour"] === "model")!;- expect(String(contained.props.className)).toContain("min-w-0 max-w-[58%]");+ expect(String(contained.props.className)).toContain("min-w-0 max-w-[72%]");expect(String(contained.props.className)).not.toMatch(/\bshrink-0\b/);const loose = render(bot()).nodes.find((node) => node.props["data-tour"] === "model")!;expect(String(loose.props.className)).toContain("shrink-0");- expect(String(loose.props.className)).not.toContain("max-w-[58%]");+ expect(String(loose.props.className)).not.toContain("max-w-[72%]");});it("puts the provider before a model the catalog names in one bare word, on the chip and the current row", () => {diff --git a/src/components/ModelPicker.tsx b/src/components/ModelPicker.tsxindex 0db8983bf7..61071d1157 100644--- a/src/components/ModelPicker.tsx+++ b/src/components/ModelPicker.tsx@@ -653,7 +653,7 @@ export function ModelPicker({className={cn("group flex items-center rounded-full text-[13px] leading-[18px] text-ink-secondary disabled:cursor-not-allowed disabled:text-ink-tertiary",contained- ? "min-w-0 max-w-[58%] transition-colors duration-150 hover:bg-ink/[0.06] hover:text-ink aria-expanded:bg-ink/[0.08] aria-expanded:text-ink disabled:hover:bg-transparent"+ ? "min-w-0 max-w-[72%] transition-colors duration-150 hover:bg-ink/[0.06] hover:text-ink aria-expanded:bg-ink/[0.08] aria-expanded:text-ink disabled:hover:bg-transparent": cn("shrink-0", ELEVATED_FLOAT, ELEVATED_HOVER, "hover:text-ink aria-expanded:text-ink disabled:hover:bg-composer"),size === "sm" ? "h-7 pl-2 pr-1.5" : "h-8 pl-2.5 pr-2",)}@@ -664,7 +664,7 @@ export function ModelPicker({: <span className="size-3.5 rounded-full bg-ink/[0.08]" aria-hidden="true" />}{attention && <span data-model-attention className="absolute -bottom-0.5 -right-0.5 size-1.5 rounded-full bg-warning ring-[1.5px] ring-app" />}</span>- <span className="min-w-0 max-w-[160px] truncate">{modelName(active, selection.model)}</span>+ <span className={cn("min-w-0 truncate", !contained && "max-w-[160px]")}>{modelName(active, selection.model)}</span>{selection.variant !== undefined && <span className="shrink-0 whitespace-pre">{variantSuffix(active, selection.model, selection.variant)}</span>}<UsageBars engine={selection.instanceId} className="ml-1.5" /><ChevronDown size={12} strokeWidth={2} aria-hidden="true" className="ml-1 shrink-0 text-ink-tertiary group-hover:text-ink-secondary" />diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsxindex 2b8aa4c7d3..a850fee716 100644--- a/src/components/SettingsModal.tsx+++ b/src/components/SettingsModal.tsx@@ -571,7 +571,7 @@ export function SettingsModal() {ref={scrollRef}data-settings-scrollclassName={cn(- "flex min-h-0 flex-1 flex-col gap-7 overflow-y-auto px-4 pb-8 pt-4 sm:px-8 sm:pb-7 sm:pt-[22px]",+ "flex min-h-0 flex-1 flex-col gap-7 overflow-y-auto px-4 pb-8 pt-4 [mask-image:linear-gradient(to_bottom,#000_calc(100%-28px),transparent)] sm:px-8 sm:pb-7 sm:pt-[22px]",SIMPLE_BUTTONS,"[&_.uppercase]:normal-case [&_.uppercase]:tracking-normal",)}diff --git a/src/components/SidebarInboxRow.tsx b/src/components/SidebarInboxRow.tsxindex 4204a3cf16..9d0205e9b5 100644--- a/src/components/SidebarInboxRow.tsx+++ b/src/components/SidebarInboxRow.tsx@@ -38,9 +38,9 @@ export function SidebarInboxRow({ icons, large, running, onOpened }: {);}return (- <div className="px-2 pb-1">+ <div className="px-3 pb-1"><button type="button" data-sidebar-inbox={count} aria-label={label} title={label} aria-pressed={open} onClick={toggle}- className={cn("flex w-full min-w-0 items-center gap-2.5 rounded-lg px-2 py-1.5 text-left outline-none hover:bg-raised/60 focus-visible:ring-2 focus-visible:ring-accent/60", open && "bg-raised")}>+ className={cn("flex w-full min-w-0 items-center gap-2.5 rounded-lg px-2 py-1.5 text-left outline-none hover:bg-raised/60 focus-visible:ring-2 focus-visible:ring-accent/60", open && "bg-raised/60")}><span className={cn("relative grid shrink-0 place-items-center rounded-full bg-raised text-ink-secondary", large ? "size-9" : "size-8")}><Inbox size={large ? 18 : 16} strokeWidth={1.75} aria-hidden="true" />{dot}diff --git a/src/components/SimpleModelMenu.tsx b/src/components/SimpleModelMenu.tsxindex 580435a189..7d5aefae6f 100644--- a/src/components/SimpleModelMenu.tsx+++ b/src/components/SimpleModelMenu.tsx@@ -169,7 +169,7 @@ function Thinking({ thinking, labelId }: { thinking: SimpleThinking; labelId: st<span id={labelId} className="text-[12px] font-medium leading-4 text-ink-tertiary">{t("botSettings.simple.thinking")}</span></div><div data-simple-effort role="group" aria-labelledby={labelId} className="m-1 grid rounded-full bg-ink/[0.05] p-[3px]"- style={{ gridTemplateColumns: `repeat(${levels.levels.length + 1}, minmax(0, 1fr))` }}>+ style={{ gridTemplateColumns: `repeat(${levels.levels.length + 1}, auto)` }}><button type="button" data-effort-pill data-effort-auto aria-pressed={auto} tabIndex={auto ? 0 : -1}title={t("model.simple.thinkingDefault")} onClick={levels.onReset} className={pill(auto)}>{t("model.simple.auto")}diff --git a/src/components/bot-panel/DetailsTab.tsx b/src/components/bot-panel/DetailsTab.tsxindex 1ba8aa774e..9e1241135d 100644--- a/src/components/bot-panel/DetailsTab.tsx+++ b/src/components/bot-panel/DetailsTab.tsx@@ -1,4 +1,4 @@-import { Calendar, CalendarPlus, Sparkles } from "lucide-react";+import { Calendar, CalendarPlus, ChevronRight, Sparkles } from "lucide-react";import { cn } from "@/lib/cn";import { t } from "@/lib/i18n";@@ -33,7 +33,9 @@ export function ItemRow({ item }: { item: SidebarMenuItem }) {{item.icon}</span><span className={cn("min-w-0 truncate text-[14px] font-medium", !wrapsValue && "flex-1", item.active ? "text-accent-text" : "text-ink")}>{item.label}</span>- {item.trailing && <span className={cn("flex items-center", wrapsValue ? "min-w-0 flex-1 justify-end text-right" : "shrink-0")}>{item.trailing}</span>}+ {item.trailing+ ? <span className={cn("flex items-center", wrapsValue ? "min-w-0 flex-1 justify-end text-right" : "shrink-0")}>{item.trailing}</span>+ : <ChevronRight size={15} aria-hidden="true" className="shrink-0 text-ink-tertiary rtl:-scale-x-100" />}</button>);}@@ -65,7 +67,7 @@ export function DetailsTab({ bot, derived, onOpen }: {{derived.botRoutines.length === 0 ? (<section data-panel-empty="routines"><CardLabel>{t("botSettings.simple.routines")}</CardLabel>- <p className="mx-1 text-[13px] leading-[18px] text-ink-tertiary">{t("botPanel.routines.empty")}</p>+ <p className="mx-1 text-[13px] leading-[18px] text-ink-tertiary">{t("botPanel.routines.emptyHint")}</p><buttontype="button"data-panel-page="routines"diff --git a/src/components/inbox/InboxPanel.tsx b/src/components/inbox/InboxPanel.tsxindex a72fa7e7e7..64c3d564d1 100644--- a/src/components/inbox/InboxPanel.tsx+++ b/src/components/inbox/InboxPanel.tsx@@ -59,25 +59,23 @@ export function InboxPanel() {const count = waitingCount(view);const body = (<>- <div className="flex items-center gap-1 px-2 pb-1 pt-2">- <div data-inbox-tab-chip className="flex h-8 min-w-0 max-w-[15rem] flex-1 items-center gap-2 rounded-lg bg-raised ps-2.5 pe-1 text-[13px]">- <Inbox size={15} aria-hidden="true" className="shrink-0 text-ink-secondary" />+ <div className="flex items-center gap-1 px-3 pb-1 pt-2">+ <div data-inbox-tab-chip className="flex h-8 min-w-0 flex-1 items-center gap-2 ps-1 text-[14px]">+ <Inbox size={16} aria-hidden="true" className="shrink-0 text-ink-secondary" /><span className="min-w-0 truncate font-medium text-ink">{t("inbox.panel.title")}</span>{count > 0 && <span data-inbox-tab-count className="shrink-0 tabular-nums text-ink-tertiary">{count}</span>}- <span className="flex-1" />- <button type="button" onClick={closeInbox} aria-label={t("inbox.action.closePanel")} title={t("inbox.action.closePanel")} className={cn(BAR_BUTTON, "size-6")}>- <X size={14} aria-hidden="true" />- </button></div>- <span className="flex-1" />{!phone && (<button type="button" onClick={() => widenInbox(!panel.wide)} aria-pressed={Boolean(panel.wide)} aria-label={t(panel.wide ? "inbox.action.narrow" : "inbox.action.widen")}title={t(panel.wide ? "inbox.action.narrow" : "inbox.action.widen")} className={BAR_BUTTON}>{panel.wide ? <Minimize2 size={14} aria-hidden="true" /> : <Maximize2 size={14} aria-hidden="true" />}</button>)}+ <button type="button" onClick={closeInbox} aria-label={t("inbox.action.closePanel")} title={t("inbox.action.closePanel")} className={BAR_BUTTON}>+ <X size={15} aria-hidden="true" />+ </button></div>- <div className="mx-1.5 mb-1.5 flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border border-hairline/40 bg-app/40">+ <div className="flex min-h-0 flex-1 flex-col overflow-hidden">{reading && view ? (<InboxReading view={view} row={reading} now={now} position={at >= 0 ? { index: at, count: rows.length } : null} onStep={step} />) : (diff --git a/src/locales/en.json b/src/locales/en.jsonindex 1ef0ab5384..7b4ce5b5a3 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -4255,6 +4255,7 @@"botPanel.tab.details": "Details","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.add": "Add a routine","botPanel.library.empty": "Pages, files, and apps this bot makes show up here","botPanel.library.pages": "Pages",