Chrome cleanup: menu dedup, implicit cloud label, Context optimization section

Account menu drops Automations (sidebar nav has it) and the OpenWorker Cloud suffix.
Token savings + compaction move from Models to a new Settings - Context optimization tab.
Coworkers page loses its duplicate intro line.
This commit is contained in:
Rohit C Prasad
2026-08-20 16:33:36 -07:00
parent 01d6ec6514
commit ff78ea9f35
9 changed files with 29 additions and 28 deletions
+1 -2
View File
@@ -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();
}
@@ -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();
}
+1 -2
View File
@@ -7,8 +7,7 @@ test("scheduled run session shows the run banner; Back returns to the task detai
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();
// Task list → detail (runs list).
await page.getByText("Daily AI News").first().click();
+1 -1
View File
@@ -10,7 +10,7 @@ test("Settings: Context compaction card edits threshold, cap, and summarizer mod
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("compaction-card");
await expect(card).toBeVisible();
+4 -3
View File
@@ -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();
+2 -1
View File
@@ -33,7 +33,8 @@ test("the account menu: Inbox + Connectors always listed; Settings carries the s
await 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();
});
+2 -5
View File
@@ -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">
+13 -9
View File
@@ -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>
<PanelHead
title="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} />
<button
+4 -3
View File
@@ -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. */
<div
className="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 && (
<>