Skip to content

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

Make Simple the only mode (flip, reversible) (#5007)

Milind Soni1de1164d5040
diff --git a/apps/docs/content/docs/security/analytics.mdx b/apps/docs/content/docs/security/analytics.mdx
index 498a65a0a9..737fcf2626 100644
--- a/apps/docs/content/docs/security/analytics.mdx
+++ b/apps/docs/content/docs/security/analytics.mdx
@@ -129,7 +129,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin
| --- | --- | --- |
| `app_first_open` | The first time this app page starts with analytics on | `platform`: `desktop`, `browser` |
| `app_opened` | Each time this app page starts with analytics on | `platform`: `desktop`, `browser` |
-| `app_active` | Once a day you use the app: when this app page starts, comes into view or is focused, or when a check every ten minutes finds a new day while the page is in view and focused. At most once per day by your computer's date for each app page, and never while the page is hidden | `platform`: `desktop`, `browser`; `mode`: `simple`, `advanced`, the look this app page is in when it counts the day |
+| `app_active` | Once a day you use the app: when this app page starts, comes into view or is focused, or when a check every ten minutes finds a new day while the page is in view and focused. At most once per day by your computer's date for each app page, and never while the page is hidden | `platform`: `desktop`, `browser`; `mode`: `simple`, the look this app page is in when it counts the day, the only one now (earlier versions also sent `advanced`) |
| `onboarding_step` | A first-run screen is shown | `step`: `meet`, `chief`; `replay`: true/false |
| `onboarding_completed` | The first run ends in the chat | `reason`: `completed`; `at`: the screen it ended on; `replay`: true/false |
| `setup_import_applied` | You bring in the skills and MCP servers found from other AI tools on this computer, in Settings → Import | `skills`, `tools`: how many were added. Never their names or where they came from |
@@ -166,6 +166,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin
| `product_hunt_card` | You act on the Product Hunt card | `action`: `upvote`, `not_now`, `close` |
| `boat_offer` | Boat's credit offer: its one-time card is shown or you act on it, or you act on it on the Boat card in Settings → API keys | `action`: `shown` (the card only), `get_boat`, `claim` (the drafted email to Boat opened), `not_now`, `close`; `place`: `card`, `settings` |
| `simple_mode_prompt` | The Simple mode popup, shown once in each browser after an update when nothing else is on screen, is shown, its Simple mode switch is flipped, or it is closed (Done, the X, Escape or a click outside) | `action`: `shown`, `toggled`, `closed`; `mode`: `simple`, `advanced`, the mode it was shown or closed in, or the one a flip turned on |
+| `new_look_notice` | The notice that Simple is now the only look, shown once in each browser that was on Advanced mode, when nothing else is on screen, is shown or closed (Done, the X, Escape or a click outside) | `action`: `shown`, `closed` |
| `grok_move_popup` | The one-time Move from Grok Bot popup is shown or you act on it | `action`: `shown`, `start`, `not_now`, `close` |
| `two_places_card` | You act on the card that says your bots live in two places (this computer and a server of your own, or My Cloud) | `action`: `bring`, `not_now`; `kind`: `server`, `cloud`, the place it offered |
diff --git a/docs/analytics.md b/docs/analytics.md
index 0d6887a193..c15f454924 100644
--- a/docs/analytics.md
+++ b/docs/analytics.md
@@ -125,7 +125,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin
| --- | --- | --- |
| `app_first_open` | The first time this app page starts with analytics on | `platform`: `desktop`, `browser` |
| `app_opened` | Each time this app page starts with analytics on | `platform`: `desktop`, `browser` |
-| `app_active` | Once a day you use the app: when this app page starts, comes into view or is focused, or when a check every ten minutes finds a new day while the page is in view and focused. At most once per day by your computer's date for each app page, and never while the page is hidden | `platform`: `desktop`, `browser`; `mode`: `simple`, `advanced`, the look this app page is in when it counts the day |
+| `app_active` | Once a day you use the app: when this app page starts, comes into view or is focused, or when a check every ten minutes finds a new day while the page is in view and focused. At most once per day by your computer's date for each app page, and never while the page is hidden | `platform`: `desktop`, `browser`; `mode`: `simple`, the look this app page is in when it counts the day, the only one now (earlier versions also sent `advanced`) |
| `onboarding_step` | A first-run screen is shown | `step`: `meet`, `chief`; `replay`: true/false |
| `onboarding_completed` | The first run ends in the chat | `reason`: `completed`; `at`: the screen it ended on; `replay`: true/false |
| `setup_import_applied` | You bring in the skills and MCP servers found from other AI tools on this computer, in Settings → Import | `skills`, `tools`: how many were added. Never their names or where they came from |
@@ -162,6 +162,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin
| `product_hunt_card` | You act on the Product Hunt card | `action`: `upvote`, `not_now`, `close` |
| `boat_offer` | Boat's credit offer: its one-time card is shown or you act on it, or you act on it on the Boat card in Settings → API keys | `action`: `shown` (the card only), `get_boat`, `claim` (the drafted email to Boat opened), `not_now`, `close`; `place`: `card`, `settings` |
| `simple_mode_prompt` | The Simple mode popup, shown once in each browser after an update when nothing else is on screen, is shown, its Simple mode switch is flipped, or it is closed (Done, the X, Escape or a click outside) | `action`: `shown`, `toggled`, `closed`; `mode`: `simple`, `advanced`, the mode it was shown or closed in, or the one a flip turned on |
+| `new_look_notice` | The notice that Simple is now the only look, shown once in each browser that was on Advanced mode, when nothing else is on screen, is shown or closed (Done, the X, Escape or a click outside) | `action`: `shown`, `closed` |
| `grok_move_popup` | The one-time Move from Grok Bot popup is shown or you act on it | `action`: `shown`, `start`, `not_now`, `close` |
| `two_places_card` | You act on the card that says your bots live in two places (this computer and a server of your own, or My Cloud) | `action`: `bring`, `not_now`; `kind`: `server`, `cloud`, the place it offered |
diff --git a/scripts/testing/bot-tools-ui.e2e.test.ts b/scripts/testing/bot-tools-ui.e2e.test.ts
index 58182d514f..6d6ed7f1f4 100644
--- a/scripts/testing/bot-tools-ui.e2e.test.ts
+++ b/scripts/testing/bot-tools-ui.e2e.test.ts
@@ -53,17 +53,20 @@ describe("bot setup and tools in the real renderer", () => {
const press = (keys: string) => ui("press", "--keys", keys);
const bots = async (): Promise<SavedBot[]> => (await fetch(`${info.url}/api/bots`).then((response) => response.json())).bots;
const snapshot = async () => (await ui("snapshot")).snapshot as string;
- const openTools = async () => {
- // Open the profile from the chat header. A remembered section can
- // already have the Access row expanded, so expand only when collapsed.
- const state = await ui("snapshot", "--interactive");
- const profile = Object.entries(state.refs as Record<string, { role: string; name: string }>)
- .find(([, entry]) => entry.role === "button" && /Open .+ profile/.test(entry.name));
- expect(profile).toBeDefined();
- await ui("click", "--ref", `@${profile![0]}`);
- const accessExpanded = () => evaluate("[...document.querySelectorAll('[role=dialog] button')].find(b => b.textContent.trim() === 'Access')?.getAttribute('aria-expanded')");
- await expect.poll(accessExpanded, { timeout: 10_000 }).toMatch(/^(?:true|false)$/);
- if ((await accessExpanded()) !== "true") await click("Access");
+ // The bot's panel opens from the chat header's pill; click it only while closed.
+ const openPanel = () => expect.poll(() => evaluate(`(() => {
+ if (document.querySelector('[data-chathead-pill][aria-expanded="true"]')) return true;
+ document.querySelector('[data-chathead-pill]')?.click();
+ return false;
+ })()`), { timeout: 10_000 }).toBe(true);
+ // Its MCP servers are on Bot settings → Apps it can use.
+ const openApps = async () => {
+ await openPanel();
+ // The panel is a lazy chunk; its gear opens Bot settings once it has painted.
+ await expect.poll(() => evaluate("(() => { const gear = document.querySelector('[data-panel-gear]'); gear?.click(); return Boolean(gear); })()"), { timeout: 10_000 }).toBe(true);
+ await expect.poll(() => evaluate("Boolean(document.querySelector('[data-panel-page=\"apps\"]'))"), { timeout: 10_000 }).toBe(true);
+ await evaluate("document.querySelector('[data-panel-page=\"apps\"]').click(); true");
+ await expect.poll(snapshot, { timeout: 10_000 }).toContain("Connect another app");
};
const reviewReadyBot = async (name: string, title: string) => {
await click("New or share");
@@ -111,38 +114,50 @@ describe("bot setup and tools in the real renderer", () => {
// exercises the same external open action as the shipped chat header.
await runControlOmb(["send", "--bot", created[0].id, "--text", "Reply briefly for the sidebar test.", "--url", info.url]);
expect((await runControlOmb(["wait", "--bot", created[0].id, "--timeout", "20", "--url", info.url]) as { status: string }).status).toBe("settled");
- await openTools();
- await expect.poll(snapshot, { timeout: 10_000 }).toContain("No MCP servers added yet.");
- const usageExpanded = () => evaluate("[...document.querySelectorAll('[role=dialog] button')].find(b => b.textContent.trim() === 'Usage')?.getAttribute('aria-expanded')");
- const openHeaderUsage = async () => {
- await click("More");
+ await openApps();
+ expect(await evaluate("Boolean(document.querySelector('[data-simple-mcp]'))")).toBe(false);
+ const settingsPage = () => evaluate("document.querySelector('[data-settings-page][aria-current=\"page\"]')?.getAttribute('data-settings-page') ?? null");
+ const searchValue = () => evaluate("document.querySelector('[data-settings-search]')?.value ?? null");
+ // The panel's Usage row shows what this bot has spent and opens Settings on Usage & billing.
+ const openPanelUsage = async () => {
+ await openPanel();
+ // Back out of any page to the panel's tabs, then to Details.
+ await expect.poll(() => evaluate(`(() => {
+ const back = document.querySelector('[data-panel-back]');
+ if (back) { back.click(); return false; }
+ if (document.querySelector('[data-panel-tabpanel="details"]')) return true;
+ [...document.querySelectorAll('[role="tab"]')].find((tab) => tab.textContent.trim() === 'Details')?.click();
+ return false;
+ })()`), { timeout: 10_000 }).toBe(true);
const state = await ui("snapshot", "--interactive");
const cost = Object.entries(state.refs as Record<string, { role: string; name: string }>)
- .filter(([, entry]) => entry.role === "menuitem" && entry.name.includes("$0.01"));
+ .filter(([, entry]) => entry.role === "button" && entry.name.startsWith("Usage") && entry.name.includes("$0.01"));
expect(cost).toHaveLength(1);
await ui("click", "--ref", `@${cost[0][0]}`);
- await expect.poll(usageExpanded, { timeout: 10_000 }).toBe("true");
- expect(await snapshot()).toContain("All bots");
- // Allow subpixel rounding at the bottom edge of the scroll viewport.
- await expect.poll(() => evaluate("(() => { const row = document.querySelector('[data-bot-settings-section=usage]'); const rect = row?.getBoundingClientRect(); return rect ? Math.max(-rect.top, rect.bottom - innerHeight) : 9999; })()"), { timeout: 10_000 }).toBeLessThanOrEqual(1);
+ await expect.poll(settingsPage, { timeout: 10_000 }).toBe("billing");
+ };
+ // The bot panel's close button has the same name, so press the one in the Settings dialog.
+ const closeSettings = async () => {
+ await evaluate("document.querySelector('[data-settings-search]').closest('[role=dialog]').querySelector('button[aria-label=\"Close settings\"]').click(); true");
+ await expect.poll(() => evaluate("Boolean(document.querySelector('[data-settings-search]'))"), { timeout: 10_000 }).toBe(false);
};
- await openHeaderUsage();
- await click("Usage");
- expect(await usageExpanded()).toBe("false");
- await openHeaderUsage(); // same section, already mounted, after collapse
+ await openPanelUsage();
+ await ui("screenshot", "--out", `${info.logPath}.settings.png`);
const search = await ui("snapshot", "--interactive");
const searchRef = Object.entries(search.refs as Record<string, { role: string; name: string }>)
.find(([, entry]) => entry.role === "textbox" && entry.name === "Search settings");
expect(searchRef).toBeDefined();
await ui("type", "--ref", `@${searchRef![0]}`, "--text", "standing");
- expect(await evaluate("document.querySelector('[aria-label=\"Search settings\"]')?.value")).toBe("standing");
- await openHeaderUsage(); // a stale search must not hide an external target
- expect(await evaluate("document.querySelector('[aria-label=\"Search settings\"]')?.value")).toBe("");
- await ui("screenshot", "--out", `${info.logPath}.settings.png`);
- await click("Overview");
- await expect.poll(snapshot, { timeout: 10_000 }).toContain("Optional ways to customize this bot. You can start chatting now.");
- await click("Access");
- await click("Add an MCP server…");
+ expect(await searchValue()).toBe("standing");
+ await closeSettings();
+ await openPanelUsage(); // a stale search must not hide an external target
+ expect(await searchValue()).toBe("");
+ await closeSettings();
+
+ // Add the server where every app is added, from the panel's Connect another app.
+ await openApps();
+ await evaluate("document.querySelector('[data-panel-link=\"add-app\"]').click(); true");
+ await click("MCP servers");
// The registry loads on mount; Add MCP server is disabled until it finishes.
await expect.poll(() => evaluate("[...document.querySelectorAll('button')].find(b => b.textContent.trim() === 'Add MCP server')?.disabled"), { timeout: 10_000 }).toBe(false);
await click("Add MCP server");
@@ -154,7 +169,14 @@ describe("bot setup and tools in the real renderer", () => {
await ui("type", "--ref", `@${textarea![0]}`, "--text", JSON.stringify({ mcpServers: {
fixture: { command: process.execPath, args: ["-e", "process.exit(0)"] },
} }));
- await click("Add");
+ // The composer's Add shares the name: press the one beside the pasted setup.
+ await evaluate(`(() => {
+ for (let box = document.querySelector('textarea[aria-label="Server link or setup command"]'); box; box = box.parentElement) {
+ const add = [...box.querySelectorAll('button')].find((button) => button.textContent.trim() === 'Add');
+ if (add) { add.click(); return true; }
+ }
+ return false;
+ })()`);
const registry = async () => (await fetch(`${info.url}/api/mcp/servers`).then((response) => response.json())).servers;
// It exits before answering, so it is saved but stays off, with the reason on its row.
await expect.poll(registry, { timeout: 10_000 }).toMatchObject([{ name: "fixture", enabled: false }]);
@@ -163,13 +185,15 @@ describe("bot setup and tools in the real renderer", () => {
await click("Turn fixture on");
await expect.poll(registry, { timeout: 10_000 }).toMatchObject([{ name: "fixture", enabled: true }]);
await press("Escape");
- await openTools();
- await expect.poll(() => evaluate("document.querySelector('[aria-label=\"Let this bot use fixture\"]')?.getAttribute('aria-checked')"), { timeout: 10_000 }).toBe("true");
- await click("Let this bot use fixture");
+ const useFixture = `${created[0].name} can use fixture`;
+ const fixtureSwitch = () => evaluate(`document.querySelector(${JSON.stringify(`[aria-label="${useFixture}"]`)})?.getAttribute('aria-checked') ?? null`);
+ await openApps();
+ await expect.poll(fixtureSwitch, { timeout: 10_000 }).toBe("true");
+ await click(useFixture);
await expect.poll(async () => (await bots()).find((bot) => bot.id === created[0].id)?.mcpServers, { timeout: 10_000 }).toEqual([]);
await press("Escape");
- await openTools();
- await expect.poll(() => evaluate("document.querySelector('[aria-label=\"Let this bot use fixture\"]')?.getAttribute('aria-checked')"), { timeout: 10_000 }).toBe("false");
+ await openApps();
+ await expect.poll(fixtureSwitch, { timeout: 10_000 }).toBe("false");
// New bot from above settings puts the new bot's chat in front: no
// modal is left behind to hold the focus.
diff --git a/scripts/testing/computer-panel-focus-ui.e2e.test.ts b/scripts/testing/computer-panel-focus-ui.e2e.test.ts
index fe21eeed4a..aa51a8cc7e 100644
--- a/scripts/testing/computer-panel-focus-ui.e2e.test.ts
+++ b/scripts/testing/computer-panel-focus-ui.e2e.test.ts
@@ -43,8 +43,6 @@ if (!enabled) console.info("skipping computer panel focus UI e2e: set OMB_UI_E2E
})()`);
const panelOpen = () => visible('[data-computer-panel-close]');
- // The chat header only carries the computer button in advanced mode.
- await evaluate("(async () => { const mode = await import('/src/lib/interface-mode.ts'); mode.setAdvancedMode(true); return true; })()");
await expect.poll(() => visible('[data-tour="computer"]'), { timeout: 15_000 }).toBe(true);
await evaluate("(() => { document.querySelector('[data-tour=\"computer\"]').focus(); return true; })()");
diff --git a/scripts/testing/control-omb-ui.e2e.test.ts b/scripts/testing/control-omb-ui.e2e.test.ts
index 2ff4950d1c..cd4aecb61d 100644
--- a/scripts/testing/control-omb-ui.e2e.test.ts
+++ b/scripts/testing/control-omb-ui.e2e.test.ts
@@ -35,7 +35,6 @@ const TOOL_CALLS = JSON.stringify([
{ name: "Bash", input: { command: "pnpm control:omb ui flag --set features.showToolCalls=true --dry-run" }, ok: true },
]);
const REPLY = "hello from fake claude"; // the fake engine's default reply text
-const COMPOSER = `document.querySelector('textarea[aria-label="Message Pepper"]')`;
// OMB_UI_EVIDENCE_DIR keeps the screenshot (CI uploads it); otherwise it is temporary.
const evidenceDir = process.env.OMB_UI_EVIDENCE_DIR ? resolve(ROOT, process.env.OMB_UI_EVIDENCE_DIR) : mkdtempSync(join(tmpdir(), "omb-ui-evidence-"));
const ownsEvidenceDir = !process.env.OMB_UI_EVIDENCE_DIR;
@@ -118,7 +117,8 @@ describe("control-omb ui drives the real renderer", () => {
await ui("type", info.ui, "--name", "Message Pepper", "--text", "Find the striped zebra");
await ui("press", info.ui, "--keys", "Enter");
await ui("wait-settle", info.ui, "--timeout", "60");
- await ui("click", info.ui, "--name", "More");
+ // The chat's ⋯ items live in the bot panel, which the chat header's pill opens.
+ await ui("click", info.ui, "--name", "Open Pepper's profile");
await ui("click", info.ui, "--name", "Find in conversation");
await ui("type", info.ui, "--name", "Find in this conversation", "--text", "zebra");
const highlighted = async () => (await ui("eval", info.ui, "--js", "[...CSS.highlights.get('search-result-text') ?? []][0]?.toString() ?? null")).result;
@@ -144,7 +144,11 @@ describe("control-omb ui drives the real renderer", () => {
await ui("type", info.ui, "--name", "Find in this conversation", "--text", "fake claude");
await expect.poll(highlighted, { timeout: 10_000 }).toBe("fake claude");
await ui("press", info.ui, "--keys", "Escape");
- await ui("type", info.ui, "--name", "Search bots and messages", "--text", "zebra");
+ // The sidebar's search opens from its button into a field of the same name.
+ await ui("click", info.ui, "--name", "Search bots and messages");
+ const [searchField] = refsNamed(await ui("snapshot", info.ui, "--interactive"), "Search bots and messages", "textbox");
+ expect(searchField).toBeDefined();
+ await ui("type", info.ui, "--ref", searchField, "--text", "zebra");
await expect.poll(async () => (await ui("eval", info.ui, "--js", "[...document.querySelectorAll('mark')].some(mark => mark.textContent === 'zebra')")).result, { timeout: 10_000 }).toBe(true);
await ui("eval", info.ui, "--js", "[...document.querySelectorAll('mark')].find(mark => mark.textContent === 'zebra').closest('button').click(); true");
await expect.poll(highlighted, { timeout: 10_000 }).toBe("zebra");
@@ -193,11 +197,11 @@ describe("control-omb ui drives the real renderer", () => {
})()`);
await click("You");
await click("Settings");
- // Settings is a lazy chunk: it paints once the chunk arrives.
+ // Settings is a lazy chunk: it paints once the chunk arrives. Keys sit on the AI page, under API keys.
await expect.poll(() => evaluate(`(() => {
- const tab = [...document.querySelectorAll('button')].find(b => b.textContent.trim() === 'API keys');
- tab?.click();
- return Boolean(tab);
+ document.querySelector('[data-settings-page="ai"]')?.click();
+ document.querySelector('[data-settings-disclosure="ai-keys"] button[aria-expanded="false"]')?.click();
+ return Boolean(${row}?.checkVisibility());
})()`), { timeout: 10_000 }).toBe(true);
// The servers section opens on its own, because a key is saved there.
await expect.poll(masked, { timeout: 10_000 }).toContain("••••••••-key");
@@ -261,28 +265,24 @@ describe("control-omb ui drives the real renderer", () => {
const options = models.instances.find((instance: any) => instance.instanceId === originalBot.modelSelection.instanceId).models.options;
const originalLabel = options.find((option: any) => option.id === originalModel).label;
const nextModel = options.find((option: any) => option.id !== originalModel);
+ // The picker sets the bot's model, which every chat of it uses.
+ const threadModel = async () => (await savedBot()).tasks.find((task: any) => task.threadId === originalBot.threadId).modelSelection.model;
await ui("click", info.ui, "--name", originalLabel);
- expect(await ui("eval", info.ui, "--js", "[...document.querySelectorAll('[aria-label=\"Apply model changes to\"] button')].find(b => b.textContent === 'Only this thread').getAttribute('aria-pressed')"))
- .toMatchObject({ result: "true" });
- await ui("click", info.ui, "--name", "Thread + bot default");
- const scopeShot = join(evidenceDir, "model-scope.png");
+ await expect.poll(async () => (await ui("snapshot", info.ui)).snapshot, { timeout: 10_000 }).toContain("Pepper's model, used in all its chats");
mkdirSync(evidenceDir, { recursive: true });
- await ui("screenshot", info.ui, "--out", scopeShot);
+ await ui("screenshot", info.ui, "--out", join(evidenceDir, "model-picker.png"));
await ui("click", info.ui, "--name", nextModel.label);
await expect.poll(async () => (await savedBot()).modelSelection.model, { timeout: 10_000 }).toBe(nextModel.id);
- expect((await savedBot()).tasks.find((task: any) => task.threadId === originalBot.threadId).modelSelection.model).toBe(nextModel.id);
+ expect(await threadModel()).toBe(nextModel.id);
// A model with reasoning levels keeps the menu open after the pick, so its level can be set next.
expect(await ui("eval", info.ui, "--js", "String(Boolean(document.querySelector('[data-model-picker-content]')))"))
.toMatchObject({ result: "true" });
- await ui("click", info.ui, "--name", "Only this thread");
const modelSnapshot = await ui("snapshot", info.ui, "--interactive");
- const originalRow = Object.entries(modelSnapshot.refs as Record<string, { name: string; role: string }>)
- .find(([, value]) => value.role === "button" && value.name.startsWith(originalLabel));
+ const [originalRow] = refsNamed(modelSnapshot, originalLabel, "button");
expect(originalRow).toBeDefined();
- await ui("click", info.ui, "--ref", `@${originalRow![0]}`);
- await expect.poll(async () => (await savedBot()).tasks.find((task: any) => task.threadId === originalBot.threadId).modelSelection.model,
- { timeout: 10_000 }).toBe(originalModel);
- expect((await savedBot()).modelSelection.model).toBe(nextModel.id);
+ await ui("click", info.ui, "--ref", originalRow);
+ await expect.poll(async () => (await savedBot()).modelSelection.model, { timeout: 10_000 }).toBe(originalModel);
+ expect(await threadModel()).toBe(originalModel);
expect((await savedBot()).approvalMode).toBe(originalBot.approvalMode);
// The menu is still open after that pick; close it before using the composer.
await ui("press", info.ui, "--keys", "Escape");
@@ -314,32 +314,11 @@ describe("control-omb ui drives the real renderer", () => {
const transcript = tree.slice(transcriptStart);
expect(transcript).toContain('StaticText "hello"'); // the sent turn
expect(transcript).toContain(`StaticText "${REPLY}"`);
- expect(transcript).toMatch(/StaticText "Bash"/);
+ // The scripted Bash calls, in plain words, and the turn's count of them.
+ expect(transcript).toContain('StaticText "Run a command"');
+ expect(transcript).toContain("Did 3 tool calls");
expect(tree).not.toContain("Not logged in");
expect(tree).not.toContain("Execution timeline");
- // All three scripted commands go through the control CLI, so all are verified.
- expect(tree).toContain("3 steps · 3 verified · 1 failed · 1 dry run");
-
- // Hit-test the actual layout, not just the Tailwind class strings: the
- // blank band beside the floating card must reach the transcript while
- // the card and composer remain interactive.
- const hitTest = await ui("eval", info.ui, "--js", `(() => {
- const card = document.querySelector('section[aria-label="This run"]');
- const dock = card.parentElement.parentElement;
- const rect = card.getBoundingClientRect();
- const blank = document.elementFromPoint(dock.getBoundingClientRect().left + 8, rect.top + rect.height / 2);
- const onCard = document.elementFromPoint(rect.left + 20, rect.top + 20);
- const scroll = document.querySelector('[role="log"]').parentElement;
- const composer = ${COMPOSER};
- const input = composer.getBoundingClientRect();
- return {
- blankReachesTranscript: scroll.contains(blank) && !dock.contains(blank) && getComputedStyle(scroll).overflowY === 'auto',
- cardInteractive: card.contains(onCard),
- composerInteractive: document.elementFromPoint(input.left + input.width / 2, input.top + input.height / 2) === composer,
- };
- })()`);
- expect(hitTest).toMatchObject({ result: { blankReachesTranscript: true, cardInteractive: true, composerInteractive: true } });
-
expect(await runControlOmb(["doctor", "--url", info.url])).toMatchObject({ ok: true });
await expect(ui("click", info.ui, "--name", "Deliberately missing QA control")).rejects.toThrow("no element is named");
@@ -367,31 +346,7 @@ describe("control-omb ui drives the real renderer", () => {
expect(png.length).toBeGreaterThan(1_000);
expect(png.subarray(0, 8)).toEqual(Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]));
- const rowsBefore = await ui("eval", info.ui, "--js", "document.querySelectorAll('[data-mid]').length");
- await ui("click", info.ui, "--name", "Save as skill");
- const drafted = await ui("eval", info.ui, "--js", `${COMPOSER}.value`);
- expect(drafted.ok).toBe(true);
- const draft = drafted.result as string;
- expect(draft.startsWith("Create a verification skill from the run below.\nGoal: hello\n")).toBe(true);
- expect(draft).toContain("✓ doctor — pnpm control:omb doctor (verified)\n");
- expect(draft).toContain("✗ ui — pnpm control:omb ui click --name Missing (verified)\n");
- expect(draft).toContain("[dry run] ui — pnpm control:omb ui flag --set features.showToolCalls=true --dry-run (verified)\n");
- expect(draft.endsWith("\n\n")).toBe(true);
- expect(await ui("eval", info.ui, "--js", `document.activeElement === ${COMPOSER}`)).toMatchObject({ ok: true, result: true });
- // The composer sits inside the conversation landmark, so its draft shows up
- // in that snapshot; "nothing was sent" is the message-row count, unchanged.
- const rowsAfter = await ui("eval", info.ui, "--js", "document.querySelectorAll('[data-mid]').length");
- expect(rowsAfter.result).toBe(rowsBefore.result);
- const afterSave = await ui("snapshot", info.ui);
- const transcriptAfterSave = (afterSave.snapshot as string).slice((afterSave.snapshot as string).indexOf('log "Conversation with Pepper"'));
- expect(transcriptAfterSave.match(/StaticText "hello"/g)).toHaveLength(1);
-
- await ui("click", info.ui, "--name", "Collapse the run");
- const collapsed = await ui("snapshot", info.ui);
- expect(collapsed.snapshot).toContain("Expand the run");
- expect(collapsed.snapshot).not.toContain('list "Run steps"');
-
- await ui("click", info.ui, "--name", "More");
+ await ui("click", info.ui, "--name", "Open Pepper's profile");
await ui("click", info.ui, "--name", "Inspector");
// A local page fetches a screen when it opens, so the panel arrives just after the click.
const inspected = await vi.waitFor(async () => {
diff --git a/scripts/testing/mobile-code-blocks-ui.e2e.test.ts b/scripts/testing/mobile-code-blocks-ui.e2e.test.ts
index 375ffbd17d..bf0ef719c6 100644
--- a/scripts/testing/mobile-code-blocks-ui.e2e.test.ts
+++ b/scripts/testing/mobile-code-blocks-ui.e2e.test.ts
@@ -27,7 +27,10 @@ const reply = [
snippets[4].split("\n").map(line => ` ${line}`).join("\n"),
"This neighboring prose must never be copied with a block.",
].join("\n\n");
-const blocks = `Array.from(document.querySelectorAll('.chat-md > div')).filter(element => element.querySelector('pre') && element.querySelector('button[aria-pressed]'))`;
+const blocks = `Array.from(document.querySelectorAll('.chat-code-block')).filter(element => element.querySelector('pre') && element.querySelector('[data-code-plate]'))`;
+// Each block's plate: Copy, then a menu with Wrap lines.
+const COPY = `[data-code-plate] > button`;
+const MENU = `[data-code-plate] button[aria-haspopup="menu"]`;
async function connect(url: string) {
const socket = new WebSocket(url);
@@ -133,22 +136,37 @@ async function connect(url: string) {
const geometry = () => evaluate(`(() => {
const rect = element => { const r = element.getBoundingClientRect(); return { left:r.left, right:r.right, top:r.top, bottom:r.bottom, width:r.width, height:r.height }; };
return { width:innerWidth, pageWidth:document.documentElement.scrollWidth, coarse:matchMedia('(pointer:coarse)').matches, hover:matchMedia('(hover:hover)').matches,
- blocks:${blocks}.map(card => ({ ...rect(card), buttons:Array.from(card.querySelectorAll('button')).map(button=>({ ...rect(button), label:button.getAttribute('aria-label'), text:button.textContent, visibleLabels:Array.from(button.querySelectorAll('span')).some(span=>span.getBoundingClientRect().width>4&&span.getBoundingClientRect().height>4&&getComputedStyle(span).visibility!=='hidden'), pressed:button.getAttribute('aria-pressed') })) })) };
+ blocks:${blocks}.map(card => ({ ...rect(card), plateOpacity:getComputedStyle(card.querySelector('[data-code-plate]')).opacity, buttons:Array.from(card.querySelectorAll('[data-code-plate] button')).map(button=>({ ...rect(button), label:button.getAttribute('aria-label') })) })) };
})()`);
- const tap = async (index: number, kind: "copy" | "wrap", touch = true) => {
- const selector = kind === "copy" ? `button[aria-label*="clipboard"],button[title="Could not copy"]` : "button[aria-pressed]";
+ const tapAt = async (point: { x: number; y: number }, touch: boolean) => {
+ if (touch) {
+ await request("Input.dispatchTouchEvent", { type: "touchStart", touchPoints: [point] });
+ await request("Input.dispatchTouchEvent", { type: "touchEnd", touchPoints: [] });
+ } else {
+ await request("Input.dispatchMouseEvent", { type: "mousePressed", ...point, button: "left", clickCount: 1 });
+ await request("Input.dispatchMouseEvent", { type: "mouseReleased", ...point, button: "left", clickCount: 1 });
+ }
+ };
+ const tap = async (index: number, kind: "copy" | "menu", touch = true) => {
+ const selector = kind === "copy" ? COPY : MENU;
let position: { x: number; y: number; hit: boolean };
await expect.poll(async () => {
position = await evaluate(`(async () => { const card=${blocks}[${index}]; const button=card.querySelector(${JSON.stringify(selector)}); if(!button) throw new Error('Missing ${kind} control'); button.scrollIntoView({behavior:'instant',block:'center',inline:'nearest'}); await new Promise(resolve=>requestAnimationFrame(()=>requestAnimationFrame(resolve))); const before=button.getBoundingClientRect(); await new Promise(requestAnimationFrame); const r=button.getBoundingClientRect(); const x=r.left+r.width/2,y=r.top+r.height/2; const stable=Math.abs(before.x-r.x)<0.25&&Math.abs(before.y-r.y)<0.25; return {x,y,hit:stable&&button.contains(document.elementFromPoint(x,y))}; })()`);
return position.hit;
}, { timeout: 10_000 }).toBe(true);
- if (touch) {
- await request("Input.dispatchTouchEvent", { type: "touchStart", touchPoints: [{ x: position!.x, y: position!.y }] });
- await request("Input.dispatchTouchEvent", { type: "touchEnd", touchPoints: [] });
- } else {
- await request("Input.dispatchMouseEvent", { type: "mousePressed", x: position!.x, y: position!.y, button: "left", clickCount: 1 });
- await request("Input.dispatchMouseEvent", { type: "mouseReleased", x: position!.x, y: position!.y, button: "left", clickCount: 1 });
- }
+ await tapAt({ x: position!.x, y: position!.y }, touch);
+ };
+ // Wrap lines lives in the block's menu, a sheet over the page.
+ const toggleWrap = async (index: number) => {
+ await tap(index, "menu");
+ const wrapItem = `document.querySelector('[role="menu"] [data-menu-key="wrap"]')`;
+ let point: { x: number; y: number } | null = null;
+ await expect.poll(async () => {
+ point = await evaluate(`(() => { const item=${wrapItem}; if(!item) return null; const r=item.getBoundingClientRect(); const x=r.left+r.width/2,y=r.top+r.height/2; return item.contains(document.elementFromPoint(x,y)) ? {x,y} : null; })()`);
+ return point !== null;
+ }, { timeout: 10_000 }).toBe(true);
+ await tapAt(point!, true);
+ await expect.poll(() => evaluate(`Boolean(${wrapItem})`), { timeout: 5_000 }).toBe(false);
};
for (const [width, height, touch] of [[1100, 900, false], [390, 844, true], [320, 740, true], [844, 390, true]] as const) {
if (touch) await request("Emulation.setTouchEmulationEnabled", { enabled: true, maxTouchPoints: 1 });
@@ -162,6 +180,8 @@ async function connect(url: string) {
return after.top>=0&&after.top<innerHeight/2&&Math.abs(before.top-after.top)<0.25;
})()`), { timeout: 10_000 }).toBe(true);
await expect.poll(() => evaluate("innerWidth")).toBe(width);
+ // On touch the plates fade in; measure once they are fully shown.
+ if (touch) await expect.poll(() => evaluate(`${blocks}.every(card => getComputedStyle(card.querySelector('[data-code-plate]')).opacity === '1')`), { timeout: 5_000 }).toBe(true);
const layout = await geometry();
receipts.geometry.push(layout);
await screenshot(`${touch ? "touch" : "desktop"}-${width}.png`);
@@ -172,10 +192,12 @@ async function connect(url: string) {
for (const card of layout.blocks) {
expect(card.left).toBeGreaterThanOrEqual(0);
expect(card.right).toBeLessThanOrEqual(width);
+ // Without hover the plate is always shown, so nothing needs a hover to be reached.
+ if (touch) expect(card.plateOpacity).toBe("1");
+ expect(card.buttons.map((button: { label: string }) => button.label)).toEqual([expect.stringMatching(/^(?:Copy code|Copied to clipboard)$/), "More"]);
for (const button of card.buttons) {
expect(button.left).toBeGreaterThanOrEqual(card.left);
expect(button.right).toBeLessThanOrEqual(card.right);
- expect(button.visibleLabels).toBe(true);
if (touch) { expect(button.width).toBeGreaterThanOrEqual(44); expect(button.height).toBeGreaterThanOrEqual(44); }
}
}
@@ -189,10 +211,10 @@ async function connect(url: string) {
await expect.poll(() => evaluate("navigator.clipboard.readText()")).toBe(snippets[index]);
receipts.copied.push({ index, text: await evaluate("navigator.clipboard.readText()") });
}
- const wraps = () => evaluate(`${blocks}.map(card => card.querySelector('button[aria-pressed]').getAttribute('aria-pressed'))`);
+ const wraps = () => evaluate(`${blocks}.map(card => String(getComputedStyle(card.querySelector('pre')).whiteSpace === 'pre-wrap'))`);
expect(await wraps()).toEqual(snippets.map(() => "false"));
for (const index of [1, 2]) {
- await tap(index, "wrap");
+ await toggleWrap(index);
await expect.poll(wraps).toEqual(snippets.map((_, at) => at === index ? "true" : "false"));
const wrapped = await evaluate(`(() => { const card=${blocks}[${index}]; const pre=card.querySelector('pre'); return {whiteSpace:getComputedStyle(pre).whiteSpace,client:pre.clientWidth,scroll:pre.scrollWidth,text:pre.textContent}; })()`);
expect(wrapped.whiteSpace).toBe("pre-wrap");
@@ -202,10 +224,10 @@ async function connect(url: string) {
await tap(index, "copy");
expect(await evaluate("navigator.clipboard.readText()")).toBe(snippets[index]);
await screenshot(`wrapped-${index}.png`);
- await tap(index, "wrap");
+ await toggleWrap(index);
await expect.poll(wraps).toEqual(snippets.map(() => "false"));
}
- const feedbackLayout = () => evaluate(`(() => { const card=${blocks}[0]; const button=card.querySelectorAll('button')[2]; const c=card.getBoundingClientRect(), b=button.getBoundingClientRect(); return {height:c.height,buttonWidth:b.width,buttonHeight:b.height,left:b.left-c.left,top:b.top-c.top}; })()`);
+ const feedbackLayout = () => evaluate(`(() => { const card=${blocks}[0]; const button=card.querySelector(${JSON.stringify(MENU)}); const c=card.getBoundingClientRect(), b=button.getBoundingClientRect(); return {height:c.height,buttonWidth:b.width,buttonHeight:b.height,left:b.left-c.left,top:b.top-c.top}; })()`);
const beforeFeedback = await feedbackLayout();
// Both ways to copy refuse: the clipboard API, and the legacy execCommand a phone on plain http falls back to.
await evaluate(`Object.defineProperty(navigator.clipboard, 'writeText', { configurable:true,value:async()=>{throw new Error('fixture denial');} }); Object.defineProperty(document, 'execCommand', { configurable:true,value:()=>false }); true`);
@@ -215,21 +237,21 @@ async function connect(url: string) {
receipts.failureFeedback = true;
await evaluate(`Object.defineProperty(navigator.clipboard, 'writeText', { configurable:true,value:window.fixtureClipboardWrite }); delete document.execCommand; true`);
await tap(0, "copy");
- await expect.poll(() => evaluate(`${blocks}[0].querySelector('[role="status"]')?.textContent`)).toBe("Copied");
+ await expect.poll(() => evaluate(`${blocks}[0].querySelector('[role="status"]')?.textContent`)).toBe("Copied to clipboard");
expect(await feedbackLayout()).toEqual(beforeFeedback);
receipts.successFeedback = true;
- await expect.poll(() => evaluate(`${blocks}[0].querySelector('[role="status"]')?.textContent`), { timeout: 5_000 }).toBe("Copy");
+ await expect.poll(() => evaluate(`${blocks}[0].querySelector('[role="status"]')?.textContent ?? null`), { timeout: 5_000 }).toBe(null);
expect(await feedbackLayout()).toEqual(beforeFeedback);
receipts.feedbackLayoutStable = true;
await request("Emulation.setTouchEmulationEnabled", { enabled: false });
await request("Emulation.setDeviceMetricsOverride", { width: 1100, height: 900, deviceScaleFactor: 1, mobile: false });
- await evaluate(`${blocks}[0].querySelector('button[aria-pressed]').focus(); true`);
+ await evaluate(`${blocks}[0].querySelector(${JSON.stringify(COPY)}).focus(); true`);
await request("Input.dispatchKeyEvent", { type:"keyDown", key:"Tab", code:"Tab", windowsVirtualKeyCode:9 });
await request("Input.dispatchKeyEvent", { type:"keyUp", key:"Tab", code:"Tab", windowsVirtualKeyCode:9 });
- const focus = await evaluate(`(() => { const el=document.activeElement;return {label:el.getAttribute('aria-label'),visible:el.matches(':focus-visible'),outline:getComputedStyle(el).outlineStyle}; })()`);
- expect(focus.label).toBe("Download snippet as file");
+ const focus = await evaluate(`(() => { const el=document.activeElement, style=getComputedStyle(el);return {label:el.getAttribute('aria-label'),visible:el.matches(':focus-visible'),ring:style.outlineStyle!=='none'||style.boxShadow!=='none'}; })()`);
+ expect(focus.label).toBe("More");
expect(focus.visible).toBe(true);
- expect(focus.outline).not.toBe("none");
+ expect(focus.ring).toBe(true);
receipts.keyboardFocus = focus;
receipts.completed = true;
save();
diff --git a/scripts/testing/org-library-ui.e2e.test.ts b/scripts/testing/org-library-ui.e2e.test.ts
index 24fdcb586a..cbf5c58c19 100644
--- a/scripts/testing/org-library-ui.e2e.test.ts
+++ b/scripts/testing/org-library-ui.e2e.test.ts
@@ -131,9 +131,12 @@ describe("the organization library in the real renderer", () => {
.find(([, entry]) => entry.role === "button" && /Open .+ profile/.test(entry.name));
expect(profile).toBeDefined();
await ui("click", "--ref", `@${profile![0]}`);
- await click("Identity");
+ // The bot's panel: where it came from on Bot settings, the organization's skills on Library → Skills.
+ await click("Bot settings");
await expect.poll(snapshot, { timeout: 10_000 }).toContain("From Sales desk 1.3.0 · Acme Partners");
- await click("Skills");
+ await click("Details");
+ await click("Library");
+ await ui("eval", "--js", "document.querySelector('[data-panel-page=\"skills\"]').click(); true");
await expect.poll(snapshot, { timeout: 10_000 }).toContain("Skills your organization shares");
await evidence("org-library-bot-skills.png");
await click("Add follow-up to this bot");
diff --git a/scripts/testing/presets-ui.e2e.test.ts b/scripts/testing/presets-ui.e2e.test.ts
index e42727ee6c..150535d8af 100644
--- a/scripts/testing/presets-ui.e2e.test.ts
+++ b/scripts/testing/presets-ui.e2e.test.ts
@@ -64,7 +64,8 @@ describe("Preset bots in the real renderer", () => {
await expect.poll(snapshot, { timeout: 10_000 }).toContain('button "You"');
await click("You");
await click("Settings");
- await expect.poll(snapshot, { timeout: 10_000 }).toContain("Share as preset…");
+ // New bot defaults sit on the AI page.
+ await expect.poll(() => evaluate("(() => { document.querySelector('[data-settings-page=\"ai\"]')?.click(); return Boolean(document.querySelector('[data-new-bot-share]')); })()"), { timeout: 10_000 }).toBe(true);
await click("Share as preset…");
await expect.poll(snapshot, { timeout: 20_000 }).toContain("What's in the file");
let dialog = await snapshot();
diff --git a/scripts/testing/thinking-timer-ui.e2e.test.ts b/scripts/testing/thinking-timer-ui.e2e.test.ts
index a615326c1c..caa4335c1e 100644
--- a/scripts/testing/thinking-timer-ui.e2e.test.ts
+++ b/scripts/testing/thinking-timer-ui.e2e.test.ts
@@ -96,16 +96,13 @@ function elapsedSeconds(text: string): number {
return -1;
}
-/** Selection can already expand a thread list. Click only its collapsed DOM
- * chevron, avoiding both accidental collapse and transient duplicate AX names. */
-async function expandThreads(handle: string, name: string): Promise<void> {
- const collapsed = JSON.stringify(`button[aria-label="Expand ${name} threads"]`);
- const expanded = JSON.stringify(`button[aria-label="Collapse ${name} threads"]`);
+/** A bot's conversations are listed in its panel, which the chat header's pill opens; click it only while closed. */
+async function openConversations(handle: string, name: string): Promise<void> {
await waitUntil(async () => (await ui("eval", handle, "--js", `(() => {
- if (document.querySelector(${expanded})) return true;
- document.querySelector(${collapsed})?.click();
+ if (document.querySelector('[data-panel-card="conversations"] [data-sidebar-thread-row]')) return true;
+ document.querySelector('[data-chathead-pill][aria-expanded="false"]')?.click();
return false;
- })()`)).result, 10_000, `${name}'s thread list to expand`);
+ })()`)).result, 10_000, `${name}'s conversations to show`);
}
async function waitUntil<T>(probe: () => Promise<T>, timeoutMs: number, what: string): Promise<T> {
@@ -149,17 +146,21 @@ describe("the thinking timer stays anchored across a thread switch", () => {
const { info } = launched;
const api = fixtureApi(info.url);
const evaluate = async (js: string) => (await ui("eval", info.ui, "--js", js)).result;
- const timerText = () => evaluate(`document.querySelector('.turn-presence .tabular-nums')?.textContent ?? null`);
+ // Simple mode's working line says how long in its tooltip, worked out each time the line draws.
+ const timerText = () => evaluate(`(() => {
+ const title = document.querySelector('.turn-presence [title]')?.getAttribute('title');
+ return title?.split(' · ').find(part => /^(?:\\d+m )?\\d+s$/.test(part)) ?? null;
+ })()`);
const selectThread = (threadId: string) => evaluate(`document.querySelector('[data-sidebar-thread-row="${threadId}"]')?.click(); true`);
const isCurrent = (threadId: string) => evaluate(`Boolean(document.querySelector('[data-sidebar-thread-row="${threadId}"][aria-current="page"]'))`);
const taskOf = async (threadId: string) =>
(await api("GET", "/api/bots")).bots.find((bot: any) => bot.id === info.botId).tasks.find((task: any) => task.threadId === threadId);
- // The second thread comes through the same POST the sidebar's "New thread" uses.
+ // The second conversation comes through the same POST the panel's "New conversation" uses.
const busyThread = (await api("GET", "/api/bots")).bots.find((bot: any) => bot.id === info.botId).threadId;
const otherThread = (await api("POST", `/api/bots/${info.botId}/tasks`, {})).task.threadId;
- await expandThreads(info.ui, "Pepper");
- await waitUntil(() => evaluate(`Boolean(document.querySelector('[data-sidebar-thread-row="${otherThread}"]'))`), 10_000, "the new thread's sidebar row to appear");
+ await openConversations(info.ui, "Pepper");
+ await waitUntil(() => evaluate(`Boolean(document.querySelector('[data-sidebar-thread-row="${otherThread}"]'))`), 10_000, "the new thread's row to appear");
// Creating a thread selects it on the server. Pin the original thread in
// the renderer before sending the turn whose stamp this case observes.
await selectThread(busyThread);
@@ -180,8 +181,6 @@ describe("the thinking timer stays anchored across a thread switch", () => {
const first = await waitUntil(timerText, 15_000, "the thinking readout to appear");
expect(elapsedSeconds(first)).toBeGreaterThanOrEqual(0);
await new Promise((done) => setTimeout(done, Math.max(0, stamp + 10_000 - Date.now())));
- const beforeSwitch = await timerText();
- expect(elapsedSeconds(beforeSwitch)).toBeGreaterThanOrEqual(Math.floor((Date.now() - stamp) / 1000) - 2);
await selectThread(otherThread);
await waitUntil(() => isCurrent(otherThread), 10_000, "the other thread to become current");
diff --git a/src/components/AppNotices.test.ts b/src/components/AppNotices.test.ts
index fbdb13b20e..0d4a1718be 100644
--- a/src/components/AppNotices.test.ts
+++ b/src/components/AppNotices.test.ts
@@ -39,7 +39,7 @@ import { TwoPlacesCard } from "./TwoPlacesCard";
import { BOAT_OFFER_NOTICE, CLOUD_INTRO, GROK_MOVE_NOTICE, launchNotice, localDay, PRODUCT_HUNT_NOTICE, PRODUCT_HUNT_UNTIL, PRODUCT_HUNT_URL, STAR_NOTICE, WHATS_NEW_NOTICE } from "@/lib/notices";
import { BOAT_OFFER, boatClaimMailto } from "@/lib/boat-offer";
import { track } from "@/lib/analytics";
-import { ADVANCED_MODE_KEY, setAdvancedMode } from "@/lib/interface-mode";
+import { NEW_LOOK_KEY } from "@/lib/new-look";
import { SIMPLE_MODE_PROMPT_KEY } from "@/lib/simple-mode-prompt";
import { api } from "@/state/store";
@@ -992,15 +992,15 @@ describe("the Move from Grok Bot popup", () => {
});
it("goes first in the queue, one a launch: What's new, then the rest, wait for later launches", async () => {
- returning(); desk.saved = null; storage.delete(SIMPLE_MODE_PROMPT_KEY); storage.delete(BOAT_OFFER_NOTICE); storage.delete(STAR_NOTICE);
+ returning(); desk.saved = null; storage.set(NEW_LOOK_KEY, "due"); storage.delete(BOAT_OFFER_NOTICE); storage.delete(STAR_NOTICE);
const first = await launch();
expect(first).toContain(TITLE);
- for (const other of ["data-simple-mode-prompt", WHATS_NEW, STAR]) expect(first).not.toContain(other);
+ for (const other of ["data-new-look-notice", WHATS_NEW, STAR]) expect(first).not.toContain(other);
press("Not now"); await flush();
expect(render(), "nothing else after it in this launch").toBe("");
expect(await launch(), "a reload is the same launch").toBe("");
const second = await relaunch();
- expect(second).toContain("data-simple-mode-prompt"); expect(second).not.toContain(TITLE);
+ expect(second).toContain("data-new-look-notice"); expect(second).not.toContain(TITLE);
expect(launchNotice()).not.toBe(GROK_MOVE_NOTICE);
});
@@ -1092,57 +1092,51 @@ describe("the Move from Grok Bot popup", () => {
});
});
-describe("the Simple mode popup after the update", () => {
- const TITLE = "Try the new Simple mode", ON = "You&#x27;re on Simple mode", POPUP = "Meet the new MausBot Cloud";
+describe("the new look, in the Simple mode popup's place", () => {
+ const TITLE = "MausBot has a simpler look", POPUP = "Meet the new MausBot Cloud";
+ const BODY = "Everything you need is still here; rarer settings are under Settings → More settings.";
let modal: boolean;
- const prompts = () => vi.mocked(track).mock.calls.filter(([event]) => event === "simple_mode_prompt").map(([, props]) => props);
+ const events = () => vi.mocked(track).mock.calls.filter(([event]) => event === "new_look_notice").map(([, props]) => props);
beforeEach(() => {
modal = false;
vi.stubGlobal("document", { activeElement: null, body: null, documentElement: { dataset: {} }, getElementById: () => null, querySelector: () => null,
querySelectorAll: () => modal ? [{ closest: () => null, checkVisibility: () => true }] : [] });
- setAdvancedMode(true);
- storage.delete(SIMPLE_MODE_PROMPT_KEY);
+ // main.tsx's settleInterfaceMode found this browser on Advanced mode.
+ storage.set(NEW_LOOK_KEY, "due");
});
- it("shows once in each browser, claims the launch, and never comes back once it is closed", async () => {
+ it("shows once where Advanced mode was on, with no switch, claims the launch, and never comes back once it is closed", async () => {
const html = await launch();
- expect(html).toContain(TITLE);
- for (const part of ['role="dialog"', 'aria-modal="true"', 'role="switch"', 'aria-checked="false"', "Switch any time in Settings → General."]) expect(html).toContain(part);
- expect(prompts()).toEqual([{ action: "shown", mode: "advanced" }]);
+ expect(html).toContain(TITLE); expect(html).toContain(BODY);
+ for (const part of ['role="dialog"', 'aria-modal="true"', "data-new-look-notice"]) expect(html).toContain(part);
+ for (const gone of ['role="switch"', "data-simple-mode-prompt", "Advanced"]) expect(html).not.toContain(gone);
+ expect(events()).toEqual([{ action: "shown" }]);
expect(launchDialogShown()).toBe("notices");
expect(await settle(), "shown is counted once").toContain(TITLE);
- expect(prompts()).toHaveLength(1);
+ expect(events()).toHaveLength(1);
press("Done"); await flush();
expect(render(), "nothing else in this launch after it").toBe("");
- expect(storage.get(SIMPLE_MODE_PROMPT_KEY)).toBe("1");
- expect(prompts()).toEqual([{ action: "shown", mode: "advanced" }, { action: "closed", mode: "advanced" }]);
+ expect(storage.get(NEW_LOOK_KEY)).toBe("seen");
+ expect(events()).toEqual([{ action: "shown" }, { action: "closed" }]);
session.clear();
expect(await launch()).not.toContain(TITLE);
- expect(prompts()).toHaveLength(2);
+ expect(events()).toHaveLength(2);
});
- it("changes the mode live from the popup, both ways, while its words stay", async () => {
- await launch();
- press("Simple mode"); await flush();
- expect(storage.get(ADVANCED_MODE_KEY)).toBe("0");
- const on = render();
- expect(on).toContain('aria-checked="true"'); expect(on).toContain(TITLE);
- press("Simple mode"); await flush();
- expect(storage.get(ADVANCED_MODE_KEY)).toBe("1");
- expect(render()).toContain('aria-checked="false"');
- expect(prompts().slice(1)).toEqual([{ action: "toggled", mode: "simple" }, { action: "toggled", mode: "advanced" }]);
- expect(storage.has(SIMPLE_MODE_PROMPT_KEY), "flipping never closes it").toBe(false);
- });
-
- it("tells someone already on Simple mode so, with the switch on", async () => {
- setAdvancedMode(false);
- const html = await launch();
- expect(html).toContain(ON); expect(html).toContain('aria-checked="true"');
- expect(prompts()).toEqual([{ action: "shown", mode: "simple" }]);
+ it("never shows to a browser that was on Simple mode, nor to a new install, and the old popup is gone for them too", async () => {
+ storage.delete(SIMPLE_MODE_PROMPT_KEY);
+ for (const look of ["none", undefined, "seen"]) {
+ if (look) storage.set(NEW_LOOK_KEY, look); else storage.delete(NEW_LOOK_KEY);
+ session.clear();
+ const html = await launch();
+ expect(html, String(look)).not.toContain(TITLE);
+ expect(html, String(look)).not.toContain("data-simple-mode-prompt");
+ }
+ expect(events()).toEqual([]);
});
- it("asks on the Cloud's own page and in a plain browser too, not only on this computer's", async () => {
+ it("shows on the Cloud's own page and in a plain browser too, not only on this computer's", async () => {
snapshot = { status: "none" }; viewer = { hosted: false, canSave: true, cloudHome: true }; f.state.config.cloudHome = true;
f.state.config.onboarding.hintsSeen = [...withTourFinished(undefined), "cloud-setup-hidden"]; showWindow(MY_CLOUD);
expect(await launch()).toContain(TITLE);
@@ -1162,12 +1156,12 @@ describe("the Simple mode popup after the update", () => {
expect(await launch(), wait.toString()).not.toContain(TITLE);
f.state = saved; modal = false;
}
- expect(prompts()).toEqual([]);
+ expect(events()).toEqual([]);
markWelcomeFinished();
expect(await launch(), "the launch the welcome finished in").not.toContain(TITLE);
session.clear();
expect(await launch()).toContain(TITLE);
- expect(storage.has(SIMPLE_MODE_PROMPT_KEY)).toBe(false);
+ expect(storage.get(NEW_LOOK_KEY)).toBe("due");
});
it("is one popup at a time: it comes before What's new, which waits for a later launch", async () => {
diff --git a/src/components/AppNotices.tsx b/src/components/AppNotices.tsx
index 1e2eae88c0..d7dbbc178e 100644
--- a/src/components/AppNotices.tsx
+++ b/src/components/AppNotices.tsx
@@ -13,6 +13,8 @@ import { CLOUD_INTENT_GIVEN, cloudSetupStage } from "@/lib/cloud-setup";
import { cornerPopupWaits, firstChatQuiet, firstReplyPending } from "@/lib/corner-popup";
import { BOAT_OFFER_NOTICE, CLOUD_INTRO, CLOUD_NOTICE, CLOUD_TRIAL_NOTICE, dismissNotice, GROK_MOVE_NOTICE, introShown, introStage, launchNotice, markLaunchNotice, nextNotice, noticeSeen, PRODUCT_HUNT_NOTICE, PRODUCT_HUNT_UNTIL, PRODUCT_HUNT_URL, SIMPLE_MODE_NOTICE, STAR_NOTICE, TWO_PLACES_NOTICE, UPDATES_CONSENT_NOTICE, usedBefore, WHATS_NEW_NOTICE } from "@/lib/notices";
import { useTwoPlaces } from "@/lib/two-places";
+import { SIMPLE_ONLY } from "@/lib/simple-only";
+import { useNewLookDue } from "@/lib/new-look";
import { useSimpleModePromptSeen } from "@/lib/simple-mode-prompt";
import { reportWhatsNew, WHATS_NEW_SOURCES, whatsNewAudience, whatsNewView, type WhatsNewAction, type WhatsNewSlide } from "@/lib/whats-new";
import { cloudSignInDue, onboardingCloudOffered, welcomeFinishedThisLaunch, type WelcomeViewer } from "@/lib/onboarding";
@@ -32,6 +34,7 @@ import { useDesktopNotices, useOtherDialogOpen } from "./notice-dialogs";
import { localDesktopPage } from "./onboarding/WelcomeGate";
import { UpdatesConsentDialog, updatesConsentBridge, useUpdatesConsent } from "./UpdatesConsent";
import { useMausBotWelcomeDue } from "./MausBotWelcome";
+import { NewLookNotice, reportNewLook } from "./NewLookNotice";
import { reportSimpleModePrompt, SimpleModePrompt } from "./SimpleModePrompt";
import { TwoPlacesCard } from "./TwoPlacesCard";
import { WhatsNewPopup } from "./whats-new/WhatsNewPopup";
@@ -142,8 +145,10 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { q
const consentDue = consent.state?.available === true && consent.state.due && !consentDone;
const consentBlocked = useOtherDialogOpen(consentDue) || Boolean(state.liveCall && state.liveCall.status !== "ended");
const consentFact = !consentHere || consentDone ? false : consent.state === undefined ? null : consentDue ? (consentBlocked ? null : true) : false;
- // Every page with the app's chrome, desktop or Cloud, new install or not: once per browser, as the mode is.
- const simpleDue = !useSimpleModePromptSeen();
+ // Every page with the app's chrome, desktop or Cloud, new install or not: once per browser, as the mode is. With Simple
+ // the only mode, its place goes to the word about the new look, only where Advanced was on.
+ const promptSeen = useSimpleModePromptSeen(), newLookDue = useNewLookDue();
+ const simpleDue = SIMPLE_ONLY ? newLookDue : !promptSeen;
const simpleBlocked = useOtherDialogOpen(simpleDue) || Boolean(state.liveCall && state.liveCall.status !== "ended");
const boatHere = boatOfferRuns(now()) && brandStatus().source !== "file";
@@ -227,7 +232,8 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { q
void planBridge?.noticeSeen?.().catch(() => {});
} else if (shownKey === SIMPLE_MODE_NOTICE && !simpleShown) {
setSimpleShown(true);
- reportSimpleModePrompt("shown");
+ if (SIMPLE_ONLY) reportNewLook("shown");
+ else reportSimpleModePrompt("shown");
} else if (shownKey === BOAT_OFFER_NOTICE && !boatShown) {
setBoatShown(true);
reportBoatOffer("shown", "card");
@@ -256,7 +262,7 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { q
return <GrokMovePopup onDone={done} />;
}
- if (notice === SIMPLE_MODE_NOTICE) return <SimpleModePrompt onClose={close} />;
+ if (notice === SIMPLE_MODE_NOTICE) return SIMPLE_ONLY ? <NewLookNotice onClose={close} /> : <SimpleModePrompt onClose={close} />;
if (notice === WHATS_NEW_NOTICE && whatsNew && desktop) {
const report = (action: WhatsNewAction, slide: WhatsNewSlide) => reportWhatsNew(action, slide, whatsNew);
diff --git a/src/components/AppSettingsRows.tsx b/src/components/AppSettingsRows.tsx
index 3a6f3a928c..d522dd5f04 100644
--- a/src/components/AppSettingsRows.tsx
+++ b/src/components/AppSettingsRows.tsx
@@ -16,6 +16,7 @@ import { EFFORT_LEVELS, isEffortLevel } from "../../shared/wire";
import { setColorUserBubbles, useColorUserBubbles } from "@/lib/user-bubble-preference";
import { setShowThreads, useShowThreadsChoice } from "@/lib/thread-preferences";
import { setAdvancedMode, useAdvancedMode } from "@/lib/interface-mode";
+import { SIMPLE_ONLY } from "@/lib/simple-only";
import { setPinnedCircles, setUniversalPins, usePinnedCircles, useUniversalPins } from "@/lib/sidebar-preferences";
import { setShowRunCard, useShowRunCard } from "@/lib/run-card-preferences";
import { parseSendKey, SEND_KEYS, sendKeyLabel, setSendKey, useSendKey } from "@/lib/send-key";
@@ -137,7 +138,7 @@ export function NewBotEffortRow() {
);
}
-export function NewBotDefaultsRow({ onEdit }: { onEdit: () => void }) {
+export function NewBotDefaultsRow({ onEdit, onShare }: { onEdit: () => void; onShare: () => void }) {
const effort = useNewBotEffort();
return (
<SettingRow
@@ -147,6 +148,7 @@ export function NewBotDefaultsRow({ onEdit }: { onEdit: () => void }) {
>
<div className="flex items-center gap-2">
<NewBotEffortSelect effort={effort} className="w-auto" />
+ <button type="button" className="ui-button" data-new-bot-share onClick={onShare}>{t("newBot.sharePreset")}</button>
<button type="button" className="ui-button" data-new-bot-defaults onClick={onEdit}>{t("newBot.edit")}</button>
</div>
</SettingRow>
@@ -280,6 +282,7 @@ export function ColorUserBubblesRow({ simple = false }: { simple?: boolean }) {
export function AdvancedModeRow({ simple = false }: { simple?: boolean }) {
const enabled = useAdvancedMode();
+ if (SIMPLE_ONLY) return null;
return (
<SettingRow className={simple ? undefined : "rounded-2xl border border-accent-border/40 bg-raised-hover/40 py-4"} title={t("settings.advancedMode.title")}
subtitle={t(simple ? "settings.simple.advancedMode" : "settings.advancedMode.subtitle")}>
diff --git a/src/components/BotSettingsDialog.simple.test.ts b/src/components/BotSettingsDialog.simple.test.ts
index 8e1749a8f7..0a7f488448 100644
--- a/src/components/BotSettingsDialog.simple.test.ts
+++ b/src/components/BotSettingsDialog.simple.test.ts
@@ -148,6 +148,8 @@ const { AvatarImageGenerator } = await import("./AvatarImageGenerator");
const { AvatarFraming } = await import("./avatar-editing");
const { MascotFaceColorPicker } = await import("./MascotFaceColorPicker");
const { Switch } = await import("./SettingsPrimitives");
+const { OrgSkillsCard } = await import("./bot-settings/OrgSkillsCard");
+const { PackageProvenance } = await import("./bot-settings/PackageProvenance");
afterAll(() => vi.unstubAllGlobals());
@@ -1244,6 +1246,14 @@ describe("the drill-in pages", () => {
expect(body("skills").html).toContain("No skills yet.");
});
+ it("offers the organization's skills on the skills page, and says on Bot settings where an installed bot came from", async () => {
+ const offered = ofType(body("skills"), OrgSkillsCard)!;
+ expect(offered.props.bot).toMatchObject({ id: "scout" });
+ (offered.props.onAdded as () => void)();
+ expect(fixture.skills.refresh).toHaveBeenCalled();
+ expect(ofType(settingsPage(makeBot()), PackageProvenance)?.props.bot).toMatchObject({ id: "scout" });
+ });
+
it("keeps the bot's own private folder, or a folder chosen with the native picker, saved through the bot route", async () => {
const pickFolder = vi.fn(() => Promise.resolve("/Users/omkar/Projects/site"));
(window as unknown as { ogb: unknown }).ogb = { pickFolder };
diff --git a/src/components/ChatMarkdown.test.ts b/src/components/ChatMarkdown.test.ts
index 2d2886b60b..582e3980f4 100644
--- a/src/components/ChatMarkdown.test.ts
+++ b/src/components/ChatMarkdown.test.ts
@@ -1421,6 +1421,9 @@ describe("Simple mode's code block", () => {
expect(plate.split(" ")).toEqual(expect.arrayContaining(["opacity-0", "group-hover/code:opacity-100", "focus-within:opacity-100", "touch:opacity-100"]));
expect(html).toContain('aria-label="Copy code"');
expect(html).toContain('aria-label="More"');
+ // A finger-sized target on touch screens, and a ring on the menu's button for the keyboard.
+ expect(html.match(/<button[^>]*aria-label="Copy code"[^>]*>/)?.[0]).toContain("touch:size-11");
+ expect(html.match(/<button[^>]*aria-label="More"[^>]*>/)?.[0]).toContain("focus-visible:ring-2");
expect(html).toMatch(/<pre class="[^"]*leading-5 px-3 py-2 text-ink-secondary/);
});
diff --git a/src/components/ChatView.conversational.test.ts b/src/components/ChatView.conversational.test.ts
index 77a16d747f..5d7209a4ef 100644
--- a/src/components/ChatView.conversational.test.ts
+++ b/src/components/ChatView.conversational.test.ts
@@ -5,6 +5,9 @@ import { createRoot, type Root } from "react-dom/client";
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
import type { AppState, Bot, InstanceInfo, Message } from "@/state/store";
+// Its cases switch between Simple and Advanced mode, whose code stays until it goes: they run with the switch put back.
+vi.mock("@/lib/simple-only", () => ({ SIMPLE_ONLY: false }));
+
vi.mock("./ChatMarkdown", async (importOriginal) => ({
...await importOriginal<typeof import("./ChatMarkdown")>(),
ChatMarkdown: ({ text }: { text: string }) => createElement("p", { "data-md": "" }, text),
diff --git a/src/components/ChatView.simple-only.test.ts b/src/components/ChatView.simple-only.test.ts
new file mode 100644
index 0000000000..10954a80cf
--- /dev/null
+++ b/src/components/ChatView.simple-only.test.ts
@@ -0,0 +1,83 @@
+// @vitest-environment happy-dom
+// The real mode, with Simple the only one: a paired remote client keeps the controls its "advanced || remoteClient"
+// branches gave it.
+import { createElement } from "react";
+import { flushSync } from "react-dom";
+import { createRoot, type Root } from "react-dom/client";
+import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest";
+import type { AppState, Bot, InstanceInfo, Message } from "@/state/store";
+
+vi.mock("./DesktopCapabilities", async (importOriginal) => ({
+ ...await importOriginal<typeof import("./DesktopCapabilities")>(),
+ useDesktopCapabilities: () => ({ capabilities: { dictation: { available: false }, host: { packaged: true, platform: "other" }, localComputer: { available: false } }, ready: true }),
+}));
+vi.mock("@/lib/analytics", () => ({ track: vi.fn() }));
+vi.mock("@/lib/cloud-guest", () => ({ useCanWriteIn: () => true, useReactor: () => "user" }));
+vi.mock("./ModelPicker", () => ({ ModelPicker: () => null }));
+
+const { ChatView } = await import("./ChatView");
+const { readAdvancedMode, setAdvancedMode } = await import("@/lib/interface-mode");
+const { simpleRoomHeader } = await import("@/lib/room-panel");
+const { BotEditorStore, initialState } = await import("@/state/store");
+
+const messages: Message[] = [
+ { id: "m1", role: "user", kind: "text", text: "hello", at: 1 },
+ { id: "m2", parentId: "m1", role: "bot", kind: "text", text: "Hi.", at: 2 },
+];
+const task = (threadId: string, extra = {}) => ({ threadId, title: threadId, createdAt: 1, busy: false, activity: "idle" as const,
+ modelSelection: { instanceId: "test", model: "m" }, approvalMode: "ask" as const, ...extra });
+const bot: Bot = {
+ id: "pepper", threadId: "pepper-thread", name: "pepper", title: "", description: "", color: "green",
+ notifications: true, unread: false, busy: false, messages, activeLeafId: "m2", modelSelection: { instanceId: "test", model: "m" },
+ tasks: [task("pepper-thread"), task("side-job", { busy: true, activity: "working" })],
+};
+
+let root: Root;
+const settle = () => new Promise((resolve) => setTimeout(resolve, 0));
+async function draw() {
+ const state: AppState = {
+ ...initialState, connected: true, selectedId: "pepper", bots: [bot],
+ instances: [{ instanceId: "test", driverKind: "codex", displayName: "Test", snapshot: { state: "available" } } as InstanceInfo],
+ config: { features: {} } as AppState["config"],
+ };
+ const value = { state, dispatch: vi.fn(), flushBotPatches: async () => null, refreshInstances: async () => {}, refreshModels: async () => {} };
+ flushSync(() => root.render(createElement(BotEditorStore, { value, children: createElement(ChatView, { bot }) })));
+ await settle();
+}
+const head = () => document.querySelector("[data-chathead-controls]")!;
+
+beforeAll(() => {
+ vi.stubGlobal("fetch", () => new Promise(() => {}));
+ const container = document.createElement("div");
+ document.body.append(container);
+ root = createRoot(container);
+});
+afterEach(() => { delete window.ogb; });
+afterAll(() => {
+ root.unmount();
+ vi.unstubAllGlobals();
+});
+
+describe("Simple as the only mode", () => {
+ it("reads as Simple even after something asks for Advanced", () => {
+ setAdvancedMode(true);
+ expect(readAdvancedMode()).toBe(false);
+ });
+
+ it("keeps a paired remote client's chat menu and other-activity picker, which this computer's Simple chat leaves out", async () => {
+ await draw();
+ expect(head().querySelector('[data-testid="chat-more"]')).toBeNull();
+ expect(document.querySelector("[data-background-activity]")).toBeNull();
+
+ window.ogb = { remoteClient: { active: true } } as NonNullable<Window["ogb"]>;
+ await draw();
+ expect(head().querySelector('[data-testid="chat-more"]')).not.toBeNull();
+ expect(document.querySelector("[data-background-activity]")).not.toBeNull();
+ });
+
+ it("keeps a paired remote client's full room header", () => {
+ const room = { advanced: readAdvancedMode(), group: { dm: false }, setupPending: false };
+ expect(simpleRoomHeader({ ...room, remoteClient: false })).toBe(true);
+ expect(simpleRoomHeader({ ...room, remoteClient: true })).toBe(false);
+ });
+});
diff --git a/src/components/ChatView.team.test.ts b/src/components/ChatView.team.test.ts
index 74e3c17822..53daa1ec73 100644
--- a/src/components/ChatView.team.test.ts
+++ b/src/components/ChatView.team.test.ts
@@ -5,6 +5,9 @@ import { createRoot, type Root } from "react-dom/client";
import { afterEach, beforeEach, expect, it, vi } from "vitest";
import type { AppState, Bot, InstanceInfo, Message } from "@/state/store";
+// Its cases switch between Simple and Advanced mode, whose code stays until it goes: they run with the switch put back.
+vi.mock("@/lib/simple-only", () => ({ SIMPLE_ONLY: false }));
+
const viewer = vi.hoisted(() => ({ reactor: "p_ada" }));
vi.mock("./DesktopCapabilities", async (importOriginal) => ({
...await importOriginal<typeof import("./DesktopCapabilities")>(),
diff --git a/src/components/CodeBlock.tsx b/src/components/CodeBlock.tsx
index 7d7e8a03cf..bd1e74f696 100644
--- a/src/components/CodeBlock.tsx
+++ b/src/components/CodeBlock.tsx
@@ -169,7 +169,7 @@ export interface CodeBlockProps {
initialWrap?: boolean;
}
-const PLATE_BUTTON = "inline-flex size-7 items-center justify-center rounded-full text-ink-secondary transition-colors hover:bg-ink/[0.06] hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/60";
+const PLATE_BUTTON = "inline-flex size-7 touch:size-11 items-center justify-center rounded-full text-ink-secondary transition-colors hover:bg-ink/[0.06] hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/60";
/** Simple mode's hover plate on a code block or diagram: Copy, and a ⋯ menu for the rest. It shows on hover, on
* keyboard focus and always on touch screens, and stays while its menu is open. */
@@ -189,7 +189,8 @@ export function CodePlate({ copied, onCopy, copyLabel, items }: {
: <Copy size={14} aria-hidden="true" />}
</button>
{copied !== "idle" && <span role="status" className="sr-only">{copied === "failed" ? t("common.copyFailed") : t("code.copiedTitle")}</span>}
- <SidebarPopoverMenu items={items} ariaLabel={t("chat.more")} placement="below" triggerClassName="rounded-full" triggerTitle={t("chat.more")}
+ <SidebarPopoverMenu items={items} ariaLabel={t("chat.more")} placement="above" align="end" triggerTitle={t("chat.more")}
+ triggerClassName="rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/60"
renderTrigger={() => <span className={PLATE_BUTTON}><MoreHorizontal size={14} aria-hidden="true" /></span>} />
</div>
);
diff --git a/src/components/ComputerPanel.simple.test.ts b/src/components/ComputerPanel.simple.test.ts
index 480c3e8aba..9cd082ab55 100644
--- a/src/components/ComputerPanel.simple.test.ts
+++ b/src/components/ComputerPanel.simple.test.ts
@@ -675,14 +675,16 @@ describe("Technical controls", () => {
expect(advanced.nodes.some((node) => node.type === SimpleVpsChoices)).toBe(false);
});
- it("offers a bot that picks its own place auto-start beside a stopped VPS, and Advanced's switch where Simple has no fix", () => {
+ it("offers a bot that picks its own place auto-start beside a stopped VPS, and the VPS's settings where Simple has no fix", () => {
fixture.seed = { phase: "vps-unconfigured", resolved: { botId: "scout", threadId: "thread-scout", computer: undefined, cloudBackend: "vps" } };
const simple = render(makeBot({ cloudBackend: "vps" }));
expect(simple.html).toContain("Start VPS automatically");
expect(simple.button("Start the desktop on your VPS")).toBeUndefined();
(simple.nodes.find((node) => node.type === SimpleVpsChoices)!.props.onAutoStart as () => void)();
expect(fixture.dispatch).toHaveBeenLastCalledWith({ type: "updateBot", botId: "scout", patch: { autoStartVps: true } });
- (simple.button("Show advanced controls")!.props.onClick as () => void)();
- expect(fixture.setAdvancedMode).toHaveBeenCalledWith(true);
+ expect(simple.button("Show advanced controls")).toBeUndefined();
+ (simple.button("Open VPS settings")!.props.onClick as () => void)();
+ expect(fixture.setAdvancedMode).not.toHaveBeenCalled();
+ expect(fixture.dispatch).toHaveBeenLastCalledWith({ type: "toggleAppSettings", open: true, section: "connections" });
});
});
diff --git a/src/components/ComputerPanel.tsx b/src/components/ComputerPanel.tsx
index 8252d92d64..d39ac1b6c9 100644
--- a/src/components/ComputerPanel.tsx
+++ b/src/components/ComputerPanel.tsx
@@ -8,6 +8,7 @@ import { waitForLocalVmReady } from "@/lib/local-vm-readiness";
import { CalendarClock, ChevronRight, Columns2, Globe, Hand, Loader2, Maximize2, Monitor, Moon, Power, Settings, X } from "lucide-react";
import { api, ApiError, currentTaskBot, useStore, type Bot, type ConfigStatus } from "@/state/store";
import { setAdvancedMode, useAdvancedMode } from "@/lib/interface-mode";
+import { SIMPLE_ONLY } from "@/lib/simple-only";
import { ComputerFilesPane } from "./ComputerFilesPane";
import { effectivePlace, isComputerPlace, personPin, placeLabelKey, placeOffered } from "@/lib/place";
import type { CloudBackend } from "../../shared/wire";
@@ -1467,12 +1468,11 @@ export function ComputerPanel({
{!advanced && vpsPhase && (
<>
<p className="text-[12px]">{t("computer.simple.needsSetup", { name: bot.name })}</p>
- {!canProvisionVps && !canReplaceVps && <button
- type="button"
- onClick={() => setAdvancedMode(true)}
+ {!canProvisionVps && !canReplaceVps && <button type="button"
+ onClick={SIMPLE_ONLY ? openConnectionSettings : () => setAdvancedMode(true)}
className="mt-1 rounded-lg bg-control px-3 py-1.5 text-[12px] text-ink hover:bg-raised-hover"
>
- {t("computer.simple.showAdvanced")}
+ {t(SIMPLE_ONLY ? "computer.openVpsSettings" : "computer.simple.showAdvanced")}
</button>}
</>
)}
diff --git a/src/components/FirstReplyRescueRow.test.ts b/src/components/FirstReplyRescueRow.test.ts
index 0ee5d6eeb6..3cb2865bbd 100644
--- a/src/components/FirstReplyRescueRow.test.ts
+++ b/src/components/FirstReplyRescueRow.test.ts
@@ -13,6 +13,9 @@ import { PERSON_STOPPED_TURN_NAME, STOPPED_TURN_NAME } from "../../shared/client
import { CancelledTurnRow } from "./CancelledTurnRow";
import { StatusActivityRow } from "./StatusActivityRow";
+// Its cases switch between Simple and Advanced mode, whose code stays until it goes: they run with the switch put back.
+vi.mock("@/lib/simple-only", () => ({ SIMPLE_ONLY: false }));
+
(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;
const rescue: FirstReplyRescue = { botId: "bot-1", threadId: "thread-1", turnId: "turn-1", requestMessageId: "ask-1", instanceId: "opencodeGo", ai: "OpenCode" };
diff --git a/src/components/NewBotDialog.tsx b/src/components/NewBotDialog.tsx
index c08b764e9c..df2f03ca42 100644
--- a/src/components/NewBotDialog.tsx
+++ b/src/components/NewBotDialog.tsx
@@ -360,7 +360,7 @@ export function DefaultBotSettings({ simple = false }: { simple?: boolean }) {
{open && <NewBotDialog defaultsMode onClose={() => setOpen(false)} />}
{sharing && <SharePresetDialog onClose={() => setSharing(false)} />}
</>;
- if (simple) return <><NewBotDefaultsRow onEdit={() => setOpen(true)} />{dialogs}</>;
+ if (simple) return <><NewBotDefaultsRow onEdit={() => setOpen(true)} onShare={() => setSharing(true)} />{dialogs}</>;
const content = <>
<div className="flex shrink-0 gap-2">
diff --git a/src/components/NewLookNotice.test.ts b/src/components/NewLookNotice.test.ts
new file mode 100644
index 0000000000..82eae7999b
--- /dev/null
+++ b/src/components/NewLookNotice.test.ts
@@ -0,0 +1,83 @@
+// @vitest-environment happy-dom
+// The word about the new look: no switch, closed for good by Done, ×, Escape or a click outside.
+import { act, createElement } from "react";
+import { createRoot, type Root } from "react-dom/client";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { setLocale } from "@/lib/i18n";
+import { NEW_LOOK_KEY, newLookDue } from "@/lib/new-look";
+
+const analytics = vi.hoisted(() => ({ track: vi.fn() }));
+vi.mock("@/lib/analytics", () => analytics);
+vi.mock("@/lib/brand", async (importOriginal) => ({ ...await importOriginal<typeof import("@/lib/brand")>(), productName: () => "MausBot" }));
+const { NewLookNotice } = await import("./NewLookNotice");
+
+(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true;
+let host: HTMLDivElement, root: Root, opener: HTMLButtonElement;
+const onClose = vi.fn();
+const dialog = () => host.querySelector<HTMLElement>("[data-new-look-notice]");
+const button = (label: string) => [...host.querySelectorAll<HTMLButtonElement>("button")].find((node) => node.textContent === label || node.getAttribute("aria-label") === label)!;
+const show = async () => { await act(async () => { root.render(createElement(NewLookNotice, { onClose })); }); };
+const key = async (name: string, shiftKey = false) => {
+ await act(async () => { document.activeElement!.dispatchEvent(new KeyboardEvent("keydown", { key: name, shiftKey, bubbles: true, cancelable: true })); });
+};
+const events = () => analytics.track.mock.calls.filter(([event]) => event === "new_look_notice").map(([, props]) => props);
+
+beforeEach(() => {
+ setLocale("en");
+ const values = new Map<string, string>([[NEW_LOOK_KEY, "due"]]);
+ vi.stubGlobal("localStorage", { getItem: (k: string) => values.get(k) ?? null, setItem: (k: string, v: string) => void values.set(k, String(v)),
+ removeItem: (k: string) => void values.delete(k) });
+ analytics.track.mockReset();
+ onClose.mockReset();
+ opener = document.createElement("button");
+ document.body.append(opener);
+ opener.focus();
+ host = document.createElement("div");
+ document.body.append(host);
+ root = createRoot(host);
+});
+afterEach(async () => {
+ await act(async () => root.unmount());
+ host.remove();
+ opener.remove();
+ vi.unstubAllGlobals();
+});
+
+describe("the new look notice", () => {
+ it("says where the rarer settings went, with no switch back, and starts focus on its title", async () => {
+ await show();
+ expect(dialog()?.getAttribute("role")).toBe("dialog");
+ expect(dialog()?.getAttribute("aria-modal")).toBe("true");
+ expect(host.querySelector("h2")?.textContent).toBe("MausBot has a simpler look");
+ expect(host.textContent).toContain("Everything you need is still here; rarer settings are under Settings → More settings.");
+ expect(host.querySelector('[role="switch"]')).toBeNull();
+ expect(host.textContent).not.toContain("Advanced");
+ expect(document.activeElement).toBe(host.querySelector("h2"));
+ });
+
+ it.each(["Done", "Close", "Escape", "outside"])("closes for good with %s", async (how) => {
+ await show();
+ if (how === "Escape") await key("Escape");
+ else if (how === "outside") await act(async () => { dialog()!.parentElement!.dispatchEvent(new MouseEvent("mousedown", { bubbles: true })); });
+ else await act(async () => { button(how).click(); });
+ expect(onClose).toHaveBeenCalledOnce();
+ expect(newLookDue()).toBe(false);
+ expect(localStorage.getItem(NEW_LOOK_KEY)).toBe("seen");
+ expect(events()).toEqual([{ action: "closed" }]);
+ });
+
+ it("keeps the keyboard inside while it is open, and gives focus back when it closes", async () => {
+ await show();
+ await key("Tab");
+ expect(document.activeElement).toBe(button("Done"));
+ await key("Tab");
+ expect(document.activeElement).toBe(button("Close"));
+ await key("Tab");
+ expect(document.activeElement, "round to the first again").toBe(button("Done"));
+ await key("Tab", true);
+ expect(document.activeElement).toBe(button("Close"));
+ await act(async () => root.unmount());
+ root = createRoot(host);
+ expect(document.activeElement).toBe(opener);
+ });
+});
diff --git a/src/components/NewLookNotice.tsx b/src/components/NewLookNotice.tsx
new file mode 100644
index 0000000000..455d67c5f3
--- /dev/null
+++ b/src/components/NewLookNotice.tsx
@@ -0,0 +1,72 @@
+import { useEffect } from "react";
+import { X } from "lucide-react";
+import { track } from "@/lib/analytics";
+import { t } from "@/lib/i18n";
+import { markNewLookSeen } from "@/lib/new-look";
+
+export const NEW_LOOK_NOTICE = "[data-new-look-notice]";
+const TITLE = "new-look-notice-title";
+
+export function reportNewLook(action: "shown" | "closed"): void {
+ track("new_look_notice", { action });
+}
+
+/** Once, where Advanced mode was on before Simple became the only mode. Done, ×, Escape and a click outside close it for
+ * good. */
+export function NewLookNotice({ onClose }: { onClose: () => void }) {
+ const close = () => {
+ reportNewLook("closed");
+ markNewLookSeen();
+ onClose();
+ };
+
+ useEffect(() => {
+ const opener = document.activeElement as HTMLElement | null;
+ document.getElementById(TITLE)?.focus();
+ return () => {
+ if (opener?.isConnected && opener !== document.body) opener.focus();
+ };
+ }, []);
+ // Focus stays inside while it is open; Escape closes it.
+ useEffect(() => {
+ const onKey = (event: KeyboardEvent) => {
+ const root = document.querySelector<HTMLElement>(NEW_LOOK_NOTICE);
+ if (!root) return;
+ if (event.key === "Escape") {
+ event.preventDefault();
+ event.stopPropagation();
+ close();
+ return;
+ }
+ if (event.key !== "Tab") return;
+ const controls = [...root.querySelectorAll<HTMLElement>("button:not([disabled])")];
+ if (!controls.length) return;
+ event.preventDefault();
+ const at = controls.indexOf(document.activeElement as HTMLElement), step = event.shiftKey ? -1 : 1;
+ controls[at === -1 ? (step > 0 ? 0 : controls.length - 1) : (at + step + controls.length) % controls.length]!.focus();
+ };
+ window.addEventListener("keydown", onKey, true);
+ return () => window.removeEventListener("keydown", onKey, true);
+ });
+
+ return (
+ <div className="ui-scrim ui-scrim-light fixed inset-0 z-50 flex items-center justify-center p-4 motion-reduce:animate-none"
+ onMouseDown={(event) => { if (event.target === event.currentTarget) close(); }}>
+ <div role="dialog" aria-modal="true" aria-labelledby={TITLE} aria-describedby="new-look-notice-body" data-new-look-notice=""
+ className="ui-modal animate-pop-in relative w-[min(440px,calc(100vw-32px))] border-0 px-6 pb-5 pt-6 text-ink motion-reduce:animate-none">
+ {/* Focus lands on the title, which is no control: it shows no ring. */}
+ <h2 id={TITLE} tabIndex={-1} className="pe-8 text-[17px] font-medium leading-6 tracking-[-0.008em] outline-none!">
+ {t("newLook.title")}
+ </h2>
+ <p id="new-look-notice-body" className="mt-2 text-[14px] leading-5 text-ink-secondary">{t("newLook.body")}</p>
+ <div className="mt-5 flex justify-end">
+ <button type="button" data-primary="" onClick={close}
+ className="ui-button ui-button-pill min-w-[88px] border-transparent bg-ink text-app hover:bg-ink/90 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus">
+ {t("common.done")}
+ </button>
+ </div>
+ <button type="button" onClick={close} aria-label={t("common.close")} className="ui-icon-button absolute end-3 top-3"><X size={16} /></button>
+ </div>
+ </div>
+ );
+}
diff --git a/src/components/SettingsModal.appearance.test.ts b/src/components/SettingsModal.appearance.test.ts
index 555fccafa8..01731da4f0 100644
--- a/src/components/SettingsModal.appearance.test.ts
+++ b/src/components/SettingsModal.appearance.test.ts
@@ -115,25 +115,22 @@ afterEach(() => {
const render = () => renderToStaticMarkup(createElement(SettingsModal));
describe("Settings → Appearance", () => {
- it.each([true, false])("flips Advanced mode from General, first in Advanced and last in Simple, when the switch is %s", (enabled) => {
+ it.each([true, false])("has no Advanced mode switch in General, Simple being the only mode (Advanced %s)", (enabled) => {
fixture.section = "general";
fixture.advancedMode = enabled;
const html = render();
- if (enabled) expect(html.indexOf('aria-label="Advanced mode"')).toBeLessThan(html.indexOf("Language"));
- else expect(html.indexOf('aria-label="Advanced mode"')).toBeGreaterThan(html.indexOf("Language"));
- expect(html).toContain('aria-label="Advanced mode"');
- expect(html).toContain("Nothing is deleted either way");
- const toggle = fixture.switches.find((props) => props["aria-label"] === "Advanced mode")!;
- expect(toggle.checked).toBe(enabled);
- toggle.onClick!({} as never);
- expect(fixture.setAdvancedMode).toHaveBeenCalledWith(!enabled);
- expect(fixture.api).not.toHaveBeenCalled();
- expect(fixture.dispatch).not.toHaveBeenCalled();
+ expect(html).toContain("Language");
+ expect(html).not.toContain('aria-label="Advanced mode"');
+ expect(html).not.toContain("Nothing is deleted either way");
+ expect(fixture.switches.some((props) => props["aria-label"] === "Advanced mode")).toBe(false);
});
- it("keeps the Advanced mode switch reachable from a paired remote client", () => {
+ it.each([true, false])("has none for a paired remote client either (Advanced %s)", (enabled) => {
+ fixture.advancedMode = enabled;
vi.stubGlobal("window", { ogb: { remoteClient: { active: true } } });
- expect(render()).toContain('aria-label="Advanced mode"');
+ const html = render();
+ expect(html).toContain('aria-label="App language"');
+ expect(html).not.toContain('aria-label="Advanced mode"');
});
it("does not repeat the Advanced mode switch in Appearance on this computer", () => {
diff --git a/src/components/SettingsModal.search.test.ts b/src/components/SettingsModal.search.test.ts
index 1a4b79c601..6c28d34f30 100644
--- a/src/components/SettingsModal.search.test.ts
+++ b/src/components/SettingsModal.search.test.ts
@@ -70,13 +70,19 @@ describe("Settings search in Simple mode", () => {
expect(search().value).toBe("f");
});
- it("lists a builder control as Advanced and, when chosen, opens General at the Advanced mode row", () => {
- type("font");
- const result = host.querySelector<HTMLButtonElement>('[data-settings-advanced-only="settings.font.title"]')!;
- expect(result.textContent).toBe("Interface font · Advanced");
+ it("points nowhere Advanced, Simple being the only mode, and finds Automatic recovery under More settings", () => {
+ for (const words of ["font", "chat width", "circles", "universal", "this run"]) {
+ type(words);
+ expect(host.querySelector("[data-settings-advanced-only]"), words).toBeNull();
+ expect(dialog().textContent, words).not.toContain("· Advanced");
+ }
+ type("recovery");
+ const result = host.querySelector<HTMLButtonElement>('[data-settings-more-result="settings.recovery.title"]')!;
+ expect(result.textContent).toBe("Automatic recovery · More settings");
flushSync(() => result.click());
- expect(fixture.dispatch).toHaveBeenCalledWith({ type: "toggleAppSettings", open: true, section: "general" });
- expect(scrolled.map((element) => element.getAttribute("data-settings-block"))).toContain("advanced-mode");
+ expect(host.querySelector("h2")!.textContent).toBe("More settings");
+ expect(host.querySelector('[data-settings-block="limits"]')!.textContent).toContain("Automatic recovery");
+ expect(scrolled.map((element) => element.getAttribute("data-settings-block"))).toContain("limits");
expect(search().value).toBe("");
});
@@ -88,7 +94,7 @@ describe("Settings search in Simple mode", () => {
.toEqual(["decisionModel", "imageGeneration", "backups", "experimental"]);
const limits = host.querySelector('[data-settings-block="limits"]')!;
expect(limits.querySelector("h3")!.textContent).toBe("Limits");
- for (const title of ["Group turns", "Tool time limit", "Parallel threads", "Event log cleanup"]) expect(limits.textContent, title).toContain(title);
+ for (const title of ["Group turns", "Tool time limit", "Parallel threads", "Automatic recovery", "Event log cleanup"]) expect(limits.textContent, title).toContain(title);
flushSync(() => host.querySelector<HTMLButtonElement>('[data-settings-more-section="backups"]')!.click());
expect(fixture.dispatch).toHaveBeenLastCalledWith({ type: "toggleAppSettings", open: true, section: "backups" });
expect(heading()).toBe("General");
diff --git a/src/components/SettingsModal.simple.test.ts b/src/components/SettingsModal.simple.test.ts
index 4ac4c1a13b..ba3ce4a8ef 100644
--- a/src/components/SettingsModal.simple.test.ts
+++ b/src/components/SettingsModal.simple.test.ts
@@ -163,14 +163,15 @@ describe("Settings in Simple mode", () => {
for (const id of hidden) expect(SIMPLE_HIDDEN_SECTIONS).toContain(id);
});
- it("opens General on Account, then Appearance, Language and typing, Notifications, System and Import, with More settings and Advanced mode last as plain rows", () => {
+ it("opens General on Account, then Appearance, Language and typing, Notifications, System and Import, with More settings last as a plain row and no Advanced mode", () => {
const html = render();
expect(currentPage(html)).toBe("general");
expect(groupLabels(html)).toEqual(["Account", "Appearance", "Language and typing", "Notifications", "System", "Import", "Organization"]);
- expect(blocks(html).slice(-2)).toEqual(["more", "advanced-mode"]);
+ expect(blocks(html).at(-1)).toBe("more");
+ expect(blocks(html)).not.toContain("advanced-mode");
expect(html).toContain(">More settings<");
- expect([...html.matchAll(/<button[^>]*role="switch"[^>]*>/g)].at(-1)?.[0]).toContain('aria-label="Advanced mode"');
- expect(html).toContain("Show every control, including tools for builders. Nothing is deleted either way.");
+ expect(html).not.toContain('aria-label="Advanced mode"');
+ expect(html).not.toContain("Nothing is deleted either way");
expect(html).not.toContain("border-accent-border/40");
expect(html).toContain(">Your name</div>");
expect(html).toContain(">Not set yet</div>");
@@ -207,7 +208,7 @@ describe("Settings in Simple mode", () => {
expect(fixture.switches.find((props) => props["aria-label"] === "Show your computers")?.checked).toBe(false);
});
- it("keeps the everyday rows, puts limits behind More settings, and leaves the six other builder controls to Advanced, where search still points", () => {
+ it("keeps the everyday rows, puts limits and Automatic recovery behind More settings, and leaves out the rest of Advanced's controls", () => {
const general = open("general");
for (const shown of ['aria-label="Send usage analytics"', 'aria-label="Color my messages with the bot&#x27;s color"', 'aria-label="Send messages with"',
'aria-label="Notification sounds"', 'aria-label="Show the notification feed"', 'aria-label="App language"', 'role="radiogroup" aria-label="Light or dark"']) {
@@ -219,15 +220,17 @@ describe("Settings in Simple mode", () => {
"Interface font", "Chat width", "Pinned bots as circles", "Universal pins", "Tool calls", "This run", "Keep prompt cache warm"]) {
expect(everyPage, gone).not.toContain(`>${gone}<`);
}
- expect(SIMPLE_ADVANCED_ONLY.map((key) => t(key))).toEqual(["Automatic recovery", "Interface font", "Chat width", "Pinned bots as circles", "Universal pins", "This run"]);
- expect(SIMPLE_MORE_LIMITS.map((key) => t(key))).toEqual(["Group turns", "Tool time limit", "Parallel threads", "Event log cleanup", "Keep prompt cache warm", "Repeat computer tasks without AI"]);
+ expect(SIMPLE_ADVANCED_ONLY.map((key) => t(key))).toEqual(["Interface font", "Chat width", "Pinned bots as circles", "Universal pins", "This run"]);
+ expect(SIMPLE_MORE_LIMITS.map((key) => t(key))).toEqual(["Group turns", "Tool time limit", "Parallel threads", "Automatic recovery", "Event log cleanup",
+ "Keep prompt cache warm", "Repeat computer tasks without AI"]);
});
- it("holds the defaults for new bots on AI as one row: the effort they start with, and Edit for the rest", () => {
+ it("holds the defaults for new bots on AI as one row: the effort they start with, sharing them as a preset, and Edit for the rest", () => {
const html = open("engines");
const row = html.slice(html.indexOf(">Defaults for new bots<"));
expect(row).toContain(">Effort for new bots<");
expect(row).toMatch(/<select[^>]*aria-label="Effort for new bots"/);
+ expect(row).toMatch(/data-new-bot-share="true"[^>]*>Share as preset…<\/button>/);
expect(row).toMatch(/data-new-bot-defaults="true"[^>]*>Edit<\/button>/);
expect(html.indexOf("MARKER:engines;")).toBeLessThan(html.indexOf(">Defaults for new bots<"));
expect(html.indexOf(">Defaults for new bots<")).toBeLessThan(html.indexOf(">API keys<"));
@@ -316,7 +319,7 @@ describe("Settings in Simple mode", () => {
expect(currentPage(general)).toBe("general");
expect(general).not.toContain(">Your name</div>");
expect(general).toContain('aria-label="App language"');
- expect(general).toContain('aria-label="Advanced mode"');
+ expect(general).not.toContain('aria-label="Advanced mode"');
});
it.each<[AppSettingsSection, string]>([
@@ -371,14 +374,14 @@ describe("Settings in Simple mode", () => {
describe("Settings in Advanced mode", () => {
beforeEach(() => { fixture.advancedMode = true; });
- it("keeps the grouped rail and General, Advanced mode switch first, on the same Settings look as Simple", () => {
+ it("keeps the grouped rail and General, with no Advanced mode switch, on the same Settings look as Simple", () => {
const html = render();
expect(html).toContain("glass-surface");
expect(html).toContain('data-settings-look="advanced"');
expect(html).not.toContain("data-settings-page=");
expect([...html.matchAll(/data-settings-group="([^"]+)"/g)].map((match) => match[1])).toEqual(["you", "ai", "computers", "account"]);
- expect(html.indexOf('aria-label="Advanced mode"')).toBeLessThan(html.indexOf("Language"));
- expect(html).toContain("Show every technical control on this device");
+ expect(html).not.toContain('aria-label="Advanced mode"');
+ expect(html).not.toContain("Show every technical control on this device");
expect(html).not.toContain("More settings");
for (const kept of ["Group turns", 'aria-label="Effort for new bots"', 'aria-label="Send usage analytics"', "Diagnostics"]) {
expect(placement(html, kept), kept).toBe("shown");
diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx
index f6585da878..eb16c07ec3 100644
--- a/src/components/SettingsModal.tsx
+++ b/src/components/SettingsModal.tsx
@@ -64,6 +64,7 @@ import { scrollWithin } from "@/lib/scroll-within";
import { glassPopupFrameStyle } from "@/lib/glass-popup";
import { NotificationRows } from "./NotificationSettingsRows";
import { useAdvancedMode } from "@/lib/interface-mode";
+import { SIMPLE_ONLY } from "@/lib/simple-only";
import { Select } from "./Select";
import { SavedStepsRow } from "./SavedStepsRow";
import { BrowserProfilesRow, ColorUserBubblesRow, AdvancedModeRow, ExperimentalFeaturesRow, LanguageRow, NewBotEffortRow, PinnedCirclesRow, ReplayTourRow, RunCardRow, FollowUpRow, SendKeyRow, ShowThreadsRow, ToolCallsRow, UniversalPinsRow, UpdatesRow } from "./AppSettingsRows";
@@ -243,7 +244,7 @@ export function SettingsModal() {
const setSubPage = (view: "looks" | "more" | null, at: AppSettingsSection = requested) => setOpenSubPage(view && { view, for: at });
useEffect(() => { setOpenSubPage((current) => current?.for === requested ? current : null); }, [requested]);
const [reveal, setReveal] = useState<string | null>(null);
- const advancedMatches = advanced || !q ? [] : SIMPLE_ADVANCED_ONLY.filter((key) => t(key).toLowerCase().includes(q));
+ const advancedMatches = advanced || SIMPLE_ONLY || !q ? [] : SIMPLE_ADVANCED_ONLY.filter((key) => t(key).toLowerCase().includes(q));
const moreSections = availableSections.filter((entry) => SIMPLE_HIDDEN_SECTIONS.includes(entry.id));
const keyResults = remoteActive || !availableSections.some((entry) => entry.id === "connections") ? [] : keySearchResults(q);
const keyResultButtons = (className: string) => keyResults.map((entry) => (
diff --git a/src/components/SettingsSimplePages.tsx b/src/components/SettingsSimplePages.tsx
index dfe9de8b97..4579356e2d 100644
--- a/src/components/SettingsSimplePages.tsx
+++ b/src/components/SettingsSimplePages.tsx
@@ -3,6 +3,7 @@ import type { ReactNode } from "react";
import type { AppSettingsSection } from "@/state/store";
import { t } from "@/lib/i18n";
import { appVersion } from "@/lib/app-links";
+import { SIMPLE_ONLY } from "@/lib/simple-only";
import type { LocaleKey } from "@/locales";
import { productName } from "../lib/brand";
import { AnalyticsRow } from "./AnalyticsRow";
@@ -38,6 +39,7 @@ import { AdvancedModeRow, BrowserProfilesRow, ColorUserBubblesRow, FollowUpRow,
import { RoomTurnTimeoutSettings } from "./RoomTurnTimeoutSettings";
import { McpCallTimeoutSettings } from "./McpCallTimeoutSettings";
import { ThreadConcurrencySettings } from "./ThreadConcurrencySettings";
+import { AutomaticRecoverySettings } from "./AutomaticRecoverySettings";
import { ThreadCleanupSettings } from "./ThreadCleanupSettings";
import { CacheKeepWarmSettings } from "./CacheKeepWarmSettings";
import { SavedStepsRow } from "./SavedStepsRow";
@@ -50,13 +52,12 @@ export type SimpleDisclosureId = "ai-more" | "ai-keys" | "computer-elsewhere" |
export type Disclose = (id: SimpleDisclosureId) => { id: SimpleDisclosureId; open: boolean; onToggle: () => void };
export const SIMPLE_ADVANCED_ONLY: readonly LocaleKey[] = [
- "settings.recovery.title", "settings.font.title", "settings.chatWidth.title", "settings.pinnedCircles.title", "settings.universalPins.title",
- "settings.runCard.title",
+ "settings.font.title", "settings.chatWidth.title", "settings.pinnedCircles.title", "settings.universalPins.title", "settings.runCard.title",
];
export const SIMPLE_MORE_LIMITS: readonly LocaleKey[] = [
- "settings.roomTurns.title", "settings.mcpCalls.title", "settings.threads.title", "settings.threadCleanup.title", "settings.keepWarm.title",
- "settings.savedSteps.title",
+ "settings.roomTurns.title", "settings.mcpCalls.title", "settings.threads.title", "settings.recovery.title", "settings.threadCleanup.title",
+ "settings.keepWarm.title", "settings.savedSteps.title",
];
type Has = (id: AppSettingsSection) => boolean;
@@ -122,9 +123,9 @@ export function SimpleGeneralPage({ has, peopleOpen, onLooks, onMore }: { has: H
</SettingsRows>
</div>
)}
- <div data-settings-block="advanced-mode" className="scroll-mt-4">
+ {!SIMPLE_ONLY && <div data-settings-block="advanced-mode" className="scroll-mt-4">
<SettingsRows><AdvancedModeRow simple /></SettingsRows>
- </div>
+ </div>}
</>
);
}
@@ -173,6 +174,7 @@ export function SimpleMorePage({ sections, onOpen, onBack }: { sections: readonl
<Card title={t("settings.roomTurns.title")} subtitle={t("settings.roomTurns.subtitle")}><RoomTurnTimeoutSettings /></Card>
<Card title={t("settings.mcpCalls.title")} subtitle={t("settings.mcpCalls.subtitle")}><McpCallTimeoutSettings /></Card>
<ThreadConcurrencySettings />
+ <AutomaticRecoverySettings />
<ThreadCleanupSettings />
<CacheKeepWarmSettings />
<SettingsRows><SavedStepsRow /></SettingsRows>
diff --git a/src/components/SimpleModePrompt.test.ts b/src/components/SimpleModePrompt.test.ts
index 6209002bd8..f70604a577 100644
--- a/src/components/SimpleModePrompt.test.ts
+++ b/src/components/SimpleModePrompt.test.ts
@@ -8,6 +8,9 @@ import { setLocale } from "@/lib/i18n";
import { ADVANCED_MODE_KEY, readAdvancedMode, setAdvancedMode, useAdvancedMode } from "@/lib/interface-mode";
import { SIMPLE_MODE_PROMPT_KEY, simpleModePromptSeen } from "@/lib/simple-mode-prompt";
+// The popup only shows with the switch put back, and its cases flip the mode: they run that way until it goes.
+vi.mock("@/lib/simple-only", () => ({ SIMPLE_ONLY: false }));
+
const analytics = vi.hoisted(() => ({ track: vi.fn() }));
vi.mock("@/lib/analytics", () => analytics);
const { SimpleModePrompt } = await import("./SimpleModePrompt");
diff --git a/src/components/bot-panel/SettingsPage.tsx b/src/components/bot-panel/SettingsPage.tsx
index 7d08052b09..6691422aa7 100644
--- a/src/components/bot-panel/SettingsPage.tsx
+++ b/src/components/bot-panel/SettingsPage.tsx
@@ -18,6 +18,7 @@ import { useDesktopCapabilities } from "../DesktopCapabilities";
import { DefaultBotHideRow } from "../DefaultBotControls";
import { SoulField } from "../SoulField";
import { BotApiCard } from "../bot-settings/BotApiCard";
+import { PackageProvenance } from "../bot-settings/PackageProvenance";
import { REPLY_STYLE_LABELS } from "../bot-settings/ReplyStyleField";
import { useChoosesVisibility, visibilityLabel } from "../bot-settings/VisibilitySection";
import { useBotApps } from "../bot-settings/useBotApps";
@@ -108,6 +109,7 @@ export function SettingsPage({ bot, derived, onOpen, editingInstructions = false
return (
<div data-panel-settings>
+ <PackageProvenance bot={bot} />
<Card anchor="instructions">
{soulOpen ? (
<ColRow data-panel-row="soul">
diff --git a/src/components/bot-panel/pages.tsx b/src/components/bot-panel/pages.tsx
index ca0374a0b9..5e84d10425 100644
--- a/src/components/bot-panel/pages.tsx
+++ b/src/components/bot-panel/pages.tsx
@@ -17,6 +17,7 @@ import { ServiceIcon } from "../ServiceIcon";
import { RoutineEditor } from "../RoutinesPage";
import { useWorkingFolder } from "../bot-settings/AccessSection";
import { useBotEditor } from "../bot-settings/BotEditorContext";
+import { OrgSkillsCard } from "../bot-settings/OrgSkillsCard";
import { SkillReviewDialog, skillSwitchOn, useManagedSkills, type ManagedSkill } from "../bot-settings/SkillsSection";
import { useBotApps, type BotApp } from "../bot-settings/useBotApps";
import { useChoosesVisibility, VisibilitySection } from "../bot-settings/VisibilitySection";
@@ -323,6 +324,7 @@ export function SkillsPage({ bot }: PageContext) {
))}
{skills.error && !skills.reviewing && <NoteRow tone="warn">{skills.error}</NoteRow>}
</Card>
+ <OrgSkillsCard bot={bot} onAdded={() => void skills.refresh()} />
<Card>
<TextRow
data-panel-form="skill-import"
diff --git a/src/components/cloud-welcome/CloudWelcome.test.ts b/src/components/cloud-welcome/CloudWelcome.test.ts
index 416509b033..d4221314cd 100644
--- a/src/components/cloud-welcome/CloudWelcome.test.ts
+++ b/src/components/cloud-welcome/CloudWelcome.test.ts
@@ -37,6 +37,9 @@ import { CloudWelcome, sentHere } from "./CloudWelcome";
import { CLOUD_SETUP_MOVE_SKIPPED, CLOUD_WELCOME_DONE, CLOUD_WELCOME_SHOWN as SHOWN, welcomeStepHint } from "@/lib/cloud-setup";
import { resetCloudWelcome, useCloudWelcome } from "@/lib/cloud-welcome";
+// Its cases switch between Simple and Advanced mode, whose code stays until it goes: they run with the switch put back.
+vi.mock("@/lib/simple-only", () => ({ SIMPLE_ONLY: false }));
+
const CLOUD = { name: "Studio Cloud", origin: "https://omb-u-1a2b3c4d5e6f.fly.dev" };
const quiet: CloudSendNotice = { ready: true, bots: [], updatedBots: [], skills: 0, logins: 0, onePassword: false, settings: 0, signature: "", dismissed: false, running: false, last: null, whole: null };
const claude = { instanceId: "claude", driverKind: "claudeAgent", displayName: "Claude", access: "subscription", authentication: { method: "paste-code" }, snapshot: { state: "available", authenticated: false }, models: { default: "", options: [] } };
diff --git a/src/components/notice-dialogs.ts b/src/components/notice-dialogs.ts
index 7ac3e7afca..43253f64a2 100644
--- a/src/components/notice-dialogs.ts
+++ b/src/components/notice-dialogs.ts
@@ -1,6 +1,7 @@
import { useEffect, useState } from "react";
import type { DesktopNoticesBridge, DesktopNoticesState } from "../../electron/desktop-prefs.mjs";
import { GROK_MOVE_POPUP } from "./GrokMovePopup";
+import { NEW_LOOK_NOTICE } from "./NewLookNotice";
import { SIMPLE_MODE_PROMPT } from "./SimpleModePrompt";
import { UPDATES_CONSENT_POPUP } from "./UpdatesConsent";
import { WHATS_NEW_POPUP } from "./whats-new/WhatsNewPopup";
@@ -18,7 +19,7 @@ export function useDesktopNotices(desktop: DesktopNoticesBridge | undefined): De
}
const OTHER_DIALOGS = '[role="dialog"], [role="alertdialog"], [aria-modal="true"], [data-tour-card], [data-cloud-setup-ready]';
-const QUEUE_POPUPS = [GROK_MOVE_POPUP, WHATS_NEW_POPUP, UPDATES_CONSENT_POPUP, SIMPLE_MODE_PROMPT].join(", ");
+const QUEUE_POPUPS = [GROK_MOVE_POPUP, WHATS_NEW_POPUP, UPDATES_CONSENT_POPUP, SIMPLE_MODE_PROMPT, NEW_LOOK_NOTICE].join(", ");
/** Any dialog on screen counts, modal or not, and the card that says a new Cloud is set up; never the queue's own popups. */
export function otherDialogOpen(): boolean {
diff --git a/src/lib/analytics.test.ts b/src/lib/analytics.test.ts
index f06e39c938..cbfbb32697 100644
--- a/src/lib/analytics.test.ts
+++ b/src/lib/analytics.test.ts
@@ -399,13 +399,13 @@ describe("app_active", () => {
expect(ph.calls.filter((call) => call === "capture app_opened")).toHaveLength(3);
});
- it("says which mode the page is in that day, Simple or Advanced", async () => {
+ it("says Simple, the only mode, even where the page was on Advanced before", async () => {
await page.load();
expect(active()).toEqual([{ event: "app_active", props: { platform: "browser", mode: "simple" } }]);
store.set("omb-advanced-mode", "1");
vi.setSystemTime(new Date(2026, 9, 24, 9, 0));
await page.load();
- expect(active()[1]).toEqual({ event: "app_active", props: { platform: "browser", mode: "advanced" } });
+ expect(active()[1]).toEqual({ event: "app_active", props: { platform: "browser", mode: "simple" } });
});
it("is sent again after midnight by the ten-minute check, then not again that day", async () => {
diff --git a/src/lib/chat-width.ts b/src/lib/chat-width.ts
index 6a07d8bccc..9383f1fc37 100644
--- a/src/lib/chat-width.ts
+++ b/src/lib/chat-width.ts
@@ -3,7 +3,7 @@ export type ChatWidthId = (typeof CHAT_WIDTH_IDS)[number];
export const DEFAULT_CHAT_WIDTH: ChatWidthId = "standard";
-const KEY = "omb-chat-width";
+export const CHAT_WIDTH_KEY = "omb-chat-width";
function isChatWidthId(value: unknown): value is ChatWidthId {
return (CHAT_WIDTH_IDS as readonly unknown[]).includes(value);
@@ -19,7 +19,7 @@ function getStore(): Storage | undefined {
export function readChatWidth(): ChatWidthId {
try {
- const stored = getStore()?.getItem(KEY);
+ const stored = getStore()?.getItem(CHAT_WIDTH_KEY);
return isChatWidthId(stored) ? stored : DEFAULT_CHAT_WIDTH;
} catch {
return DEFAULT_CHAT_WIDTH;
@@ -30,7 +30,7 @@ export function applyChatWidth(id: ChatWidthId): void {
if (id === DEFAULT_CHAT_WIDTH) delete document.documentElement.dataset.chatWidth;
else document.documentElement.dataset.chatWidth = id;
try {
- getStore()?.setItem(KEY, id);
+ getStore()?.setItem(CHAT_WIDTH_KEY, id);
} catch {
// Storage can be full or blocked in private mode; the width still applies this session.
}
diff --git a/src/lib/fonts.ts b/src/lib/fonts.ts
index f1c5b27386..1ff9a6b0c6 100644
--- a/src/lib/fonts.ts
+++ b/src/lib/fonts.ts
@@ -3,7 +3,7 @@ export type FontId = (typeof FONT_IDS)[number];
export const DEFAULT_FONT: FontId = "skin";
-const KEY = "omb-font";
+export const FONT_KEY = "omb-font";
function isFontId(value: unknown): value is FontId {
return FONT_IDS.includes(value as FontId);
@@ -19,7 +19,7 @@ function getStore(): Storage | undefined {
export function readFont(): FontId {
try {
- const stored = getStore()?.getItem(KEY);
+ const stored = getStore()?.getItem(FONT_KEY);
return isFontId(stored) ? stored : DEFAULT_FONT;
} catch {
return DEFAULT_FONT;
@@ -30,7 +30,7 @@ export function applyFont(id: FontId): void {
if (id === DEFAULT_FONT) delete document.documentElement.dataset.font;
else document.documentElement.dataset.font = id;
try {
- getStore()?.setItem(KEY, id);
+ getStore()?.setItem(FONT_KEY, id);
} catch {
}
}
diff --git a/src/lib/interface-mode.test.ts b/src/lib/interface-mode.test.ts
index 3dd007a328..b592d6da90 100644
--- a/src/lib/interface-mode.test.ts
+++ b/src/lib/interface-mode.test.ts
@@ -15,8 +15,10 @@ function memoryStorage() {
let local: ReturnType<typeof memoryStorage>;
// The module keeps a per-session choice, so each case loads a fresh copy over the same storage, as a relaunch would.
-async function fresh() {
+// simpleOnly false is the switch put back (simple-only.ts), which keeps the old rules.
+async function fresh(simpleOnly = false) {
vi.resetModules();
+ vi.doMock("./simple-only", () => ({ SIMPLE_ONLY: simpleOnly }));
return import("./interface-mode");
}
@@ -27,10 +29,29 @@ beforeEach(() => {
});
afterEach(() => {
+ vi.doUnmock("./simple-only");
vi.unstubAllGlobals();
});
-describe("interface mode", () => {
+describe("with Simple the only mode", () => {
+ it("reads Advanced as off whatever this browser stored, and never turns it on", async () => {
+ local.setItem("omb-skin", "lagoon");
+ local.setItem("omb-advanced-mode", "1");
+ const { readAdvancedMode, setAdvancedMode } = await fresh(true);
+ expect(readAdvancedMode()).toBe(false);
+ setAdvancedMode(true);
+ expect(readAdvancedMode()).toBe(false);
+ expect(local.getItem("omb-advanced-mode")).toBe("1");
+ });
+
+ it("ships with the switch on", async () => {
+ vi.resetModules();
+ expect((await vi.importActual<typeof import("./simple-only")>("./simple-only")).SIMPLE_ONLY).toBe(true);
+ expect((await import("./interface-mode")).readAdvancedMode()).toBe(false);
+ });
+});
+
+describe("with the switch back", () => {
it("defaults a fresh install to Simple and stores that once", async () => {
const { readAdvancedMode, settleAdvancedModeDefault, ADVANCED_MODE_KEY } = await fresh();
expect(readAdvancedMode()).toBe(false);
diff --git a/src/lib/interface-mode.ts b/src/lib/interface-mode.ts
index e655aa93d3..cd235551ee 100644
--- a/src/lib/interface-mode.ts
+++ b/src/lib/interface-mode.ts
@@ -1,6 +1,7 @@
import { useSyncExternalStore } from "react";
import { hasPriorRun } from "./prior-run";
+import { SIMPLE_ONLY } from "./simple-only";
export const ADVANCED_MODE_KEY = "omb-advanced-mode";
@@ -16,6 +17,7 @@ function storage(): Storage | undefined {
}
export function readAdvancedMode(): boolean {
+ if (SIMPLE_ONLY) return false;
if (sessionChoice !== undefined) return sessionChoice;
try {
const store = storage();
@@ -60,6 +62,7 @@ function subscribe(listener: () => void): () => void {
}
export function setAdvancedMode(enabled: boolean): void {
+ if (SIMPLE_ONLY) return;
sessionChoice = enabled;
try {
storage()?.setItem(ADVANCED_MODE_KEY, enabled ? "1" : "0");
diff --git a/src/lib/new-look.test.ts b/src/lib/new-look.test.ts
new file mode 100644
index 0000000000..da9c399aed
--- /dev/null
+++ b/src/lib/new-look.test.ts
@@ -0,0 +1,130 @@
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+
+import { PINNED_CIRCLES_KEY, SIDEBAR_TOOLS_LAYOUT_KEY, UNIVERSAL_PINS_KEY } from "./sidebar-preferences";
+
+const values = new Map<string, string>();
+const local = {
+ getItem: vi.fn((key: string) => values.get(key) ?? null),
+ setItem: vi.fn((key: string, value: string) => { values.set(key, value); }),
+ removeItem: vi.fn((key: string) => { values.delete(key); }),
+};
+
+// Each case boots fresh modules over the same storage, as a launch would. simpleOnly false is the switch put back.
+async function boot(simpleOnly = true) {
+ vi.resetModules();
+ vi.doMock("./simple-only", () => ({ SIMPLE_ONLY: simpleOnly }));
+ const [look, mode, fonts, width] = await Promise.all([import("./new-look"), import("./interface-mode"), import("./fonts"), import("./chat-width")]);
+ look.settleInterfaceMode();
+ return { ...look, mode, font: fonts.readFont(), width: width.readChatWidth() };
+}
+
+const ADVANCED_PREFS = {
+ "omb-font": "serif", "omb-chat-width": "full", "omb-show-threads": "1", "openmausbot.sidebarToolsLayout": "toolbar",
+ "openmausbot.pinnedCircles": "1", "openmausbot.universalPins": "1", "omb-show-run-card": "0", "omb-web-panels": "[]",
+};
+const KEPT = { "omb-skin": "lagoon", "openmausbot.sidebarDensity": "avatars", "omb-drafts": "{}" };
+
+beforeEach(() => {
+ values.clear();
+ vi.clearAllMocks();
+ vi.stubGlobal("localStorage", local);
+ vi.stubGlobal("window", new EventTarget());
+});
+
+afterEach(() => {
+ vi.doUnmock("./simple-only");
+ vi.unstubAllGlobals();
+});
+
+describe("the move to Simple as the only mode", () => {
+ it("owes the notice to a browser that chose Advanced, retires its mode key, and puts Advanced's own settings back once", async () => {
+ for (const [key, value] of Object.entries({ ...ADVANCED_PREFS, ...KEPT, "omb-advanced-mode": "1" })) values.set(key, value);
+ const first = await boot();
+ expect(first.newLookDue()).toBe(true);
+ expect(values.get("omb-new-look")).toBe("due");
+ expect(values.has("omb-advanced-mode")).toBe(false);
+ for (const key of Object.keys(ADVANCED_PREFS)) expect(values.has(key), key).toBe(false);
+ for (const [key, value] of Object.entries(KEPT)) expect(values.get(key), key).toBe(value);
+ expect([first.font, first.width]).toEqual(["skin", "standard"]);
+ expect(first.mode.readAdvancedMode()).toBe(false);
+
+ // Once: what is set after the move stays, and the notice stays owed until it is closed.
+ values.set("omb-font", "inter");
+ const second = await boot();
+ expect(second.font).toBe("inter");
+ expect(second.newLookDue()).toBe(true);
+ });
+
+ it("owes it where Advanced was the default for an earlier install that never chose", async () => {
+ values.set("omb-installed", "2026-01-01T00:00:00.000Z");
+ expect((await boot()).newLookDue()).toBe(true);
+ });
+
+ it("never owes it to a browser on Simple, nor to a new install, even once prior-run keys pile up", async () => {
+ for (const [key, value] of Object.entries({ ...ADVANCED_PREFS, "omb-skin": "midnight", "omb-advanced-mode": "0" })) values.set(key, value);
+ expect((await boot()).newLookDue()).toBe(false);
+ expect(values.get("omb-new-look")).toBe("none");
+ for (const key of Object.keys(ADVANCED_PREFS)) expect(values.has(key), key).toBe(false);
+ expect((await boot()).newLookDue(), "the retired key is not read as an old default").toBe(false);
+
+ values.clear();
+ expect((await boot()).newLookDue()).toBe(false);
+ values.set("omb-skin", "system");
+ values.set("omb-show-threads", "1");
+ expect((await boot()).newLookDue()).toBe(false);
+ });
+
+ it("closes for good, and for the session where storage will not take it", async () => {
+ values.set("omb-advanced-mode", "1");
+ const look = await boot();
+ look.markNewLookSeen();
+ expect(look.newLookDue()).toBe(false);
+ expect(values.get("omb-new-look")).toBe("seen");
+ expect((await boot()).newLookDue()).toBe(false);
+
+ values.set("omb-new-look", "due");
+ const blocked = await boot();
+ local.setItem.mockImplementationOnce(() => { throw new Error("quota"); });
+ blocked.markNewLookSeen();
+ expect(blocked.newLookDue()).toBe(false);
+ expect(values.get("omb-new-look")).toBe("due");
+ });
+
+ it("never throws at boot when storage cannot be read", async () => {
+ local.getItem.mockImplementation(() => { throw new Error("blocked"); });
+ const look = await boot();
+ expect(look.newLookDue()).toBe(false);
+ local.getItem.mockImplementation((key: string) => values.get(key) ?? null);
+ });
+
+ it("spells out the sidebar's keys as sidebar-preferences.ts names them", async () => {
+ const { ADVANCED_ONLY_PREFS } = await import("./new-look");
+ expect(ADVANCED_ONLY_PREFS).toEqual(expect.arrayContaining([SIDEBAR_TOOLS_LAYOUT_KEY, PINNED_CIRCLES_KEY, UNIVERSAL_PINS_KEY]));
+ expect(ADVANCED_ONLY_PREFS).toEqual(expect.arrayContaining(Object.keys(ADVANCED_PREFS)));
+ });
+});
+
+describe("with the switch put back", () => {
+ it("gives each browser the mode it had before the move, and leaves the notice alone", async () => {
+ values.set("omb-new-look", "seen");
+ let rolled = await boot(false);
+ expect(rolled.mode.readAdvancedMode()).toBe(true);
+ expect(values.get("omb-advanced-mode")).toBe("1");
+
+ values.clear();
+ values.set("omb-new-look", "none");
+ values.set("omb-skin", "midnight");
+ rolled = await boot(false);
+ expect(rolled.mode.readAdvancedMode()).toBe(false);
+ expect(values.get("omb-advanced-mode")).toBe("0");
+ expect(values.get("omb-new-look")).toBe("none");
+ });
+
+ it("keeps the old default for a browser the move never reached", async () => {
+ values.set("omb-skin", "midnight");
+ const rolled = await boot(false);
+ expect(rolled.mode.readAdvancedMode()).toBe(true);
+ expect(values.get("omb-advanced-mode")).toBe("1");
+ expect(values.has("omb-new-look")).toBe(false);
+ });
+});
diff --git a/src/lib/new-look.ts b/src/lib/new-look.ts
new file mode 100644
index 0000000000..c272339025
--- /dev/null
+++ b/src/lib/new-look.ts
@@ -0,0 +1,90 @@
+import { useSyncExternalStore } from "react";
+
+import { CHAT_WIDTH_KEY } from "./chat-width";
+import { FONT_KEY } from "./fonts";
+import { ADVANCED_MODE_KEY, setAdvancedMode, settleAdvancedModeDefault } from "./interface-mode";
+import { hasPriorRun } from "./prior-run";
+import { RUN_CARD_KEY } from "./run-card-preferences";
+import { SIMPLE_ONLY } from "./simple-only";
+import { SHOW_THREADS_KEY } from "./thread-preferences";
+import { WEB_PANELS_KEY } from "./web-panel-preferences";
+
+/** What this browser's mode was when Simple became the only one: "due" (Advanced; the one-time notice is owed), "seen"
+ * (Advanced; it was closed) or "none" (Simple, or a new install). Absent until a Simple-only app first booted here. */
+export const NEW_LOOK_KEY = "omb-new-look";
+
+/** Device settings only Advanced mode could change: each goes back to its default once. The sidebar's are spelled out,
+ * since importing its module would put zod in the first page's bundle. */
+export const ADVANCED_ONLY_PREFS = [FONT_KEY, CHAT_WIDTH_KEY, SHOW_THREADS_KEY, RUN_CARD_KEY, WEB_PANELS_KEY,
+ "openmausbot.sidebarToolsLayout", "openmausbot.pinnedCircles", "openmausbot.universalPins"];
+
+/** Where this page cannot write its storage, its memory stands in, so the notice still closes for the session. */
+let seenHere = false;
+const listeners = new Set<() => void>();
+
+function storage(): Storage | undefined {
+ try {
+ return globalThis.localStorage;
+ } catch {
+ return undefined;
+ }
+}
+
+export function settleInterfaceMode(): void {
+ try {
+ const store = storage();
+ const look = store?.getItem(NEW_LOOK_KEY);
+ if (!SIMPLE_ONLY) {
+ // Switched back: the mode this browser had before its key was retired.
+ if (look && store?.getItem(ADVANCED_MODE_KEY) == null) setAdvancedMode(look !== "none");
+ settleAdvancedModeDefault();
+ return;
+ }
+ if (!store) return;
+ if (look == null) {
+ const stored = store.getItem(ADVANCED_MODE_KEY);
+ const advanced = stored === "1" || (stored == null && hasPriorRun(store));
+ for (const key of ADVANCED_ONLY_PREFS) store.removeItem(key);
+ store.setItem(NEW_LOOK_KEY, advanced ? "due" : "none");
+ }
+ store.removeItem(ADVANCED_MODE_KEY);
+ } catch {
+ }
+}
+
+export function newLookDue(): boolean {
+ if (seenHere) return false;
+ try {
+ return storage()?.getItem(NEW_LOOK_KEY) === "due";
+ } catch {
+ return false;
+ }
+}
+
+export function markNewLookSeen(): void {
+ try {
+ storage()?.setItem(NEW_LOOK_KEY, "seen");
+ } catch {
+ seenHere = true;
+ }
+ for (const listener of listeners) listener();
+}
+
+function onStorage(event: StorageEvent) {
+ if (event.key !== NEW_LOOK_KEY && event.key !== null) return;
+ for (const listener of listeners) listener();
+}
+
+function subscribe(listener: () => void): () => void {
+ listeners.add(listener);
+ if (listeners.size === 1 && typeof window !== "undefined") window.addEventListener("storage", onStorage);
+ return () => {
+ listeners.delete(listener);
+ if (listeners.size === 0 && typeof window !== "undefined") window.removeEventListener("storage", onStorage);
+ };
+}
+
+/** Owed in this browser and not yet closed, in this tab or another. */
+export function useNewLookDue(): boolean {
+ return useSyncExternalStore(subscribe, newLookDue, () => false);
+}
diff --git a/src/lib/simple-only.ts b/src/lib/simple-only.ts
new file mode 100644
index 0000000000..5e4c6ed5b4
--- /dev/null
+++ b/src/lib/simple-only.ts
@@ -0,0 +1,2 @@
+/** Simple is the only mode. false brings back the Advanced mode switch, and each browser the mode it had. */
+export const SIMPLE_ONLY: boolean = true;
diff --git a/src/lib/skins.default.test.ts b/src/lib/skins.default.test.ts
index c259333da3..bba3c2bd66 100644
--- a/src/lib/skins.default.test.ts
+++ b/src/lib/skins.default.test.ts
@@ -5,11 +5,12 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
const values = new Map<string, string>();
const os = { dark: false, listeners: new Set<() => void>() };
-// Each case loads fresh modules over the same storage, as a launch would; interface-mode keeps a per-session choice.
+// Each case loads fresh modules over the same storage, as a launch would (main.tsx's order); interface-mode keeps a
+// per-session choice.
async function boot() {
vi.resetModules();
- const [{ settleAdvancedModeDefault, readAdvancedMode }, skins] = await Promise.all([import("./interface-mode"), import("./skins")]);
- settleAdvancedModeDefault();
+ const [{ readAdvancedMode }, { settleInterfaceMode }, skins] = await Promise.all([import("./interface-mode"), import("./new-look"), import("./skins")]);
+ settleInterfaceMode();
skins.applySkinChoice(skins.readSkinChoice());
return { skin: document.documentElement.dataset.skin, advanced: readAdvancedMode(), stored: values.get("omb-skin") };
}
@@ -70,7 +71,7 @@ describe("default skin", () => {
it("keeps Midnight for an earlier install whose saved skin is missing or no longer exists", async () => {
values.set("omb-installed", "2026-01-01T00:00:00.000Z");
- expect(await boot()).toEqual({ skin: "midnight", advanced: true, stored: "midnight" });
+ expect(await boot()).toEqual({ skin: "midnight", advanced: false, stored: "midnight" });
values.set("omb-skin", "retired-skin");
expect(await boot()).toMatchObject({ skin: "midnight", stored: "midnight" });
});
diff --git a/src/locales/de.json b/src/locales/de.json
index 0ef29fb2f3..e067bd6265 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -735,6 +735,8 @@
"settings.diagnostics.elsewhere": "Logs liegen dort, wo {app} läuft. Um die dieses Computers zu öffnen oder zu exportieren, nutze die Einstellungen in der Desktop-App darauf. Der Support von MausBot Cloud kann die der Cloud lesen.",
"settings.analytics.title": "Nutzungsstatistik",
"settings.analytics.aria": "Nutzungsstatistik senden",
+ "newLook.title": "{app} sieht jetzt einfacher aus",
+ "newLook.body": "Alles, was du brauchst, ist noch da; seltener genutzte Einstellungen findest du unter Einstellungen → Weitere Einstellungen.",
"settings.updates.startingDownload": "Download startet…",
"settings.updates.preparing": "Download abgeschlossen. macOS bereitet das Update vor.",
"settings.updates.readyInstall": "{app} {version} ist bereit — im Terminal installieren",
diff --git a/src/locales/en.json b/src/locales/en.json
index 7790900f56..1354da1a07 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -1875,6 +1875,8 @@
"simpleModePrompt.switch": "Simple mode",
"simpleModePrompt.switchHint": "Flip it to see the difference right away.",
"simpleModePrompt.where": "Switch any time in Settings → General.",
+ "newLook.title": "{app} has a simpler look",
+ "newLook.body": "Everything you need is still here; rarer settings are under Settings → More settings.",
"settings.openAtLogin.title": "Open at login",
"settings.openAtLogin.subtitle": "Open {app} when you sign in to this computer, so your bots and routines are ready without opening it yourself.",
"settings.openAtLogin.failed": "Could not change this. Try again, or check Login Items in your system settings.",
diff --git a/src/locales/es.json b/src/locales/es.json
index 0764503373..4eb21c3ce6 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -1401,6 +1401,8 @@
"settings.analytics.subtitle": "Eventos anónimos del producto y un recuento diario de lo que está configurado: qué proveedores tienen una clave (nunca la clave) y cuántos bots, grupos, rutinas y equipos hay. Nunca conversaciones, prompts, contenido de archivos, nombres ni direcciones. Tu correo solo se adjunta si lo compartiste durante la configuración, o si eliges mejorar, gestionar o comparar planes en la ventana de Cloud Pro con la sesión iniciada en MausBot Cloud (el correo de tu cuenta de Cloud).",
"settings.analytics.link": "Ver todo lo que envía",
"settings.analytics.aria": "Enviar analíticas de uso",
+ "newLook.title": "{app} ahora tiene un aspecto más sencillo",
+ "newLook.body": "Todo lo que necesitas sigue aquí; los ajustes que se usan menos están en Ajustes → Más ajustes.",
"settings.updates.startingDownload": "Iniciando la descarga…",
"settings.updates.preparing": "Descarga completa. macOS está preparando la actualización.",
"settings.updates.readyInstall": "{app} {version} está lista: instálala en una terminal",
diff --git a/src/locales/fr.json b/src/locales/fr.json
index 49bba2f69b..8ed61b7576 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -605,6 +605,8 @@
"settings.diagnostics.elsewhere": "Les journaux sont conservés là où tourne {app}. Pour ouvrir ou exporter ceux de cet ordinateur, utilisez les Paramètres de l'app de bureau qui s'y trouve. L'assistance MausBot Cloud peut lire ceux du Cloud.",
"settings.analytics.title": "Statistiques d'usage",
"settings.analytics.aria": "Envoyer les statistiques d'usage",
+ "newLook.title": "{app} a désormais une apparence plus simple",
+ "newLook.body": "Tout ce dont vous avez besoin est toujours là ; les paramètres moins courants se trouvent dans Paramètres → Plus de paramètres.",
"settings.updates.startingDownload": "Démarrage du téléchargement…",
"settings.updates.preparing": "Téléchargement terminé. macOS prépare la mise à jour.",
"settings.updates.readyInstall": "{app} {version} est prête — installez-la dans un terminal",
diff --git a/src/locales/hi.json b/src/locales/hi.json
index 71a6c844a0..551428823d 100644
--- a/src/locales/hi.json
+++ b/src/locales/hi.json
@@ -605,6 +605,8 @@
"settings.diagnostics.elsewhere": "लॉग वहीं रखे जाते हैं जहाँ {app} चलता है। इस कंप्यूटर के लॉग खोलने या निर्यात करने के लिए, उस पर डेस्कटॉप ऐप की सेटिंग्स इस्तेमाल करें। MausBot Cloud सहायता Cloud के लॉग पढ़ सकती है।",
"settings.analytics.title": "उपयोग विश्लेषण",
"settings.analytics.aria": "उपयोग विश्लेषण भेजें",
+ "newLook.title": "{app} अब और सरल दिखता है",
+ "newLook.body": "आपकी ज़रूरत की हर चीज़ अब भी यहीं है; कम इस्तेमाल होने वाली सेटिंग्स सेटिंग्स → और सेटिंग्स में हैं।",
"settings.updates.startingDownload": "डाउनलोड शुरू हो रहा है…",
"settings.updates.preparing": "डाउनलोड पूरा। macOS अपडेट तैयार कर रहा है।",
"settings.updates.readyInstall": "{app} {version} तैयार है — टर्मिनल में इंस्टॉल करें",
diff --git a/src/locales/it.json b/src/locales/it.json
index 9ab23de917..a392be238a 100644
--- a/src/locales/it.json
+++ b/src/locales/it.json
@@ -1532,6 +1532,8 @@
"updatesConsent.emailHint": "Facoltativa. Se la lasci vuota, useremo la tua email di MausBot Cloud appena accedi.",
"updatesConsent.badEmail": "Inserisci un indirizzo email valido.",
"updatesConsent.failed": "Non è stato salvato. Riprova.",
+ "newLook.title": "{app} ora ha un aspetto più semplice",
+ "newLook.body": "Tutto ciò che ti serve è ancora qui; le impostazioni meno usate sono in Impostazioni → Altre impostazioni.",
"settings.updatesConsent.title": "Novità del prodotto via email",
"settings.updatesConsent.subtitle": "Novità e consigli, circa due volte al mese. Puoi disiscriverti quando vuoi.",
"settings.updatesConsent.to": "Inviata a {email}.",
diff --git a/src/locales/ja.json b/src/locales/ja.json
index c760fe6675..53a386f3f2 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -1729,6 +1729,8 @@
"simpleModePrompt.switch": "シンプルモード",
"simpleModePrompt.switchHint": "切り替えると、すぐに違いがわかります。",
"simpleModePrompt.where": "「設定 → 一般」でいつでも切り替えられます。",
+ "newLook.title": "{app} の見た目がシンプルになりました",
+ "newLook.body": "必要な機能はすべてそのままです。あまり使わない設定は「設定 → その他の設定」にあります。",
"settings.openAtLogin.title": "ログイン時に開く",
"settings.openAtLogin.subtitle": "このコンピューターにサインインしたときに {app} を開きます。自分で開かなくても、ボットとルーティンがすぐ使える状態になります。",
"settings.openAtLogin.failed": "変更できませんでした。もう一度試すか、システム設定の「ログイン項目」を確認してください。",
diff --git a/src/locales/ko.json b/src/locales/ko.json
index b16ad48d42..0ce06a1c98 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -1643,6 +1643,8 @@
"simpleModePrompt.switch": "간단 모드",
"simpleModePrompt.switchHint": "켜 보면 바로 차이를 볼 수 있어요.",
"simpleModePrompt.where": "설정 → 일반에서 언제든 바꿀 수 있어요.",
+ "newLook.title": "{app} 화면이 더 단순해졌어요",
+ "newLook.body": "필요한 기능은 모두 그대로예요. 자주 쓰지 않는 설정은 설정 → 기타 설정에 있어요.",
"settings.openAtLogin.title": "로그인할 때 열기",
"settings.openAtLogin.subtitle": "이 컴퓨터에 로그인하면 {app}을 열어요. 직접 열지 않아도 봇과 루틴이 준비돼요.",
"settings.openAtLogin.failed": "변경하지 못했어요. 다시 시도하거나 시스템 설정의 로그인 항목을 확인하세요.",
diff --git a/src/locales/pl.json b/src/locales/pl.json
index 0fcba14797..692be53fa3 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -1557,6 +1557,8 @@
"updatesConsent.emailHint": "Opcjonalne. Pozostaw puste, a po zalogowaniu użyjemy adresu e-mail z MausBot Cloud.",
"updatesConsent.badEmail": "Wpisz prawidłowy adres e-mail.",
"updatesConsent.failed": "Nie udało się zapisać. Spróbuj ponownie.",
+ "newLook.title": "{app} wygląda teraz prościej",
+ "newLook.body": "Wszystko, czego potrzebujesz, nadal tu jest; rzadziej używane ustawienia znajdziesz w Ustawienia → Więcej ustawień.",
"settings.updatesConsent.title": "Aktualizacje produktu e-mailem",
"settings.updatesConsent.subtitle": "Nowe funkcje i wskazówki, mniej więcej dwa razy w miesiącu. Możesz zrezygnować w każdej chwili.",
"settings.updatesConsent.to": "Wysyłane na adres {email}.",
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index 097ab168e3..3cc07ce43b 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -1752,6 +1752,8 @@
"simpleModePrompt.switch": "Modo simples",
"simpleModePrompt.switchHint": "Mude para ver a diferença na hora.",
"simpleModePrompt.where": "Mude quando quiser em Configurações → Geral.",
+ "newLook.title": "{app} agora tem um visual mais simples",
+ "newLook.body": "Tudo de que você precisa continua aqui; as configurações menos usadas ficam em Configurações → Mais configurações.",
"settings.openAtLogin.title": "Abrir ao iniciar sessão",
"settings.openAtLogin.subtitle": "Abrir o app {app} quando você entrar neste computador, para que os bots e as rotinas fiquem prontos sem você precisar abrir o app.",
"settings.openAtLogin.failed": "Não foi possível alterar esta opção. Tente novamente ou confira as opções de início automático nas configurações do sistema.",
diff --git a/src/locales/ru.json b/src/locales/ru.json
index 005c0f35f1..bedfb3dcce 100644
--- a/src/locales/ru.json
+++ b/src/locales/ru.json
@@ -1563,6 +1563,8 @@
"updatesConsent.emailHint": "Необязательно. Если оставить поле пустым, после входа мы будем использовать адрес электронной почты вашей учётной записи MausBot Cloud.",
"updatesConsent.badEmail": "Введите корректный адрес электронной почты.",
"updatesConsent.failed": "Не удалось сохранить. Попробуйте ещё раз.",
+ "newLook.title": "{app} теперь выглядит проще",
+ "newLook.body": "Всё нужное по-прежнему здесь; редко используемые настройки находятся в разделе Настройки → Другие настройки.",
"settings.updatesConsent.title": "Обновления продукта по электронной почте",
"settings.updatesConsent.subtitle": "Новые возможности и советы примерно два раза в месяц. Вы можете отписаться в любой момент.",
"settings.updatesConsent.to": "Отправляется на {email}.",
diff --git a/src/locales/tr.json b/src/locales/tr.json
index 49005010be..606d69718d 100644
--- a/src/locales/tr.json
+++ b/src/locales/tr.json
@@ -1105,6 +1105,8 @@
"settings.diagnostics.elsewhere": "Günlükler {app}'un çalıştığı yerde tutulur. Bu bilgisayarınkileri açmak veya dışa aktarmak için oradaki masaüstü uygulamasında Ayarlar'ı kullanın. Cloud'unkileri MausBot Cloud desteği okuyabilir.",
"settings.analytics.title": "Kullanım analitiği",
"settings.analytics.aria": "Kullanım analitiği gönder",
+ "newLook.title": "{app} artık daha sade görünüyor",
+ "newLook.body": "İhtiyacınız olan her şey hâlâ burada; daha az kullanılan ayarlar Ayarlar → Diğer ayarlar bölümünde.",
"settings.updates.startingDownload": "İndirme başlatılıyor…",
"settings.updates.preparing": "İndirme tamamlandı. macOS güncellemeyi hazırlıyor.",
"settings.updates.readyInstall": "{app} {version} hazır — bir terminalde yükleyin",
diff --git a/src/locales/uk.json b/src/locales/uk.json
index 46336d7241..07c8598c42 100644
--- a/src/locales/uk.json
+++ b/src/locales/uk.json
@@ -703,6 +703,8 @@
"settings.diagnostics.elsewhere": "Логи зберігаються там, де працює {app}. Щоб відкрити або експортувати логи цього комп’ютера, скористайтеся Налаштуваннями настільного застосунку на ньому. Підтримка MausBot Cloud може читати логи Cloud.",
"settings.analytics.title": "Аналітика використання",
"settings.analytics.aria": "Надсилати аналітику використання",
+ "newLook.title": "{app} тепер виглядає простіше",
+ "newLook.body": "Усе потрібне досі тут; рідше використовувані налаштування — у розділі Налаштування → Інші налаштування.",
"settings.updates.startingDownload": "Починаємо завантаження…",
"settings.updates.preparing": "Завантаження завершено. macOS готує оновлення.",
"settings.updates.readyInstall": "{app} {version} готова — встановіть у терміналі",
diff --git a/src/locales/vi.json b/src/locales/vi.json
index 96b4b4673e..30191c506c 100644
--- a/src/locales/vi.json
+++ b/src/locales/vi.json
@@ -1105,6 +1105,8 @@
"settings.diagnostics.elsewhere": "Nhật ký được lưu ở nơi {app} chạy. Để mở hoặc xuất nhật ký của máy tính này, hãy dùng Cài đặt trong ứng dụng desktop trên máy đó. Bộ phận hỗ trợ MausBot Cloud có thể đọc nhật ký của Cloud.",
"settings.analytics.title": "Phân tích sử dụng",
"settings.analytics.aria": "Gửi dữ liệu phân tích sử dụng",
+ "newLook.title": "{app} giờ có giao diện đơn giản hơn",
+ "newLook.body": "Mọi thứ bạn cần vẫn ở đây; các cài đặt ít dùng nằm trong Cài đặt → Cài đặt khác.",
"settings.updates.startingDownload": "Đang bắt đầu tải xuống…",
"settings.updates.preparing": "Tải xuống hoàn tất. macOS đang chuẩn bị bản cập nhật.",
"settings.updates.readyInstall": "{app} {version} đã sẵn sàng — hãy cài đặt trong terminal",
diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.json
index 27ae024be9..5fc3eec69f 100644
--- a/src/locales/zh-tw.json
+++ b/src/locales/zh-tw.json
@@ -1857,6 +1857,8 @@
"simpleModePrompt.switch": "簡易模式",
"simpleModePrompt.switchHint": "切換一下,立刻就能看到差別。",
"simpleModePrompt.where": "隨時可在「設定 → 一般」中切換。",
+ "newLook.title": "{app} 的外觀變得更簡潔了",
+ "newLook.body": "你需要的功能都還在;較少用到的設定位於「設定 → 更多設定」。",
"settings.openAtLogin.title": "登入時開啟",
"settings.openAtLogin.subtitle": "登入這台電腦時開啟 {app},讓你的機器人和例行工作不必手動開啟就能準備就緒。",
"settings.openAtLogin.failed": "無法變更。請再試一次,或檢查系統設定中的登入項目。",
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 5fbf04619a..425207c199 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -1764,6 +1764,8 @@
"simpleModePrompt.switch": "简洁模式",
"simpleModePrompt.switchHint": "切换一下,立刻看到差别。",
"simpleModePrompt.where": "随时可以在「设置 → 通用」中切换。",
+ "newLook.title": "{app} 的界面变得更简洁了",
+ "newLook.body": "你需要的功能都还在;不常用的设置在「设置 → 更多设置」中。",
"settings.openAtLogin.title": "登录时打开",
"settings.openAtLogin.subtitle": "你登录这台电脑时自动打开 {app},让你的机器人和例行任务随时就绪,无需手动打开。",
"settings.openAtLogin.failed": "无法更改此项。请重试,或检查系统设置中的「登录项」。",
diff --git a/src/main.tsx b/src/main.tsx
index 2aecd331a0..1a27bc0058 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -9,7 +9,7 @@ import { loadPageLanguage } from "./lib/language-preference";
import { applySkinChoice, readSkinChoice } from "./lib/skins";
import { applyChatWidth, readChatWidth } from "./lib/chat-width";
import { applyFont, readFont } from "./lib/fonts";
-import { settleAdvancedModeDefault } from "./lib/interface-mode";
+import { settleInterfaceMode } from "./lib/new-look";
import { BrowserSignInPage } from "./pair/BrowserSignInPage";
import { PairPage } from "./pair/PairPage";
import { HomeScreen, SignedOutAtHome } from "./components/HomeScreen";
@@ -17,8 +17,8 @@ import { PageBoundary } from "./components/PageBoundary";
import { endedBeforeReload, forgetEndedSession } from "./lib/session-ended";
import "./styles.css";
-// Before first paint; settleAdvancedModeDefault must run before applySkin writes omb-skin.
-settleAdvancedModeDefault();
+// Before first paint; settleInterfaceMode must run before applySkin writes omb-skin.
+settleInterfaceMode();
applySkinChoice(readSkinChoice());
applyFont(readFont());
applyChatWidth(readChatWidth());
diff --git a/src/rail.tsx b/src/rail.tsx
index 40c9b569cc..27a66bac73 100644
--- a/src/rail.tsx
+++ b/src/rail.tsx
@@ -4,7 +4,7 @@ import { ChromeRail } from "./components/ChromeRail";
import { PageBoundary } from "./components/PageBoundary";
import { bootstrapBrand } from "./lib/brand";
import { applyFont, readFont } from "./lib/fonts";
-import { settleAdvancedModeDefault } from "./lib/interface-mode";
+import { settleInterfaceMode } from "./lib/new-look";
import { loadPageLanguage } from "./lib/language-preference";
import { applySkinChoice, readSkinChoice } from "./lib/skins";
import "./styles.css";
@@ -12,7 +12,7 @@ import "./styles.css";
// The window's own rail of places (electron/chrome-rail.mjs): see-through but for the rail and its open sheets. Only
// the desktop's preload gives this app's page a rail; anywhere else this address is the app.
if (window.ogb?.rail?.expand) {
- settleAdvancedModeDefault();
+ settleInterfaceMode();
applySkinChoice(readSkinChoice());
applyFont(readFont());
document.documentElement.style.background = document.body.style.background = "transparent";
diff --git a/src/state/notification-open.test.ts b/src/state/notification-open.test.ts
index 8680c7b158..aede3db75e 100644
--- a/src/state/notification-open.test.ts
+++ b/src/state/notification-open.test.ts
@@ -8,6 +8,9 @@ import type { ServerFrame } from "../../shared/wire";
import type { Action, AppState, BotAnnouncement } from "./store";
import { LAST_CONVERSATION_KEY } from "@/lib/last-conversation";
+// Threads shown is Advanced mode's: its cases run with the switch put back until that code goes.
+vi.mock("@/lib/simple-only", () => ({ SIMPLE_ONLY: false }));
+
class FixtureEventSource {
static opened: FixtureEventSource[] = [];
onopen: (() => void) | null = null;