Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Bring Advanced mode back, and put browsers that were on it back on it (#5231)
Milind Soni6f83379a80a8
diff --git a/apps/docs/content/docs/security/analytics.mdx b/apps/docs/content/docs/security/analytics.mdxindex 737fcf2626..58de2b4d36 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`, the look this app page is in when it counts the day, the only one now (earlier versions also sent `advanced`) |+| `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 || `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 |@@ -167,6 +167,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin| `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` |+| `advanced_back_notice` | The notice that Advanced mode is back, shown once in each browser that was on Advanced mode before Simple became the only look and is put back on it, 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.mdindex c15f454924..d9ee943ac4 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`, the look this app page is in when it counts the day, the only one now (earlier versions also sent `advanced`) |+| `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 || `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 |@@ -163,6 +163,7 @@ use their own Boat key, and how many bots run on cloud computers, without sendin| `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` |+| `advanced_back_notice` | The notice that Advanced mode is back, shown once in each browser that was on Advanced mode before Simple became the only look and is put back on it, 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/threads-preview.tsx b/scripts/testing/threads-preview.tsxindex 4ab85c9e56..3f1496cf3b 100644--- a/scripts/testing/threads-preview.tsx+++ b/scripts/testing/threads-preview.tsx@@ -1,7 +1,7 @@import { createRoot } from "react-dom/client";import App from "../../src/App";import { setAnalyticsEnabled, setEmailGateDone } from "../../src/lib/analytics";-import { setAdvancedMode } from "../../src/lib/interface-mode";+import { ADVANCED_MODE_KEY, setAdvancedMode } from "../../src/lib/interface-mode";import { GROK_MOVE_NOTICE } from "../../src/lib/notices";import { markSimpleModePromptSeen } from "../../src/lib/simple-mode-prompt";import { applySkinChoice, readSkinChoice } from "../../src/lib/skins";@@ -14,9 +14,10 @@ if (new URLSearchParams(location.search).has("ombVoiceProbe")) {(window as typeof window & { __ombVoiceProbe?: unknown[] }).__ombVoiceProbe = [];}setAnalyticsEnabled(false);-// ?onboarding=1 plays a brand-new install, and a new install opens in Simple mode.-if (new URLSearchParams(location.search).has("onboarding")) setAdvancedMode(false);-else setEmailGateDone("skipped");+// Every launch is a new browser, so it opens in Simple mode as a new install does, unless a test chose a mode first.+// ?onboarding=1 plays a brand-new install.+if (localStorage.getItem(ADVANCED_MODE_KEY) == null) setAdvancedMode(false);+if (!new URLSearchParams(location.search).has("onboarding")) setEmailGateDone("skipped");// Every launch is a new browser, so the once-per-browser Simple mode popup shows only with ?simpleModePrompt=1.if (!new URLSearchParams(location.search).has("simpleModePrompt")) markSimpleModePromptSeen();// The same for the once-per-person Move from Grok Bot popup, with ?grokMovePopup=1.diff --git a/src/components/AppNotices.test.ts b/src/components/AppNotices.test.tsindex 0d4a1718be..e26281bfff 100644--- a/src/components/AppNotices.test.ts+++ b/src/components/AppNotices.test.ts@@ -39,8 +39,9 @@ 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 { NEW_LOOK_KEY } from "@/lib/new-look";+import { ADVANCED_MODE_KEY, setAdvancedMode } from "@/lib/interface-mode";import { SIMPLE_MODE_PROMPT_KEY } from "@/lib/simple-mode-prompt";+import { ADVANCED_BACK_KEY } from "@/lib/new-look";import { api } from "@/state/store";const DAY = 86_400_000, NOW = new Date(2026, 9, 9, 12).getTime();@@ -992,15 +993,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.set(NEW_LOOK_KEY, "due"); storage.delete(BOAT_OFFER_NOTICE); storage.delete(STAR_NOTICE);+ returning(); desk.saved = null; storage.delete(SIMPLE_MODE_PROMPT_KEY); storage.delete(BOAT_OFFER_NOTICE); storage.delete(STAR_NOTICE);const first = await launch();expect(first).toContain(TITLE);- for (const other of ["data-new-look-notice", WHATS_NEW, STAR]) expect(first).not.toContain(other);+ for (const other of ["data-simple-mode-prompt", 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-new-look-notice"); expect(second).not.toContain(TITLE);+ expect(second).toContain("data-simple-mode-prompt"); expect(second).not.toContain(TITLE);expect(launchNotice()).not.toBe(GROK_MOVE_NOTICE);});@@ -1092,51 +1093,57 @@ describe("the Move from Grok Bot popup", () => {});});-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.";+describe("the Simple mode popup after the update", () => {+ const TITLE = "Try the new Simple mode", ON = "You're on Simple mode", POPUP = "Meet the new MausBot Cloud";let modal: boolean;- const events = () => vi.mocked(track).mock.calls.filter(([event]) => event === "new_look_notice").map(([, props]) => props);+ const prompts = () => vi.mocked(track).mock.calls.filter(([event]) => event === "simple_mode_prompt").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 }] : [] });- // main.tsx's settleInterfaceMode found this browser on Advanced mode.- storage.set(NEW_LOOK_KEY, "due");+ setAdvancedMode(true);+ storage.delete(SIMPLE_MODE_PROMPT_KEY);});- it("shows once where Advanced mode was on, with no switch, claims the launch, and never comes back once it is closed", async () => {+ it("shows once in each browser, claims the launch, and never comes back once it is closed", async () => {const html = await launch();- 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(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(launchDialogShown()).toBe("notices");expect(await settle(), "shown is counted once").toContain(TITLE);- expect(events()).toHaveLength(1);+ expect(prompts()).toHaveLength(1);press("Done"); await flush();expect(render(), "nothing else in this launch after it").toBe("");- expect(storage.get(NEW_LOOK_KEY)).toBe("seen");- expect(events()).toEqual([{ action: "shown" }, { action: "closed" }]);+ expect(storage.get(SIMPLE_MODE_PROMPT_KEY)).toBe("1");+ expect(prompts()).toEqual([{ action: "shown", mode: "advanced" }, { action: "closed", mode: "advanced" }]);session.clear();expect(await launch()).not.toContain(TITLE);- expect(events()).toHaveLength(2);+ expect(prompts()).toHaveLength(2);});- 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("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("shows on the Cloud's own page and in a plain browser too, not only on this computer's", async () => {+ it("asks 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);@@ -1156,12 +1163,12 @@ describe("the new look, in the Simple mode popup's place", () => {expect(await launch(), wait.toString()).not.toContain(TITLE);f.state = saved; modal = false;}- expect(events()).toEqual([]);+ expect(prompts()).toEqual([]);markWelcomeFinished();expect(await launch(), "the launch the welcome finished in").not.toContain(TITLE);session.clear();expect(await launch()).toContain(TITLE);- expect(storage.get(NEW_LOOK_KEY)).toBe("due");+ expect(storage.has(SIMPLE_MODE_PROMPT_KEY)).toBe(false);});it("is one popup at a time: it comes before What's new, which waits for a later launch", async () => {@@ -1176,6 +1183,53 @@ describe("the new look, in the Simple mode popup's place", () => {});});+describe("the word that Advanced mode is back, in the Simple mode popup's place", () => {+ const TITLE = "Advanced mode is back", BODY = "Turn it off any time in Settings → General.";+ const events = () => vi.mocked(track).mock.calls.filter(([event]) => event === "advanced_back_notice").map(([, props]) => props);++ beforeEach(() => {+ vi.stubGlobal("document", { activeElement: null, body: null, documentElement: { dataset: {} }, getElementById: () => null, querySelector: () => null,+ querySelectorAll: () => [] });+ // main.tsx's settleInterfaceMode put this browser back on Advanced mode.+ setAdvancedMode(true);+ storage.set(ADVANCED_BACK_KEY, "due");+ });++ it("shows once, with no switch, even where the Simple mode popup was never closed, and neither comes back", async () => {+ storage.delete(SIMPLE_MODE_PROMPT_KEY);+ const html = await launch();+ expect(html).toContain(TITLE); expect(html).toContain(BODY);+ for (const gone of ['role="switch"', "data-simple-mode-prompt", "Try the new Simple mode"]) expect(html).not.toContain(gone);+ expect(events()).toEqual([{ action: "shown" }]);+ press("Done"); await flush();+ expect(render(), "nothing else in this launch after it").toBe("");+ expect(storage.get(ADVANCED_BACK_KEY)).toBe("seen");+ expect(storage.get(SIMPLE_MODE_PROMPT_KEY)).toBe("1");+ expect(events()).toEqual([{ action: "shown" }, { action: "closed" }]);+ session.clear();+ const later = await launch();+ expect(later).not.toContain(TITLE); expect(later).not.toContain("data-simple-mode-prompt");+ });++ it("never says so once the person has switched to Simple before it showed", async () => {+ storage.set(SIMPLE_MODE_PROMPT_KEY, "1");+ setAdvancedMode(false);+ expect(await launch()).not.toContain(TITLE);+ expect(events()).toEqual([]);+ expect(storage.get(ADVANCED_BACK_KEY)).toBe("due");+ });++ it("never shows where nothing was put back", async () => {+ storage.set(SIMPLE_MODE_PROMPT_KEY, "1");+ for (const back of ["seen", undefined]) {+ if (back) storage.set(ADVANCED_BACK_KEY, back); else storage.delete(ADVANCED_BACK_KEY);+ session.clear();+ expect(await launch(), String(back)).not.toContain(TITLE);+ }+ expect(events()).toEqual([]);+ });+});+describe("bots in two places", () => {const GARAGE = { key: "server:https://garage.example.test", name: "Garage server", kind: "server" as const };const BODY = "Your bots live in two places, so they can't work together. Bring them together on Garage server?";diff --git a/src/components/AppNotices.tsx b/src/components/AppNotices.tsxindex d7dbbc178e..aebbdca42d 100644--- a/src/components/AppNotices.tsx+++ b/src/components/AppNotices.tsx@@ -14,7 +14,8 @@ import { cornerPopupWaits, firstChatQuiet, firstReplyPending } from "@/lib/corneimport { 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 { useAdvancedBackDue, useNewLookDue } from "@/lib/new-look";+import { useAdvancedMode } from "@/lib/interface-mode";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";@@ -146,9 +147,11 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { qconst 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. 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;+ // the only mode, its place goes to the word about the new look, only where Advanced was on; a browser put back on+ // Advanced gets the word that it is back there instead.+ const promptSeen = useSimpleModePromptSeen(), newLookDue = useNewLookDue(), backDue = useAdvancedBackDue(), advanced = useAdvancedMode();+ const advancedBack = backDue && advanced;+ const simpleDue = SIMPLE_ONLY ? newLookDue : advancedBack || !promptSeen;const simpleBlocked = useOtherDialogOpen(simpleDue) || Boolean(state.liveCall && state.liveCall.status !== "ended");const boatHere = boatOfferRuns(now()) && brandStatus().source !== "file";@@ -232,7 +235,7 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { qvoid planBridge?.noticeSeen?.().catch(() => {});} else if (shownKey === SIMPLE_MODE_NOTICE && !simpleShown) {setSimpleShown(true);- if (SIMPLE_ONLY) reportNewLook("shown");+ if (SIMPLE_ONLY || advancedBack) reportNewLook("shown", advancedBack);else reportSimpleModePrompt("shown");} else if (shownKey === BOAT_OFFER_NOTICE && !boatShown) {setBoatShown(true);@@ -262,7 +265,9 @@ export function AppNotices({ quiet = false, viewer = null, now = Date.now }: { qreturn <GrokMovePopup onDone={done} />;}- if (notice === SIMPLE_MODE_NOTICE) return SIMPLE_ONLY ? <NewLookNotice onClose={close} /> : <SimpleModePrompt onClose={close} />;+ if (notice === SIMPLE_MODE_NOTICE) {+ return SIMPLE_ONLY || advancedBack ? <NewLookNotice onClose={close} back={advancedBack} /> : <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/ChatView.conversational.test.ts b/src/components/ChatView.conversational.test.tsindex 5d7209a4ef..77a16d747f 100644--- a/src/components/ChatView.conversational.test.ts+++ b/src/components/ChatView.conversational.test.ts@@ -5,9 +5,6 @@ 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.tsindex 10954a80cf..b7ec063932 100644--- a/src/components/ChatView.simple-only.test.ts+++ b/src/components/ChatView.simple-only.test.ts@@ -1,12 +1,13 @@// @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.+// The real mode with the switch to Simple as the only mode turned on, as it can be again: 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("@/lib/simple-only", () => ({ SIMPLE_ONLY: true }));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 }),diff --git a/src/components/ChatView.team.test.ts b/src/components/ChatView.team.test.tsindex 53daa1ec73..74e3c17822 100644--- a/src/components/ChatView.team.test.ts+++ b/src/components/ChatView.team.test.ts@@ -5,9 +5,6 @@ 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/ComputerPanel.simple.test.ts b/src/components/ComputerPanel.simple.test.tsindex 9cd082ab55..480c3e8aba 100644--- a/src/components/ComputerPanel.simple.test.ts+++ b/src/components/ComputerPanel.simple.test.ts@@ -675,16 +675,14 @@ 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 the VPS's settings where Simple has no fix", () => {+ it("offers a bot that picks its own place auto-start beside a stopped VPS, and Advanced's switch 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 } });- 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" });+ (simple.button("Show advanced controls")!.props.onClick as () => void)();+ expect(fixture.setAdvancedMode).toHaveBeenCalledWith(true);});});diff --git a/src/components/FirstReplyRescueRow.test.ts b/src/components/FirstReplyRescueRow.test.tsindex 3cb2865bbd..0ee5d6eeb6 100644--- a/src/components/FirstReplyRescueRow.test.ts+++ b/src/components/FirstReplyRescueRow.test.ts@@ -13,9 +13,6 @@ import { PERSON_STOPPED_TURN_NAME, STOPPED_TURN_NAME } from "../../shared/clientimport { 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/NewLookNotice.test.ts b/src/components/NewLookNotice.test.tsindex 82eae7999b..f94b2ef43d 100644--- a/src/components/NewLookNotice.test.ts+++ b/src/components/NewLookNotice.test.ts@@ -4,7 +4,8 @@ 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";+import { ADVANCED_BACK_KEY, advancedBackDue, NEW_LOOK_KEY, newLookDue } from "@/lib/new-look";+import { SIMPLE_MODE_PROMPT_KEY } from "@/lib/simple-mode-prompt";const analytics = vi.hoisted(() => ({ track: vi.fn() }));vi.mock("@/lib/analytics", () => analytics);@@ -16,7 +17,7 @@ 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 show = async (back = false) => { await act(async () => { root.render(createElement(NewLookNotice, { onClose, back })); }); };const key = async (name: string, shiftKey = false) => {await act(async () => { document.activeElement!.dispatchEvent(new KeyboardEvent("keydown", { key: name, shiftKey, bubbles: true, cancelable: true })); });};@@ -81,3 +82,31 @@ describe("the new look notice", () => {expect(document.activeElement).toBe(opener);});});++describe("the word that Advanced mode is back", () => {+ const backEvents = () => analytics.track.mock.calls.filter(([event]) => event === "advanced_back_notice").map(([, props]) => props);++ it("says Advanced mode is back and where its switch is, with no switch of its own", async () => {+ localStorage.setItem(ADVANCED_BACK_KEY, "due");+ await show(true);+ expect(dialog()?.hasAttribute("data-advanced-back")).toBe(true);+ expect(host.querySelector("h2")?.textContent).toBe("Advanced mode is back");+ expect(host.textContent).toContain("This device is on Advanced mode again. Turn it off any time in Settings → General.");+ expect(host.querySelector('[role="switch"]')).toBeNull();+ expect(document.activeElement).toBe(host.querySelector("h2"));+ });++ it.each(["Done", "Escape"])("closes for good with %s, and takes the Simple mode popup's place for good too", async (how) => {+ localStorage.setItem(ADVANCED_BACK_KEY, "due");+ await show(true);+ if (how === "Escape") await key("Escape");+ else await act(async () => { button(how).click(); });+ expect(onClose).toHaveBeenCalledOnce();+ expect(advancedBackDue()).toBe(false);+ expect(localStorage.getItem(ADVANCED_BACK_KEY)).toBe("seen");+ expect(localStorage.getItem(SIMPLE_MODE_PROMPT_KEY)).toBe("1");+ expect(localStorage.getItem(NEW_LOOK_KEY), "the record of the move stays").toBe("due");+ expect(backEvents()).toEqual([{ action: "closed" }]);+ expect(events()).toEqual([]);+ });+});diff --git a/src/components/NewLookNotice.tsx b/src/components/NewLookNotice.tsxindex 455d67c5f3..158abe273b 100644--- a/src/components/NewLookNotice.tsx+++ b/src/components/NewLookNotice.tsx@@ -2,21 +2,27 @@ 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";+import { markAdvancedBackSeen, markNewLookSeen } from "@/lib/new-look";+import { markSimpleModePromptSeen } from "@/lib/simple-mode-prompt";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 });+export function reportNewLook(action: "shown" | "closed", back = false): void {+ if (back) track("advanced_back_notice", { action });+ else 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 }) {+/** Once, where Advanced mode was on before Simple became the only mode; with back, once where that browser was put back on+ * Advanced, saying where the switch is, in the Simple mode popup's place for good. Done, ×, Escape and a click outside close+ * it for good. */+export function NewLookNotice({ onClose, back = false }: { onClose: () => void; back?: boolean }) {const close = () => {- reportNewLook("closed");- markNewLookSeen();+ reportNewLook("closed", back);+ if (back) {+ markAdvancedBackSeen();+ markSimpleModePromptSeen();+ } else markNewLookSeen();onClose();};@@ -52,13 +58,13 @@ export function NewLookNotice({ onClose }: { onClose: () => void }) {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=""+ <div role="dialog" aria-modal="true" aria-labelledby={TITLE} aria-describedby="new-look-notice-body" data-new-look-notice="" data-advanced-back={back ? "" : undefined}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")}+ {back ? t("advancedBack.title") : t("newLook.title")}</h2>- <p id="new-look-notice-body" className="mt-2 text-[14px] leading-5 text-ink-secondary">{t("newLook.body")}</p>+ <p id="new-look-notice-body" className="mt-2 text-[14px] leading-5 text-ink-secondary">{back ? t("advancedBack.body") : 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">diff --git a/src/components/SettingsModal.appearance.test.ts b/src/components/SettingsModal.appearance.test.tsindex 01731da4f0..b79fbd0f84 100644--- a/src/components/SettingsModal.appearance.test.ts+++ b/src/components/SettingsModal.appearance.test.ts@@ -115,22 +115,25 @@ afterEach(() => {const render = () => renderToStaticMarkup(createElement(SettingsModal));describe("Settings → Appearance", () => {- it.each([true, false])("has no Advanced mode switch in General, Simple being the only mode (Advanced %s)", (enabled) => {+ it.each([true, false])("flips Advanced mode from General, first in Advanced and last in Simple, when the switch is %s", (enabled) => {fixture.section = "general";fixture.advancedMode = enabled;const html = render();- 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);+ 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();});- it.each([true, false])("has none for a paired remote client either (Advanced %s)", (enabled) => {- fixture.advancedMode = enabled;+ it("keeps the Advanced mode switch reachable from a paired remote client", () => {vi.stubGlobal("window", { ogb: { remoteClient: { active: true } } });- const html = render();- expect(html).toContain('aria-label="App language"');- expect(html).not.toContain('aria-label="Advanced mode"');+ expect(render()).toContain('aria-label="Advanced mode"');});it("does not repeat the Advanced mode switch in Appearance on this computer", () => {@@ -303,6 +306,19 @@ describe("Settings → Appearance", () => {expect(fixture.dispatch).not.toHaveBeenCalled();});+ it("renders, and search finds, every display setting Simple has no row for, in Advanced", () => {+ const appearance = render();+ for (const label of ["Interface font", "Chat width", "Choose tools layout", "Show threads", "Pinned bots as circles", "Universal pins",+ "Show the run card"]) expect(appearance, label).toContain(`aria-label="${label}"`);+ fixture.section = "general";+ expect(render()).toContain(">Pinned panels<");+ const section = (id: string) => SECTIONS.find((entry) => entry.id === id)!;+ for (const query of ["font", "chat width", "toolbar", "show threads", "circles", "universal", "run card"]) {+ expect(sectionMatches(section("appearance"), query), query).toBe(true);+ }+ expect(sectionMatches(section("general"), "web panel")).toBe(true);+ });+it("finds chat width and message colors in Appearance", () => {const appearance = SECTIONS.find((section) => section.id === "appearance")!;for (const query of ["width", "wide", "full width", "bubble", "color"]) {diff --git a/src/components/SettingsModal.search.test.ts b/src/components/SettingsModal.search.test.tsindex c6eab3409f..3ae1f7dfb0 100644--- a/src/components/SettingsModal.search.test.ts+++ b/src/components/SettingsModal.search.test.ts@@ -70,13 +70,24 @@ describe("Settings search in Simple mode", () => {expect(search().value).toBe("f");});- 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"]) {+ 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");+ 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(search().value).toBe("");+ });++ it("finds every other builder control as Advanced, and Automatic recovery under More settings", () => {+ for (const [words, key] of [["chat width", "settings.chatWidth.title"], ["circles", "settings.pinnedCircles.title"],+ ["universal", "settings.universalPins.title"], ["this run", "settings.runCard.title"]]) {type(words);- expect(host.querySelector("[data-settings-advanced-only]"), words).toBeNull();- expect(dialog().textContent, words).not.toContain("· Advanced");+ expect(host.querySelector(`[data-settings-advanced-only="${key}"]`)?.textContent, words).toMatch(/ · Advanced$/);}type("recovery");+ expect(host.querySelector("[data-settings-advanced-only]")).toBeNull();const result = host.querySelector<HTMLButtonElement>('[data-settings-more-result="settings.recovery.title"]')!;expect(result.textContent).toBe("Automatic recovery · More settings");flushSync(() => result.click());diff --git a/src/components/SettingsModal.simple.test.ts b/src/components/SettingsModal.simple.test.tsindex ba3ce4a8ef..e8c31f9be9 100644--- a/src/components/SettingsModal.simple.test.ts+++ b/src/components/SettingsModal.simple.test.ts@@ -163,15 +163,14 @@ 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 last as a plain row and no Advanced mode", () => {+ it("opens General on Account, then Appearance, Language and typing, Notifications, System and Import, with More settings and Advanced mode last as plain rows", () => {const html = render();expect(currentPage(html)).toBe("general");expect(groupLabels(html)).toEqual(["Account", "Appearance", "Language and typing", "Notifications", "System", "Import", "Organization"]);- expect(blocks(html).at(-1)).toBe("more");- expect(blocks(html)).not.toContain("advanced-mode");+ expect(blocks(html).slice(-2)).toEqual(["more", "advanced-mode"]);expect(html).toContain(">More settings<");- expect(html).not.toContain('aria-label="Advanced mode"');- expect(html).not.toContain("Nothing is deleted either way");+ 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("border-accent-border/40");expect(html).toContain(">Your name</div>");expect(html).toContain(">Not set yet</div>");@@ -208,7 +207,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 and Automatic recovery behind More settings, and leaves out the rest of Advanced's controls", () => {+ it("keeps the everyday rows, puts limits and Automatic recovery behind More settings, and leaves the five other builder controls to Advanced, where search still points", () => {const general = open("general");for (const shown of ['aria-label="Send usage analytics"', 'aria-label="Color my messages with the bot'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"']) {@@ -319,7 +318,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).not.toContain('aria-label="Advanced mode"');+ expect(general).toContain('aria-label="Advanced mode"');});it.each<[AppSettingsSection, string]>([@@ -374,14 +373,14 @@ describe("Settings in Simple mode", () => {describe("Settings in Advanced mode", () => {beforeEach(() => { fixture.advancedMode = true; });- it("keeps the grouped rail and General, with no Advanced mode switch, on the same Settings look as Simple", () => {+ it("keeps the grouped rail and General, Advanced mode switch first, 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).not.toContain('aria-label="Advanced mode"');- expect(html).not.toContain("Show every technical control on this device");+ 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("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.tsxindex eb9ec642cb..841a2b67a7 100644--- a/src/components/SettingsModal.tsx+++ b/src/components/SettingsModal.tsx@@ -90,7 +90,7 @@ export const SECTIONS: Array<{keywords: string[];}> = [{ id: "general", group: "you", labelKey: "settings.section.general", icon: User, keywords: ["profile", "pinned panels", "web panel", "dashboard", "pin a page", "name", "email", "about me", "about", "suggestions", "suggested", "memory", "analytics", "updates", "product updates", "newsletter", "email updates", "effort", "new bots", "reasoning", "threads", "parallel", "concurrency", "cleanup", "retention", "attachments", "clear attachments", "event log", "event-log", "log size", "automatic recovery", "backup model", "fallback", "routines", "conversation", "schedule", "usage", "limit", "plan", "upgrade", "cloud desktop hours", "storage", "saved steps", "repeat", "replay", "computer tasks", "without ai", "forget", ...talkShortcutKeywords()] },- { id: "appearance", group: "you", labelKey: "settings.section.appearance", icon: Palette, keywords: ["skin", "theme", "appearance", "chat width", "width", "wide", "full width", "bubble", "bubbles", "tools", "tool calls", "threads", "show threads", "hide threads", "sidebar", "display", "run", "this run", "run card", "commands", "notifications", "sound", "sounds", "mute", "silent", "chime", "pinned", "circles", "universal", "groups", "top", "send", "enter", "return", "shift+enter", "ctrl+enter", "cmd+enter", "⌘+enter", "new line", "keyboard", "ime", "japanese", "message color", "my messages", "toolbar", "tools layout", "footer", "routines", "triggers", "team map", "color", "colour", "cloud color", "server color", "tint", "sidebar color", "sidebar picture", "picture", "image", "banner", "background", "computers", "your computers", "rail", "strip", "frame", "window frame", "title bar"] },+ { id: "appearance", group: "you", labelKey: "settings.section.appearance", icon: Palette, keywords: ["skin", "theme", "appearance", "font", "typeface", "chat width", "width", "wide", "full width", "bubble", "bubbles", "tools", "tool calls", "threads", "show threads", "hide threads", "sidebar", "display", "run", "this run", "run card", "commands", "notifications", "sound", "sounds", "mute", "silent", "chime", "pinned", "circles", "universal", "groups", "top", "send", "enter", "return", "shift+enter", "ctrl+enter", "cmd+enter", "⌘+enter", "new line", "keyboard", "ime", "japanese", "message color", "my messages", "toolbar", "tools layout", "footer", "routines", "triggers", "team map", "color", "colour", "cloud color", "server color", "tint", "sidebar color", "sidebar picture", "picture", "image", "banner", "background", "computers", "your computers", "rail", "strip", "frame", "window frame", "title bar"] },{ id: "companion", group: "you", labelKey: "settings.section.companion", icon: TabletSmartphone, keywords: ["companion", "device", "phone", "desktop", "client", "host", "pair", "pairing", "mobile", "https", "secure", "tailscale", "wifi", "remote", "advanced", "domain", "dns", "self-hosted", "server", "caddy"] },{ id: "engines", group: "ai", labelKey: "settings.section.engines", icon: Terminal, keywords: ["models", "model providers", "engines", "claude", "codex", "grok", "providers", "cli", "sign in", "subscription"] },{ id: "connections", group: "ai", labelKey: "settings.section.connections", icon: KeyRound, keywords: ["keys", "api", "api key", "api keys", "connections", "composio", "box", "xai", "mistral", "cerebras", "meta", "muse", "vps", "router", "openrouter", "base url", "openai", "anthropic", "groq", "greenference", "opencode", "deepseek", "provider", "lm studio", "lmstudio", "llm studio", "llmstudio", "bionic"] },diff --git a/src/components/Sidebar.advanced-back.test.ts b/src/components/Sidebar.advanced-back.test.tsnew file mode 100644index 0000000000..ff553fa871--- /dev/null+++ b/src/components/Sidebar.advanced-back.test.ts@@ -0,0 +1,83 @@+// @vitest-environment happy-dom+// The real mode and thread preferences: a browser put back on Advanced mode at boot sees its thread folders in the+// sidebar again; Simple mode keeps one conversation per bot there.+import { createElement } from "react";+import { flushSync } from "react-dom";+import { createRoot, type Root } from "react-dom/client";+import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";+import type { AppState, Bot, InstanceInfo, Task } 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 }));++// What the one-time cleanup left: the record that this browser was on Advanced, no mode key, no threads choice.+const stored = new Map<string, string>([["omb-new-look", "seen"], ["omb-skin", "midnight"]]);+vi.stubGlobal("localStorage", { getItem: (key: string) => stored.get(key) ?? null, setItem: (key: string, value: string) => void stored.set(key, String(value)),+ removeItem: (key: string) => void stored.delete(key) });+const { settleInterfaceMode } = await import("@/lib/new-look");+settleInterfaceMode();+const { readAdvancedMode, setAdvancedMode } = await import("@/lib/interface-mode");+const { Sidebar } = await import("./Sidebar");+const { BotEditorStore, initialState } = await import("@/state/store");+const { setLocale, t } = await import("@/lib/i18n");++const thread = (threadId: string, title: string, projectId?: string): Task =>+ ({ threadId, title, createdAt: 1, busy: false, activity: "idle", modelSelection: { instanceId: "test", model: "m" }, approvalMode: "ask", projectId });+const atlas: Bot = {+ id: "atlas", threadId: "loose", name: "Atlas", title: "", description: "", color: "green",+ notifications: true, unread: false, busy: false, messages: [], modelSelection: { instanceId: "test", model: "m" },+ projects: [{ id: "taxes", name: "Taxes" }],+ tasks: [thread("loose", "Loose chat"), thread("filed", "Filed chat", "taxes")],+};+const state: AppState = {+ ...initialState, connected: true, selectedId: "atlas", activeView: "chat", bots: [atlas],+ instances: [{ instanceId: "test", driverKind: "codex", displayName: "Test", snapshot: { state: "available" } } as InstanceInfo],+};+let root: Root;+const settle = () => new Promise((resolve) => setTimeout(resolve, 0));+async function draw() {+ const value = { state, dispatch: vi.fn(), flushBotPatches: async () => null, refreshInstances: async () => {}, refreshModels: async () => {} };+ flushSync(() => root.render(createElement(BotEditorStore, { value, children: createElement(Sidebar, { open: true, onClose: () => {} }) })));+ await settle();+}+const expand = () => document.querySelector<HTMLButtonElement>(`button[aria-label="${t("task.expandNamed", { name: "Atlas" })}"]`);+const folder = () => document.querySelector('[data-sidebar-folder-row="taxes"]');++beforeAll(() => {+ vi.stubGlobal("fetch", () => new Promise(() => {}));+ setLocale("en");+ const container = document.createElement("div");+ document.body.append(container);+ root = createRoot(container);+});+afterAll(() => {+ root.unmount();+ vi.unstubAllGlobals();+});++describe("thread folders after Advanced mode comes back", () => {+ it("shows a browser put back on Advanced its thread folders, threads being on by default", async () => {+ expect(readAdvancedMode()).toBe(true);+ expect(stored.has("omb-show-threads")).toBe(false);+ await draw();+ expect(folder(), "folded until opened").toBeNull();+ flushSync(() => expand()!.click());+ await settle();+ expect(folder()?.textContent).toContain("Taxes");+ expect(document.querySelector('[data-sidebar-thread-row="loose"]')).not.toBeNull();+ });++ it("hides them in Simple mode and shows them again when switched back", async () => {+ flushSync(() => setAdvancedMode(false));+ await draw();+ expect(folder()).toBeNull();+ expect(expand()).toBeNull();+ flushSync(() => setAdvancedMode(true));+ await draw();+ expect(folder()?.textContent).toContain("Taxes");+ });+});diff --git a/src/components/SimpleModePrompt.test.ts b/src/components/SimpleModePrompt.test.tsindex f70604a577..6209002bd8 100644--- a/src/components/SimpleModePrompt.test.ts+++ b/src/components/SimpleModePrompt.test.ts@@ -8,9 +8,6 @@ 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/cloud-welcome/CloudWelcome.test.ts b/src/components/cloud-welcome/CloudWelcome.test.tsindex d4221314cd..416509b033 100644--- a/src/components/cloud-welcome/CloudWelcome.test.ts+++ b/src/components/cloud-welcome/CloudWelcome.test.ts@@ -37,9 +37,6 @@ 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/lib/analytics.test.ts b/src/lib/analytics.test.tsindex cbfbb32697..f06e39c938 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 Simple, the only mode, even where the page was on Advanced before", async () => {+ it("says which mode the page is in that day, Simple or Advanced", 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: "simple" } });+ expect(active()[1]).toEqual({ event: "app_active", props: { platform: "browser", mode: "advanced" } });});it("is sent again after midnight by the ten-minute check, then not again that day", async () => {diff --git a/src/lib/interface-mode.test.ts b/src/lib/interface-mode.test.tsindex b592d6da90..a7aab1c333 100644--- a/src/lib/interface-mode.test.ts+++ b/src/lib/interface-mode.test.ts@@ -44,10 +44,16 @@ describe("with Simple the only mode", () => {expect(local.getItem("omb-advanced-mode")).toBe("1");});- it("ships with the switch on", async () => {+ it("ships with the switch off: Advanced mode can be turned on, and stays 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);+ expect((await vi.importActual<typeof import("./simple-only")>("./simple-only")).SIMPLE_ONLY).toBe(false);+ const { readAdvancedMode, setAdvancedMode } = await import("./interface-mode");+ expect(readAdvancedMode()).toBe(false);+ setAdvancedMode(true);+ expect(readAdvancedMode()).toBe(true);+ expect(local.getItem("omb-advanced-mode")).toBe("1");+ vi.resetModules();+ expect((await import("./interface-mode")).readAdvancedMode(), "after a relaunch").toBe(true);});});diff --git a/src/lib/new-look.test.ts b/src/lib/new-look.test.tsindex da9c399aed..8953d0c2e2 100644--- a/src/lib/new-look.test.ts+++ b/src/lib/new-look.test.ts@@ -128,3 +128,77 @@ describe("with the switch put back", () => {expect(values.has("omb-new-look")).toBe(false);});});++describe("Advanced mode back, as shipped", () => {+ it("ships with the switch off", async () => {+ vi.resetModules();+ expect((await vi.importActual<typeof import("./simple-only")>("./simple-only")).SIMPLE_ONLY).toBe(false);+ });++ it.each(["due", "seen"])("puts a browser the move found on Advanced (%s) back on it once, with word that it is back, and keeps a later switch to Simple", async (look) => {+ values.set("omb-new-look", look);+ values.set("omb-skin", "lagoon");+ const first = await boot(false);+ expect(first.mode.readAdvancedMode()).toBe(true);+ expect(values.get("omb-advanced-mode")).toBe("1");+ expect(first.advancedBackDue()).toBe(true);+ expect(values.get("omb-new-look"), "the record of the move stays").toBe(look);++ expect((await boot(false)).advancedBackDue(), "owed until it is closed").toBe(true);+ first.markAdvancedBackSeen();+ expect(values.get("omb-advanced-back")).toBe("seen");+ const again = await boot(false);+ expect(again.advancedBackDue()).toBe(false);+ expect(again.mode.readAdvancedMode()).toBe(true);++ again.mode.setAdvancedMode(false);+ const later = await boot(false);+ expect(later.mode.readAdvancedMode(), "Simple, once chosen, stays").toBe(false);+ expect(values.get("omb-advanced-back")).toBe("seen");+ });++ it("restores nothing it cannot know: the reset settings stay at their defaults, which Advanced reads as threads shown, and a choice made since stays", async () => {+ values.set("omb-new-look", "seen");+ values.set("openmausbot.universalPins", "true");+ const back = await boot(false);+ expect(back.mode.readAdvancedMode()).toBe(true);+ for (const key of Object.keys(ADVANCED_PREFS).filter((key) => key !== "openmausbot.universalPins")) expect(values.has(key), key).toBe(false);+ expect(values.get("openmausbot.universalPins")).toBe("true");+ expect([back.font, back.width]).toEqual(["skin", "standard"]);+ });++ it("leaves a browser that was on Simple on Simple, with no word", async () => {+ values.set("omb-new-look", "none");+ values.set("omb-skin", "midnight");+ const simple = await boot(false);+ expect(simple.mode.readAdvancedMode()).toBe(false);+ expect(simple.advancedBackDue()).toBe(false);+ expect(values.has("omb-advanced-back")).toBe(false);+ });++ it.each(["1", "0"])("never runs the one-time cleanup where it has not run: a browser straight from an earlier version keeps its mode (%s) and settings", async (stored) => {+ for (const [key, value] of Object.entries({ ...ADVANCED_PREFS, ...KEPT, "omb-advanced-mode": stored })) values.set(key, value);+ const kept = await boot(false);+ for (const [key, value] of Object.entries({ ...ADVANCED_PREFS, ...KEPT })) expect(values.get(key), key).toBe(value);+ expect(kept.mode.readAdvancedMode()).toBe(stored === "1");+ expect([kept.font, kept.width]).toEqual(["serif", "full"]);+ expect(values.has("omb-new-look")).toBe(false);+ expect(kept.advancedBackDue()).toBe(false);+ });++ it("is safe with no record of the move, an unknown one, or storage that cannot be read", async () => {+ expect((await boot(false)).mode.readAdvancedMode(), "a new install").toBe(false);+ expect(values.has("omb-advanced-back")).toBe(false);++ values.clear();+ values.set("omb-new-look", "garbled");+ const unknown = await boot(false);+ expect(unknown.mode.readAdvancedMode()).toBe(false);+ expect(unknown.advancedBackDue()).toBe(false);++ local.getItem.mockImplementation(() => { throw new Error("blocked"); });+ const blocked = await boot(false);+ expect(blocked.advancedBackDue()).toBe(false);+ local.getItem.mockImplementation((key: string) => values.get(key) ?? null);+ });+});diff --git a/src/lib/new-look.ts b/src/lib/new-look.tsindex c272339025..1118d3df45 100644--- a/src/lib/new-look.ts+++ b/src/lib/new-look.ts@@ -18,8 +18,11 @@ export const NEW_LOOK_KEY = "omb-new-look";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;+/** "due" once a browser that was on Advanced is put back on it, until the word that Advanced is back is closed ("seen"). */+export const ADVANCED_BACK_KEY = "omb-advanced-back";++/** Where this page cannot write its storage, its memory stands in, so a notice still closes for the session. */+const seenHere = new Set<string>();const listeners = new Set<() => void>();function storage(): Storage | undefined {@@ -35,8 +38,12 @@ export function settleInterfaceMode(): void {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");+ // Switched back: the mode this browser had before its key was retired, and once, word that Advanced is back.+ if (store && look && store.getItem(ADVANCED_MODE_KEY) == null) {+ const advanced = look === "due" || look === "seen";+ if (advanced && store.getItem(ADVANCED_BACK_KEY) == null) store.setItem(ADVANCED_BACK_KEY, "due");+ setAdvancedMode(advanced);+ }settleAdvancedModeDefault();return;}@@ -52,26 +59,31 @@ export function settleInterfaceMode(): void {}}-export function newLookDue(): boolean {- if (seenHere) return false;+function due(key: string): boolean {+ if (seenHere.has(key)) return false;try {- return storage()?.getItem(NEW_LOOK_KEY) === "due";+ return storage()?.getItem(key) === "due";} catch {return false;}}-export function markNewLookSeen(): void {+function markSeen(key: string): void {try {- storage()?.setItem(NEW_LOOK_KEY, "seen");+ storage()?.setItem(key, "seen");} catch {- seenHere = true;+ seenHere.add(key);}for (const listener of listeners) listener();}+export const newLookDue = (): boolean => due(NEW_LOOK_KEY);+export const markNewLookSeen = (): void => markSeen(NEW_LOOK_KEY);+export const advancedBackDue = (): boolean => due(ADVANCED_BACK_KEY);+export const markAdvancedBackSeen = (): void => markSeen(ADVANCED_BACK_KEY);+function onStorage(event: StorageEvent) {- if (event.key !== NEW_LOOK_KEY && event.key !== null) return;+ if (event.key !== NEW_LOOK_KEY && event.key !== ADVANCED_BACK_KEY && event.key !== null) return;for (const listener of listeners) listener();}@@ -88,3 +100,7 @@ function subscribe(listener: () => void): () => void {export function useNewLookDue(): boolean {return useSyncExternalStore(subscribe, newLookDue, () => false);}++export function useAdvancedBackDue(): boolean {+ return useSyncExternalStore(subscribe, advancedBackDue, () => false);+}diff --git a/src/lib/simple-only.ts b/src/lib/simple-only.tsindex 5e4c6ed5b4..fe96f30bbf 100644--- a/src/lib/simple-only.ts+++ b/src/lib/simple-only.ts@@ -1,2 +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;+/** Simple is the only mode. false keeps the Advanced mode switch, and each browser the mode it had. */+export const SIMPLE_ONLY: boolean = false;diff --git a/src/lib/skins.default.test.ts b/src/lib/skins.default.test.tsindex bba3c2bd66..800003dacc 100644--- a/src/lib/skins.default.test.ts+++ b/src/lib/skins.default.test.ts@@ -71,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: false, stored: "midnight" });+ expect(await boot()).toEqual({ skin: "midnight", advanced: true, 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.jsonindex 738a03e7be..00ec653f4d 100644--- a/src/locales/de.json+++ b/src/locales/de.json@@ -742,6 +742,8 @@"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.",+ "advancedBack.title": "Der erweiterte Modus ist zurück",+ "advancedBack.body": "Dieses Gerät ist wieder im erweiterten Modus. Du kannst ihn jederzeit unter Einstellungen → Allgemein ausschalten.","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.jsonindex cc56755085..79b825b46a 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -1888,6 +1888,8 @@"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.",+ "advancedBack.title": "Advanced mode is back",+ "advancedBack.body": "This device is on Advanced mode again. Turn it off any time in Settings → General.","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.jsonindex b3d8e7377e..e3b32b243f 100644--- a/src/locales/es.json+++ b/src/locales/es.json@@ -1402,6 +1402,8 @@"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.",+ "advancedBack.title": "El modo avanzado ha vuelto",+ "advancedBack.body": "Este dispositivo vuelve a estar en modo avanzado. Puedes desactivarlo cuando quieras en Ajustes → General.","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.jsonindex e270d7f794..3daf168ba4 100644--- a/src/locales/fr.json+++ b/src/locales/fr.json@@ -606,6 +606,8 @@"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.",+ "advancedBack.title": "Le mode avancé est de retour",+ "advancedBack.body": "Cet appareil est de nouveau en mode avancé. Vous pouvez le désactiver à tout moment dans Paramètres → Général.","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.jsonindex 8859b386db..eba66a51f6 100644--- a/src/locales/hi.json+++ b/src/locales/hi.json@@ -606,6 +606,8 @@"settings.analytics.aria": "उपयोग विश्लेषण भेजें","newLook.title": "{app} अब और सरल दिखता है","newLook.body": "आपकी ज़रूरत की हर चीज़ अब भी यहीं है; कम इस्तेमाल होने वाली सेटिंग्स सेटिंग्स → और सेटिंग्स में हैं।",+ "advancedBack.title": "एडवांस्ड मोड वापस आ गया है",+ "advancedBack.body": "यह डिवाइस फिर से एडवांस्ड मोड में है। इसे कभी भी सेटिंग्स → सामान्य में बंद करें।","settings.updates.startingDownload": "डाउनलोड शुरू हो रहा है…","settings.updates.preparing": "डाउनलोड पूरा। macOS अपडेट तैयार कर रहा है।","settings.updates.readyInstall": "{app} {version} तैयार है — टर्मिनल में इंस्टॉल करें",diff --git a/src/locales/it.json b/src/locales/it.jsonindex bf106b6819..e64451c3aa 100644--- a/src/locales/it.json+++ b/src/locales/it.json@@ -1538,6 +1538,8 @@"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.",+ "advancedBack.title": "La modalità avanzata è tornata",+ "advancedBack.body": "Questo dispositivo è di nuovo in modalità avanzata. Puoi disattivarla quando vuoi in Impostazioni → Generale.","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.jsonindex 263692e662..f67dac559f 100644--- a/src/locales/ja.json+++ b/src/locales/ja.json@@ -1735,6 +1735,8 @@"simpleModePrompt.where": "「設定 → 一般」でいつでも切り替えられます。","newLook.title": "{app} の見た目がシンプルになりました","newLook.body": "必要な機能はすべてそのままです。あまり使わない設定は「設定 → その他の設定」にあります。",+ "advancedBack.title": "詳細モードが戻りました",+ "advancedBack.body": "このデバイスは再び詳細モードになりました。「設定 → 一般」でいつでもオフにできます。","settings.openAtLogin.title": "ログイン時に開く","settings.openAtLogin.subtitle": "このコンピューターにサインインしたときに {app} を開きます。自分で開かなくても、ボットとルーティンがすぐ使える状態になります。","settings.openAtLogin.failed": "変更できませんでした。もう一度試すか、システム設定の「ログイン項目」を確認してください。",diff --git a/src/locales/ko.json b/src/locales/ko.jsonindex 34dd9a742b..f0bd77e53f 100644--- a/src/locales/ko.json+++ b/src/locales/ko.json@@ -1649,6 +1649,8 @@"simpleModePrompt.where": "설정 → 일반에서 언제든 바꿀 수 있어요.","newLook.title": "{app} 화면이 더 단순해졌어요","newLook.body": "필요한 기능은 모두 그대로예요. 자주 쓰지 않는 설정은 설정 → 기타 설정에 있어요.",+ "advancedBack.title": "고급 모드가 돌아왔어요",+ "advancedBack.body": "이 기기는 다시 고급 모드예요. 설정 → 일반에서 언제든 끌 수 있어요.","settings.openAtLogin.title": "로그인할 때 열기","settings.openAtLogin.subtitle": "이 컴퓨터에 로그인하면 {app}을 열어요. 직접 열지 않아도 봇과 루틴이 준비돼요.","settings.openAtLogin.failed": "변경하지 못했어요. 다시 시도하거나 시스템 설정의 로그인 항목을 확인하세요.",diff --git a/src/locales/pl.json b/src/locales/pl.jsonindex 0d4ff18a9e..7be79de531 100644--- a/src/locales/pl.json+++ b/src/locales/pl.json@@ -1563,6 +1563,8 @@"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ń.",+ "advancedBack.title": "Tryb zaawansowany wrócił",+ "advancedBack.body": "To urządzenie znów działa w trybie zaawansowanym. Możesz go wyłączyć w dowolnej chwili w Ustawienia → Ogólne.","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.jsonindex e81cfe5a03..1cd2cf8b8b 100644--- a/src/locales/pt-br.json+++ b/src/locales/pt-br.json@@ -1765,6 +1765,8 @@"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.",+ "advancedBack.title": "O modo avançado voltou",+ "advancedBack.body": "Este dispositivo voltou ao modo avançado. Desative quando quiser em Configurações → Geral.","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.jsonindex 13503c0da0..4cfb43b499 100644--- a/src/locales/ru.json+++ b/src/locales/ru.json@@ -1569,6 +1569,8 @@"updatesConsent.failed": "Не удалось сохранить. Попробуйте ещё раз.","newLook.title": "{app} теперь выглядит проще","newLook.body": "Всё нужное по-прежнему здесь; редко используемые настройки находятся в разделе Настройки → Другие настройки.",+ "advancedBack.title": "Расширенный режим вернулся",+ "advancedBack.body": "На этом устройстве снова включён расширенный режим. Выключить его можно в любой момент в разделе Настройки → Общие.","settings.updatesConsent.title": "Обновления продукта по электронной почте","settings.updatesConsent.subtitle": "Новые возможности и советы примерно два раза в месяц. Вы можете отписаться в любой момент.","settings.updatesConsent.to": "Отправляется на {email}.",diff --git a/src/locales/tr.json b/src/locales/tr.jsonindex a8687b836c..d4f521a9b3 100644--- a/src/locales/tr.json+++ b/src/locales/tr.json@@ -1106,6 +1106,8 @@"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.",+ "advancedBack.title": "Gelişmiş mod geri döndü",+ "advancedBack.body": "Bu cihaz yeniden gelişmiş modda. İstediğiniz zaman Ayarlar → Genel bölümünden kapatabilirsiniz.","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.jsonindex 4e7924c44c..4c0292bd0b 100644--- a/src/locales/uk.json+++ b/src/locales/uk.json@@ -704,6 +704,8 @@"settings.analytics.aria": "Надсилати аналітику використання","newLook.title": "{app} тепер виглядає простіше","newLook.body": "Усе потрібне досі тут; рідше використовувані налаштування — у розділі Налаштування → Інші налаштування.",+ "advancedBack.title": "Розширений режим повернувся",+ "advancedBack.body": "На цьому пристрої знову ввімкнено розширений режим. Вимкнути його можна будь-коли в розділі Налаштування → Загальні.","settings.updates.startingDownload": "Починаємо завантаження…","settings.updates.preparing": "Завантаження завершено. macOS готує оновлення.","settings.updates.readyInstall": "{app} {version} готова — встановіть у терміналі",diff --git a/src/locales/vi.json b/src/locales/vi.jsonindex 536ecb0a19..db2c54ee38 100644--- a/src/locales/vi.json+++ b/src/locales/vi.json@@ -1106,6 +1106,8 @@"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.",+ "advancedBack.title": "Chế độ nâng cao đã trở lại",+ "advancedBack.body": "Thiết bị này lại đang ở chế độ nâng cao. Bạn có thể tắt bất cứ lúc nào trong Cài đặt → Chung.","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.jsonindex 33c2050b8e..9c8d7de015 100644--- a/src/locales/zh-tw.json+++ b/src/locales/zh-tw.json@@ -1863,6 +1863,8 @@"simpleModePrompt.where": "隨時可在「設定 → 一般」中切換。","newLook.title": "{app} 的外觀變得更簡潔了","newLook.body": "你需要的功能都還在;較少用到的設定位於「設定 → 更多設定」。",+ "advancedBack.title": "進階模式回來了",+ "advancedBack.body": "這部裝置已重新使用進階模式。隨時可在「設定 → 一般」中關閉。","settings.openAtLogin.title": "登入時開啟","settings.openAtLogin.subtitle": "登入這台電腦時開啟 {app},讓你的機器人和例行工作不必手動開啟就能準備就緒。","settings.openAtLogin.failed": "無法變更。請再試一次,或檢查系統設定中的登入項目。",diff --git a/src/locales/zh.json b/src/locales/zh.jsonindex a7e5987610..3920c58db1 100644--- a/src/locales/zh.json+++ b/src/locales/zh.json@@ -1770,6 +1770,8 @@"simpleModePrompt.where": "随时可以在「设置 → 通用」中切换。","newLook.title": "{app} 的界面变得更简洁了","newLook.body": "你需要的功能都还在;不常用的设置在「设置 → 更多设置」中。",+ "advancedBack.title": "高级模式回来了",+ "advancedBack.body": "此设备已重新使用高级模式。随时可以在「设置 → 通用」中关闭。","settings.openAtLogin.title": "登录时打开","settings.openAtLogin.subtitle": "你登录这台电脑时自动打开 {app},让你的机器人和例行任务随时就绪,无需手动打开。","settings.openAtLogin.failed": "无法更改此项。请重试,或检查系统设置中的「登录项」。",diff --git a/src/state/notification-open.test.ts b/src/state/notification-open.test.tsindex aede3db75e..8680c7b158 100644--- a/src/state/notification-open.test.ts+++ b/src/state/notification-open.test.ts@@ -8,9 +8,6 @@ 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;