Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Features: list it under the place, with the device's own switches in an On this device group; mascot switch test
milind-sonibc7767b99ea4
diff --git a/shared/settings-places.ts b/shared/settings-places.tsindex b804241566..cd79d72077 100644--- a/shared/settings-places.ts+++ b/shared/settings-places.ts@@ -27,12 +27,12 @@ export const SETTINGS_PLACES = [{"id":"page:data","path":"Settings → Data","words":["data","storage","attachments","activity","audit"],"advanced":true},{"id":"page:people","path":"Settings → People","words":["people","members","invite","roles","bot access","sharing","team"],"only":"a team's or a self-hosted server's Settings, for admins"},{"id":"page:installations","path":"Settings → Installations","words":["installations","fleet","clients","tenants"],"only":"a server that manages installations"},+ {"id":"page:features","path":"Settings → Features","words":["features","turn off","turn on","hide","skill burger","skill burgers","mascot","animations","thread notes","tabs","thread tabs"]},{"id":"page:account","path":"Settings → Your account","words":["account","sign in","log in","log out","sign out","email","organization","mausbot cloud"]},{"id":"page:plan","path":"Settings → Plan & billing","words":["plan","billing","subscription","invoice","receipt","payment","card","upgrade","trial","cancel","refund","usage & billing","mausbot cloud","weekly","limits"]},{"id":"page:app","path":"Settings → This app","words":["this app","updates","update","version","help","about","servers","your computers","environments","diagnostics","logs","tour"]},{"id":"page:general","path":"Settings → General","words":["general","language","typing","send","enter","notifications","sounds","startup","login","analytics","privacy","talk"],"advanced":true},{"id":"page:appearance","path":"Settings → Appearance","words":["appearance","theme","skin","looks","dark mode","light mode","font","chat width","layout","threads","pins"]},- {"id":"page:features","path":"Settings → Features","words":["features","turn off","turn on","hide","skill burger","skill burgers","mascot","animations","thread notes","tabs","thread tabs"]},{"id":"add-device","path":"Settings → Devices → Add a device","words":["add a device","add device","new device","add a computer","add a server","add a phone","connect a device"]},{"id":"private-network","path":"Settings → Devices → Private network","words":["tailscale","tailnet","private network","vpn"],"only":"the desktop app, on this computer's own page"},{"id":"pair","path":"Settings → Phone & devices → Pair a phone","words":["phone","pair","pairing","qr","iphone","android","this server","pair a device","connect your phone","code","mobile","tablet","companion","get the phone app"]},diff --git a/src/components/settings/SettingsNav.tsx b/src/components/settings/SettingsNav.tsxindex a4c8ca4cc9..cb4670cff6 100644--- a/src/components/settings/SettingsNav.tsx+++ b/src/components/settings/SettingsNav.tsx@@ -321,7 +321,7 @@ function HitRow({ ctx, place, hit, query, onHit }: { ctx: SettingsContext; placeconst PAGE_OWNER: Record<SettingsPageId, SettingsOwner> = {overview: "place", devices: "place", phone: "place", ai: "place", bots: "place", desktops: "place", vault: "place", usage: "place", transfer: "place", storage: "place",- data: "place", people: "place", installations: "place", account: "account", plan: "account", app: "app", general: "app", appearance: "app", features: "app",+ data: "place", people: "place", installations: "place", account: "account", plan: "account", app: "app", general: "app", appearance: "app", features: "place",};const PAGE_KEY: Partial<Record<SettingsPageId, Parameters<typeof t>[0]>> = {diff --git a/src/components/settings/SettingsWindow.test.ts b/src/components/settings/SettingsWindow.test.tsindex 67e691b6e9..2ec3465b01 100644--- a/src/components/settings/SettingsWindow.test.ts+++ b/src/components/settings/SettingsWindow.test.ts@@ -55,7 +55,7 @@ describe("the Settings window", () => {it("opens with the place, Your account and This app, each headed by an identity row", () => {fixture.advanced = true;const html = render();- expect(navPages(html)).toEqual(["overview", "devices", "phone", "ai", "bots", "desktops", "vault", "usage", "transfer", "data", "account", "app", "general", "appearance", "features"]);+ expect(navPages(html)).toEqual(["overview", "devices", "phone", "ai", "bots", "desktops", "vault", "usage", "transfer", "data", "features", "account", "app", "general", "appearance"]);expect(html).toContain("This computer");expect(html).toContain("Your account");expect(html).toContain("This app");@@ -77,7 +77,7 @@ describe("the Settings window", () => {expect(render("appearance")).toContain("MausBot on this device");});- const SIMPLE_NAV = ["overview", "devices", "phone", "ai", "vault", "usage", "transfer", "account", "plan", "app", "appearance", "features"];+ const SIMPLE_NAV = ["overview", "devices", "phone", "ai", "vault", "usage", "transfer", "features", "account", "plan", "app", "appearance"];const SIMPLE_PEOPLE: Array<[string, () => void]> = [["a person with only this computer", () => vi.stubGlobal("window", desktopHere({ cloudAccount: { state: () => new Promise(() => {}), onState: () => () => {} } }))],["This computer's rail, with My Cloud", () => vi.stubGlobal("window", desktopHere({ cloudAccount: { state: () => new Promise(() => {}), onState: () => () => {} }, workspaces: { state: () => new Promise(() => {}), places: () => new Promise(() => {}) } }))],diff --git a/src/components/settings/pages/FeaturesPage.tsx b/src/components/settings/pages/FeaturesPage.tsxindex 7b6dc0fcc9..d6d64813e9 100644--- a/src/components/settings/pages/FeaturesPage.tsx+++ b/src/components/settings/pages/FeaturesPage.tsx@@ -54,14 +54,20 @@ const DeviceFeatureRow = ({ name }: { name: DeviceFeature }) => <FeatureRow nameexport function FeaturesPage() {const { ctx } = useSettingsShell();const placeSwitches = !ctx.client && !(ctx.team && !ctx.admin);- return (- <SettingsGroup block="features">+ return <>+ {placeSwitches && (+ <SettingsGroup block="features">+ <SettingsRows>+ <PlaceFeatureRow name="skillBurger" />+ <PlaceFeatureRow name="threadTabs" />+ </SettingsRows>+ </SettingsGroup>+ )}+ <SettingsGroup label={t("settings.account.onThisDevice")} block="this-device"><SettingsRows>- {placeSwitches && <PlaceFeatureRow name="skillBurger" />}- {placeSwitches && <PlaceFeatureRow name="threadTabs" />}<DeviceFeatureRow name="threadNotes" /><DeviceFeatureRow name="mascotMotion" /></SettingsRows></SettingsGroup>- );+ </>;}diff --git a/src/components/settings/settings-index.test.ts b/src/components/settings/settings-index.test.tsindex a0d52ed6ee..f3c7836413 100644--- a/src/components/settings/settings-index.test.ts+++ b/src/components/settings/settings-index.test.ts@@ -25,7 +25,7 @@ const PEOPLE = {describe("the pages", () => {it("lists the place's pages, then Your account, then This app, in one fixed order", () => {- expect(ids(fullContext())).toEqual([...PLACE_PAGES, "account", "plan", "app", "general", "appearance", "features"]);+ expect(ids(fullContext())).toEqual([...PLACE_PAGES, "features", "account", "plan", "app", "general", "appearance"]);});it.each(Object.entries(PEOPLE))("keeps the same place pages, in the same order, for %s", (who, ctx) => {@@ -36,7 +36,7 @@ describe("the pages", () => {it.each(["local only", "This computer, with My Cloud", "My Cloud's page in the desktop window", "My Cloud in a browser (owner)"] as const)("shows Simple's eleven entries for %s", (who) => {- expect(ids({ ...PEOPLE[who], advanced: false })).toEqual(["overview", "devices", "phone", "ai", "vault", "usage", "transfer", "account", "plan", "app", "appearance", "features"]);+ expect(ids({ ...PEOPLE[who], advanced: false })).toEqual(["overview", "devices", "phone", "ai", "vault", "usage", "transfer", "features", "account", "plan", "app", "appearance"]);});it("is shorter in Simple: the four Advanced pages come back in Advanced, in place", () => {@@ -112,7 +112,7 @@ describe("the pages", () => {});it("drops the place's pages and Plan & billing for a paired client, which keeps This app", () => {- expect(ids(fullContext({ client: true }))).toEqual(["overview", "account", "app", "general", "appearance", "features"]);+ expect(ids(fullContext({ client: true }))).toEqual(["overview", "features", "account", "app", "general", "appearance"]);});});diff --git a/src/components/settings/settings-index.ts b/src/components/settings/settings-index.tsindex 8848b2975b..13ac5af9bd 100644--- a/src/components/settings/settings-index.ts+++ b/src/components/settings/settings-index.ts@@ -51,8 +51,8 @@ const notClient = (ctx: SettingsContext) => !ctx.client;const adminPage = (ctx: SettingsContext) => !ctx.client && !(ctx.team && !ctx.admin);/** A page Simple mode leaves out: its everyday rows show elsewhere in Simple (Overview, This app, Plan & billing). */const advancedOnly = (when: (ctx: SettingsContext) => boolean) => (ctx: SettingsContext) => ctx.advanced && when(ctx);-/** Simple mode's twelve entries: the place (Overview, Devices, Phone & devices, AI, Vault, Spending, Import & export, and Storage- * on a Cloud), Your account (Plan & billing) and This app (Appearance, Features). Advanced adds You and your bots, Desktops & browser,+/** Simple mode's twelve entries: the place (Overview, Devices, Phone & devices, AI, Vault, Spending, Import & export, Storage+ * on a Cloud, and Features), Your account (Plan & billing) and This app (Appearance). Advanced adds You and your bots, Desktops & browser,* Data and General. */export const ADVANCED_PAGES: readonly SettingsPageId[] = ["bots", "desktops", "data", "general"];@@ -83,6 +83,8 @@ export const SETTINGS_PAGES: readonly SettingsPage[] = [synonyms: ["people", "members", "invite", "roles", "bot access", "sharing", "team"] },{ id: "installations", owner: "place", labelKey: "settings.section.workspaces", icon: Server, when: (ctx) => !ctx.client && ctx.installations,synonyms: ["installations", "fleet", "clients", "tenants"] },+ { id: "features", owner: "place", labelKey: "settings.page.features", icon: ToggleRight, when: () => true,+ synonyms: ["features", "turn off", "turn on", "hide", "skill burger", "skill burgers", "mascot", "animations", "thread notes", "tabs", "thread tabs"] },{ id: "account", owner: "account", labelKey: "settings.page.account", when: () => true,synonyms: ["account", "sign in", "log in", "log out", "sign out", "email", "organization", "mausbot cloud"] },{ id: "plan", owner: "account", labelKey: "settings.page.plan", icon: CreditCard, when: (ctx) => !ctx.client && ctx.plan,@@ -93,8 +95,6 @@ export const SETTINGS_PAGES: readonly SettingsPage[] = [synonyms: ["general", "language", "typing", "send", "enter", "notifications", "sounds", "startup", "login", "analytics", "privacy", "talk"] },{ id: "appearance", owner: "app", labelKey: "settings.section.appearance", icon: Palette, when: () => true,synonyms: ["appearance", "theme", "skin", "looks", "dark mode", "light mode", "font", "chat width", "layout", "threads", "pins"] },- { id: "features", owner: "app", labelKey: "settings.page.features", icon: ToggleRight, when: () => true,- synonyms: ["features", "turn off", "turn on", "hide", "skill burger", "skill burgers", "mascot", "animations", "thread notes", "tabs", "thread tabs"] },];export const OWNERS: readonly SettingsOwner[] = ["place", "account", "app"];@@ -256,8 +256,8 @@ export const SETTINGS_INDEX: readonly SettingsIndexEntry[] = [{ id: "layout", page: "appearance", anchor: "appearance", labelKey: "settings.appearance.layout", advanced: true, synonyms: ["show your computers", "rail", "window frame", "title bar", "threads", "tools layout", "pinned", "circles", "universal pins", "pinned panels"] },{ id: "skill-burger-switch", page: "features", anchor: "features", labelKey: "settings.features.skillBurger", when: (ctx) => !ctx.client && !(ctx.team && !ctx.admin), topFor: ["skill burger", "skill burgers"], synonyms: ["burger", "saved runs", "workflows"] },{ id: "thread-tabs", page: "features", anchor: "features", labelKey: "settings.features.threadTabs", when: (ctx) => !ctx.client && !(ctx.team && !ctx.admin), synonyms: ["tabs", "threads"] },- { id: "thread-notes", page: "features", anchor: "features", labelKey: "settings.features.threadNotes", synonyms: ["saved to this thread", "notes", "memory line"] },- { id: "mascot-motion", page: "features", anchor: "features", labelKey: "settings.features.mascotMotion", topFor: ["mascot", "animations"], synonyms: ["motion", "still", "moving"] },+ { id: "thread-notes", page: "features", anchor: "this-device", labelKey: "settings.features.threadNotes", synonyms: ["saved to this thread", "notes", "memory line"] },+ { id: "mascot-motion", page: "features", anchor: "this-device", labelKey: "settings.features.mascotMotion", topFor: ["mascot", "animations"], synonyms: ["motion", "still", "moving"] },{ id: "apps", page: "overview", labelKey: "settings.search.apps", jump: "apps", synonyms: ["apps", "gmail", "slack", "calendar", "notion", "connect app", "integrations"] },{ id: "bot-settings", page: "overview", labelKey: "settings.search.bot", jump: "bot", synonyms: ["approvals", "safety", "routines", "memory", "bot's notifications"] },{ id: "shortcuts", page: "app", labelKey: "sidebar.menu.shortcuts", jump: "shortcuts", synonyms: ["keyboard shortcuts", "hotkeys", "cheat sheet"] },diff --git a/src/components/skill-burger/feature-gate.test.ts b/src/components/skill-burger/feature-gate.test.tsindex b30d55ff50..fa44d59198 100644--- a/src/components/skill-burger/feature-gate.test.ts+++ b/src/components/skill-burger/feature-gate.test.ts@@ -1,5 +1,6 @@// Settings → Features: Skill Burger off takes its chat card, its menu entries, its page and the bot panel's saved list-// away; thread notes off takes the "Saved to this thread" line away. Nothing saved is touched, so on brings it all back.+// away; thread notes off takes the "Saved to this thread" line away; mascot animations off holds mascots still. Nothing+// saved is touched, so on brings it all back.import { readFileSync } from "node:fs";import { createElement } from "react";import { renderToStaticMarkup } from "react-dom/server";@@ -71,3 +72,16 @@ describe("the thread notes switch", () => {expect(line()).toContain("Saved to this thread");});});++describe("the mascot animations switch", () => {+ it("holds mascots still while off, as reduced motion does, and lets them move again once on", async () => {+ const { useMascotStill } = await import("../mascot-clock");+ const Probe = () => createElement("i", null, String(useMascotStill()));+ const still = () => renderToStaticMarkup(createElement(Probe));+ expect(still()).toBe("<i>false</i>");+ setDeviceFeature("mascotMotion", false);+ expect(still()).toBe("<i>true</i>");+ setDeviceFeature("mascotMotion", true);+ expect(still()).toBe("<i>false</i>");+ });+});