Python
Chrome cleanup: menu dedup, implicit cloud label, Context optimization section
Rohit C Prasadff78ea9f358c
diff --git a/surfaces/gui/e2e/automations-manage.spec.ts b/surfaces/gui/e2e/automations-manage.spec.tsindex 9604399d..2c91d087 100644--- a/surfaces/gui/e2e/automations-manage.spec.ts+++ b/surfaces/gui/e2e/automations-manage.spec.ts@@ -6,8 +6,7 @@ import { test } from "./fixtures";async function openAutomations(page) {await page.goto("/");- await page.getByTestId("account-row").click();- await page.getByTestId("account-menu").getByRole("button", { name: "Automations", exact: true }).click();+ await page.getByTestId("nav-automations").click();await expect(page.getByText("Recurring tasks OpenWorker runs on a schedule.")).toBeVisible();}diff --git a/surfaces/gui/e2e/automations-quickstart.spec.ts b/surfaces/gui/e2e/automations-quickstart.spec.tsindex 24a9b79d..e38662b2 100644--- a/surfaces/gui/e2e/automations-quickstart.spec.ts+++ b/surfaces/gui/e2e/automations-quickstart.spec.ts@@ -7,8 +7,7 @@ import { test } from "./fixtures";async function openAutomations(page) {await page.goto("/");- await page.getByTestId("account-row").click();- await page.getByTestId("account-menu").getByRole("button", { name: "Automations", exact: true }).click();+ await page.getByTestId("nav-automations").click();await expect(page.getByText("Recurring tasks OpenWorker runs on a schedule.")).toBeVisible();}diff --git a/surfaces/gui/e2e/automations.spec.ts b/surfaces/gui/e2e/automations.spec.tsindex 146b1c40..1c7074da 100644--- a/surfaces/gui/e2e/automations.spec.ts+++ b/surfaces/gui/e2e/automations.spec.ts@@ -7,8 +7,7 @@ test("scheduled run session shows the run banner; Back returns to the task detaipage,}) => {await page.goto("/");- await page.getByTestId("account-row").click();- await page.getByTestId("account-menu").getByRole("button", { name: "Automations", exact: true }).click();+ await page.getByTestId("nav-automations").click();// Task list → detail (runs list).await page.getByText("Daily AI News").first().click();diff --git a/surfaces/gui/e2e/compaction.spec.ts b/surfaces/gui/e2e/compaction.spec.tsindex c5fa0b61..af905815 100644--- a/surfaces/gui/e2e/compaction.spec.ts+++ b/surfaces/gui/e2e/compaction.spec.ts@@ -10,7 +10,7 @@ test("Settings: Context compaction card edits threshold, cap, and summarizer modawait page.goto("/");await page.getByTestId("account-row").click();await page.getByRole("button", { name: "Settings", exact: true }).click();- await page.getByRole("button", { name: "Models", exact: true }).click();+ await page.getByRole("button", { name: "Context optimization", exact: true }).click();const card = page.getByTestId("compaction-card");await expect(card).toBeVisible();diff --git a/surfaces/gui/e2e/settings.spec.ts b/surfaces/gui/e2e/settings.spec.tsindex 82f791be..3acbf3fa 100644--- a/surfaces/gui/e2e/settings.spec.ts+++ b/surfaces/gui/e2e/settings.spec.ts@@ -96,13 +96,14 @@ test("Models: Remove key reverts a configured provider", async ({ page }) => {await expect(page.getByTestId("set-provider-anthropic")).toContainText("Not set up");});-// Token savings (owner ask 2026-07-17; moved under Models by UX-021): the card renders with-// the PDF fallback segmented control + attach thresholds, and edits POST through.+// Token savings (owner ask 2026-07-17; now under Settings ▸ Context optimization,+// owner 2026-08-21): the card renders with the PDF fallback segmented control ++// attach thresholds, and edits POST through.test("Settings: Token savings card edits PDF fallback and thresholds", async ({ page }) => {await page.goto("/");await page.getByTestId("account-row").click();await page.getByRole("button", { name: "Settings", exact: true }).click();- await page.getByRole("button", { name: "Models", exact: true }).click();+ await page.getByRole("button", { name: "Context optimization", exact: true }).click();const card = page.getByTestId("token-savings-card");await expect(card).toBeVisible();diff --git a/surfaces/gui/e2e/sidebar-account.spec.ts b/surfaces/gui/e2e/sidebar-account.spec.tsindex eefc996d..1a2a8246 100644--- a/surfaces/gui/e2e/sidebar-account.spec.ts+++ b/surfaces/gui/e2e/sidebar-account.spec.ts@@ -33,7 +33,8 @@ test("the account menu: Inbox + Connectors always listed; Settings carries the sawait expect(menu.getByRole("button", { name: "Inbox" })).toBeVisible();await expect(menu.getByRole("button", { name: "Connectors", exact: true })).toBeVisible();await expect(menu.getByRole("button", { name: /Settings/ })).toContainText("⌘");- await expect(menu.getByRole("button", { name: "Automations", exact: true })).toBeVisible();+ // Automations left the menu (owner 2026-08-21) — the sidebar nav row carries it.+ await expect(menu.getByRole("button", { name: "Automations", exact: true })).toHaveCount(0);await expect(menu.getByRole("button", { name: "Activity", exact: true })).toBeVisible();});diff --git a/surfaces/gui/src/components/PersonasTab.tsx b/surfaces/gui/src/components/PersonasTab.tsxindex ff0b285b..5ae29d8b 100644--- a/surfaces/gui/src/components/PersonasTab.tsx+++ b/surfaces/gui/src/components/PersonasTab.tsx@@ -136,11 +136,8 @@ export function PersonasTab({ onOpenPersona }: { onOpenPersona?: (id: string) =>return (<div>- <p className="text-[12.5px] text-muted mb-3 leading-relaxed">- Enable a coworker, then choose whether it appears in the coworker picker. The starred coworker- is the default for new sessions.- </p>-+ {/* No intro line here — the PanelHead above already explains the page+ (the two stacked one-liners read as duplicates, owner 2026-08-21). */}<div className={CARD + " divide-y divide-line mb-6"}>{personas.map((p) => (<div key={p.id} className="px-4 py-3">diff --git a/surfaces/gui/src/components/SettingsView.tsx b/surfaces/gui/src/components/SettingsView.tsxindex d294e73c..ea1b1c56 100644--- a/surfaces/gui/src/components/SettingsView.tsx+++ b/surfaces/gui/src/components/SettingsView.tsx@@ -52,7 +52,7 @@ import { showPersonas } from "../flags";// Models + Personas host the existing tab components inside the page shell (field re-skin to follow).// "appearance" is the General tab's stable key — callers deep-link with it, so the// rename (UX-021) changed only the label. "files" folded into General as a card.-type SetTab = "appearance" | "models" | "skills" | "voice" | "memory" | "personas";+type SetTab = "appearance" | "models" | "context" | "skills" | "voice" | "memory" | "personas";const CARD = "rounded-xl2 border border-line bg-panel";const FIELD_LABEL = "text-[12.5px] font-medium text-ink";@@ -66,10 +66,11 @@ const BTN_BORDERED =const SET_TABS: {key: SetTab;label: string;- icon: "sliders" | "code" | "mic" | "archive" | "sparkle" | "book";+ icon: "sliders" | "code" | "mic" | "archive" | "sparkle" | "book" | "refresh";}[] = [{ key: "appearance", label: "General", icon: "sliders" },{ key: "models", label: "Models", icon: "code" },+ { key: "context", label: "Context optimization", icon: "refresh" },{ key: "skills", label: "Skills", icon: "book" },{ key: "voice", label: "Voice input", icon: "mic" },{ key: "memory", label: "Memory", icon: "archive" },@@ -129,12 +130,15 @@ export function SettingsView({sub="Providers and the models offered in the composer's picker. Keys are stored only on this computer."/><ModelsTab />- {/* Token savings is model-spend behavior, so it lives here (UX-021),- not under General. */}- <div className="mt-6">- <TokenSavingsCard />- <CompactionCard />- </div>+ </section>+ ) : tab === "context" ? (+ <section>+ <PanelHead+ title="Context optimization"+ sub="How sessions spend tokens — attachment handling and long-history compaction."+ />+ <TokenSavingsCard />+ <CompactionCard /></section>) : tab === "skills" ? (<SkillsTab onCreateSkill={onCreateSkill} />@@ -379,7 +383,7 @@ function PersonasSection({ onOpenPersona }: { onOpenPersona?: (id: string) => vo<section><PanelHeadtitle="Coworkers"- sub="Which coworkers are enabled and shown in the picker, plus installing new coworker bundles."+ sub="Which coworkers are enabled and shown in the picker — the starred one is the default for new sessions."/><PersonasTab key={galleryBump} onOpenPersona={onOpenPersona} /><buttondiff --git a/surfaces/gui/src/components/Sidebar.tsx b/surfaces/gui/src/components/Sidebar.tsxindex 4ff389f3..b3aaa381 100644--- a/surfaces/gui/src/components/Sidebar.tsx+++ b/surfaces/gui/src/components/Sidebar.tsx@@ -1152,11 +1152,12 @@ export function Sidebar(props: Props) {role="menu">{cloud?.signed_in ? (+ /* Just the email — being signed in to OpenWorker Cloud is implicit. */<divclassName="px-3 py-1.5 mb-1 text-[11px] text-faint truncate border-b border-line"- title={`${accountEmail} · OpenWorker Cloud`}+ title={accountEmail}>- {accountEmail} · OpenWorker Cloud+ {accountEmail}</div>) : (<>@@ -1200,7 +1201,7 @@ export function Sidebar(props: Props) {false,<span className="text-[11px] text-faint">⌘ ,</span>,)}- {appMenuItem("clock", "Automations", props.onOpenScheduled, props.scheduledActive)}+ {/* No Automations here — the sidebar's top nav already carries it. */}{appMenuItem("audit", "Activity", props.onOpenAudit, props.auditActive)}{cloud?.signed_in && (<>