Skip to content

Commit 1b1a41d

Browse files
authored
refactor(ui): sidebar IA cleanup: Activity to Settings, Dreams into Agents Memory tab, single MCP mutation owner (#104604)
* refactor(ui): move dreams page modules to agents/memory (verbatim) * refactor(ui): sidebar IA cleanup: Activity to Settings, Dreams into Agents Memory tab, single MCP mutation owner, Usage icon Folds the per-agent Dreams page into the Agents page as a Memory panel and deletes the dreams route; moves the session-scoped Activity page out of the sidebar into Settings > System next to Logs; removes the MCP enable/disable toggle from Settings > MCP so the Plugins page is the single mutation surface for config.mcp.servers; gives Usage a coins icon so it no longer collides with Overview. Closes #104590 * docs: update Control UI docs for Activity/Memory/MCP sidebar changes * fix(scripts): fail control-ui i18n sync closed on new untranslated keys without provider auth An unauthenticated ui:i18n:sync silently recorded English fallbacks, which the shipped-fallback CI gate then rejects; post-merge translation is owned by the control-ui-locale-refresh workflow. Sync now errors on new untranslated keys without a provider (OPENCLAW_CONTROL_UI_I18N_AUTH_OPTIONAL=1 opts back in), and the ui AGENTS guide documents the commit-en.ts-only contributor flow. * chore(ui): translate new sidebar keys, refresh i18n baseline, localize Memory tab expectation
1 parent fc0fd1b commit 1b1a41d

94 files changed

Lines changed: 745 additions & 1051 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/concepts/dreaming.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ There is also a grounded historical backfill lane for review and recovery work:
8080
</Accordion>
8181
</AccordionGroup>
8282

83-
The Control UI exposes the same diary backfill/reset flow so you can inspect results in the Dreams scene before deciding whether grounded candidates deserve promotion. A distinct grounded Scene lane shows which staged short-term entries came from historical replay, which promoted items were grounded-led, and lets you clear only grounded-only staged entries without touching live short-term state.
83+
The Control UI exposes the same diary backfill/reset flow on the agent's Memory tab (Agents page) so you can inspect results in the dream scene before deciding whether grounded candidates deserve promotion. A distinct grounded Scene lane shows which staged short-term entries came from historical replay, which promoted items were grounded-led, and lets you clear only grounded-only staged entries without touching live short-term state.
8484

8585
## Deep ranking signals
8686

‎docs/web/control-ui.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,12 @@ A **Search** field at the top of the sidebar opens the command palette (⌘K). T
180180
- Activity tab with browser-local, redaction-first summaries of live tool activity from existing `session.tool` / tool event delivery.
181181

182182
</Accordion>
183-
<Accordion title="Channels, sessions, dreams">
183+
<Accordion title="Channels, sessions, memory">
184184
- Channels: built-in plus bundled/external plugin channels status, QR login, and per-channel config (`channels.status`, `web.login.*`, `config.patch`).
185185
- Channel probe refreshes keep the previous snapshot visible while slow provider checks finish, and label partial snapshots when a probe or audit exceeds its UI budget.
186186
- Sessions: list configured-agent sessions by default, pin frequent sessions, rename them, archive or restore inactive sessions, fall back from stale unconfigured agent session keys, and apply per-session model/thinking/fast/verbose/trace/reasoning overrides (`sessions.list`, `sessions.patch`). Pinned sessions sort above recent unpinned sessions; archived sessions live in the Sessions page's archived view and keep their transcripts. Rows show an unread dot for sessions with activity since their last read, with mark-unread/mark-read actions (`sessions.patch { unread }`), and a Fork action that branches the transcript into a new session (`sessions.create { parentSessionKey, fork: true }`). Overview tiles above the table summarize the loaded roster (session count, live runs, unread sessions, total tokens), each row carries a kind glyph with a live-run dot, status renders as a plain dot plus label, and the Tokens column shows a context-window usage meter when the session reports token and context sizes. Row management actions live in a per-row menu (kebab button or right-click) mirroring the sidebar's session menu, and the row drawer carries the agent runtime and run duration alongside the other session details.
187187
- Session grouping: a Group by control organizes the sessions table into sections by custom groups, channel, kind, agent, or date. Custom groups persist per session via `sessions.patch` (`category`), so sessions started from message channels (Discord, Telegram, WhatsApp, ...) can be categorized too; assign groups by dragging rows onto a section, or with the per-row group selector, and create groups with the New group action.
188-
- Dreams: dreaming status, enable/disable toggle, and Dream Diary reader (`doctor.memory.status`, `doctor.memory.dreamDiary`, `config.patch`).
188+
- Memory (a tab on the Agents page, scoped to the selected agent): dreaming status, enable/disable toggle, and Dream Diary reader (`doctor.memory.status`, `doctor.memory.dreamDiary`, `config.patch`).
189189

190190
</Accordion>
191191
<Accordion title="Cron, tasks, plugins, skills, devices, exec approvals">
@@ -200,7 +200,7 @@ A **Search** field at the top of the sidebar opens the command palette (⌘K). T
200200
<Accordion title="Config">
201201
- View/edit `~/.openclaw/openclaw.json` (`config.get`, `config.set`).
202202
- Profile: a settings page showing the default agent's identity with all-time usage stats — lifetime tokens, peak day, longest session, activity streaks, a year-long token heatmap, top tools, and channel highlights (`usage.cost`, `sessions.usage`).
203-
- MCP has a dedicated settings page for configured servers, enablement, OAuth/filter/parallel summaries, common operator commands, and the scoped `mcp` config editor.
203+
- MCP has a dedicated settings page with read-only server rows (transport, enablement, OAuth/filter/parallel summaries), common operator commands, and the scoped `mcp` config editor; adding, enabling/disabling, and removing servers happens on the Plugins page.
204204
- Model Providers: a settings page listing every configured model provider with its brand icon, auth state (`models.authStatus`), model availability (`models.list`), live plan/quota/billing data where the provider reports it (`usage.status`), and local session spend for the last 30 days (`sessions.usage`). A Refresh action re-reads credential state and provider usage.
205205
- Apply and restart with validation (`config.apply`), then wake the last active session.
206206
- Writes include a base-hash guard to prevent clobbering concurrent edits.
@@ -246,7 +246,7 @@ Typical workflow:
246246
1. Open **MCP** from the sidebar.
247247
2. Check the summary cards for total, enabled, OAuth, and filtered server counts.
248248
3. Review each server row for transport, enablement, auth, filters, timeouts, and command hints.
249-
4. Toggle enablement when a server should remain configured but stay out of runtime discovery.
249+
4. Manage servers (add, enable/disable, remove) on the **Plugins** page, which is the single interactive writer of `mcp.servers`; the row list here links to it.
250250
5. Edit the scoped `mcp` config section for server definitions, headers, TLS/mTLS paths, OAuth metadata, tool filters, and Codex projection metadata.
251251
6. Use **Save** for a config write, or **Save & Publish** when the running Gateway should apply the changed config.
252252
7. Run `openclaw mcp status --verbose`, `openclaw mcp doctor --probe`, or `openclaw mcp reload` from a terminal for static diagnostics, live proof, or cached-runtime disposal.
@@ -255,7 +255,7 @@ The page redacts credential-bearing URL-like values before rendering and quotes
255255

256256
## Activity tab
257257

258-
The Activity tab is an ephemeral browser-local observer for live tool activity, derived from the same Gateway `session.tool` / tool event stream that powers Chat tool cards. It does not add another Gateway event family, endpoint, durable activity store, metrics feed, or external observer stream.
258+
The Activity tab lives in **Settings › System**, next to Logs and Debug. It is an ephemeral browser-local observer for live tool activity, derived from the same Gateway `session.tool` / tool event stream that powers Chat tool cards. It does not add another Gateway event family, endpoint, durable activity store, metrics feed, or external observer stream.
259259

260260
Activity entries keep only sanitized summaries and redacted, truncated output previews. Tool argument values are not stored in Activity state; the UI shows that arguments are hidden and records only the argument field count. The in-memory list follows the current browser tab, survives navigation within the Control UI, and resets on page reload, session switch, or **Clear**.
261261

‎docs/web/lobster.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Hover a filled slot and it will tell you who visited first, and when. The Lobste
5656

5757
Collected observations from people who spend too much time watching their sidebar:
5858

59-
- Lobsters visit the [Dreams page](/concepts/memory) too, where they are asleep. Observers report the sleeping lobster looks suspiciously familiar.
59+
- Lobsters visit the [dream scene](/concepts/memory) too — the Memory tab on the Agents page — where they are asleep. Observers report the sleeping lobster looks suspiciously familiar.
6060
- Night-shift users report their visitors yawn a lot after 10pm.
6161
- Lobsters have been seen shedding. Witnesses describe the experience as "a lot" and the lobster afterwards as "noticeably bigger."
6262
- Some visitors do not come alone.
@@ -73,7 +73,7 @@ Collected observations from people who spend too much time watching their sideba
7373
- After bad news, some lobsters tidy the ledge. It seems to help them.
7474
- Lobsters remember anniversaries even when you do not. If yours shows up in a party hat on an unremarkable day, check the Lobsterdex for the date you met.
7575
- Devoted hosts report their lobsters acquiring titles over the years. There is no known ceremony.
76-
- The Dreams-page sleeper is not entirely asleep. Press gently and see.
76+
- The dream-scene sleeper is not entirely asleep. Press gently and see.
7777

7878
## Privacy
7979

‎scripts/control-ui-i18n.ts‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1643,6 +1643,23 @@ async function syncLocale(
16431643
});
16441644
}
16451645

1646+
// Writing NEW English fallbacks trips the shipped-fallback CI gate
1647+
// (test/scripts/control-ui-i18n.test.ts), and post-merge translation is owned
1648+
// by the control-ui-locale-refresh workflow. An unauthenticated local sync
1649+
// must fail here instead of silently recording fallback bundles; refreshing
1650+
// already-recorded fallback copy (force mode) stays allowed.
1651+
if (!allowTranslate && options.write && !options.checkOnly && !isProviderAuthOptional()) {
1652+
const newFallbackKeys = pending.filter((item) => !previousFallbackKeys.has(item.key));
1653+
if (newFallbackKeys.length > 0) {
1654+
throw new Error(
1655+
`${localeLabel}: ${newFallbackKeys.length} new key(s) need translation but no provider is configured. ` +
1656+
`Commit only locales/en.ts and let the control-ui-locale-refresh workflow translate after merge, ` +
1657+
`or export ANTHROPIC_API_KEY/OPENAI_API_KEY and rerun. ` +
1658+
`Set ${ENV_AUTH_OPTIONAL}=1 to record English fallbacks anyway.`,
1659+
);
1660+
}
1661+
}
1662+
16461663
if (allowTranslate && pending.length > 0) {
16471664
const batches = buildTranslationBatches(pending);
16481665
const batchCount = batches.length;

‎ui/AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This directory owns Control UI-specific guidance that should not live in the rep
1010
- `scripts/control-ui-i18n.ts`
1111
- `ui/src/i18n/lib/types.ts`
1212
- `ui/src/i18n/lib/registry.ts`
13-
- Pipeline: update English strings and locale wiring here, then run `pnpm ui:i18n:sync` and commit the regenerated locale bundles plus `.i18n` metadata.
13+
- Pipeline: update English strings and locale wiring here and commit `en.ts` only; the `control-ui-locale-refresh` workflow translates and opens a generated PR after merge. Do not run `pnpm ui:i18n:sync` without provider auth (`ANTHROPIC_API_KEY`/`OPENAI_API_KEY`): CI rejects recorded English fallbacks, and sync fails closed on new untranslated keys. Run authenticated sync (and commit bundles plus `.i18n` metadata) only when the change needs it immediately, e.g. a raw-copy-baseline refresh after moving files with hardcoded strings.
1414
- Prioritization report: `pnpm ui:i18n:report [--surface <name>] [--locale <locale>] [--top <n>]` shows current hardcoded-copy focus areas and locale fallback metadata. It is not a drift gate; use `pnpm ui:i18n:check` for that.
1515
- If locale outputs drift, regenerate them. Do not manually translate or hand-maintain generated locale files by default.
1616

‎ui/src/app-navigation-groups.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ describe("sidebar pinned routes", () => {
2222
expect(SETTINGS_NAVIGATION_ROUTES).toContain("worktrees");
2323
});
2424

25+
it("moves activity into system settings and drops stale pinned entries", () => {
26+
expect(SIDEBAR_NAV_ROUTES).not.toContain("activity");
27+
expect(SETTINGS_NAVIGATION_ROUTES).toContain("activity");
28+
expect(normalizeSidebarPinnedRoutes(["activity", "overview"])).toEqual(["overview"]);
29+
});
30+
2531
it("keeps channel management and settings slices out of the customizable sidebar", () => {
2632
expect(SIDEBAR_NAV_ROUTES).not.toContain("channels");
2733
expect(SIDEBAR_NAV_ROUTES).not.toContain("config");

‎ui/src/app-navigation.test.ts‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,14 @@ describe("navigationIconForRoute", () => {
6767
worktrees: "folder",
6868
channels: "link",
6969
sessions: "fileText",
70-
usage: "barChart",
70+
usage: "coins",
7171
cron: "calendarClock",
7272
tasks: "listChecks",
7373
agents: "bot",
7474
skills: "zap",
7575
plugins: "puzzle",
7676
"skill-workshop": "wrench",
7777
nodes: "monitor",
78-
dreams: "moon",
7978
config: "settings",
8079
profile: "lobster",
8180
communications: "send",
@@ -118,7 +117,6 @@ describe("titleForRoute", () => {
118117
plugins: "Plugins",
119118
"skill-workshop": "Skill Workshop",
120119
nodes: "Devices",
121-
dreams: "Dreaming",
122120
config: "Settings",
123121
profile: "Profile",
124122
communications: "Communications",
@@ -155,7 +153,6 @@ describe("subtitleForRoute", () => {
155153
plugins: "Install and manage optional capabilities.",
156154
"skill-workshop": "Review, refine, and apply proposals before they become live skills.",
157155
nodes: "Paired devices, live connections, and commands.",
158-
dreams: "Memory dreaming, consolidation, and reflection.",
159156
config: "Edit openclaw.json.",
160157
profile: "Your agent's stats, streaks, and life in the reef.",
161158
communications: "Channels, messages, and audio settings.",
@@ -234,8 +231,8 @@ describe("routeIdFromPath", () => {
234231
expect(routeIdFromPath("/sessions")).toBe("sessions");
235232
expect(routeIdFromPath("/debug")).toBe("debug");
236233
expect(routeIdFromPath("/logs")).toBe("logs");
237-
expect(routeIdFromPath("/dreaming")).toBe("dreams");
238-
expect(routeIdFromPath("/dreams")).toBe("dreams");
234+
expect(routeIdFromPath("/dreaming")).toBeNull();
235+
expect(routeIdFromPath("/dreams")).toBeNull();
239236
expect(routeIdFromPath("/settings/plugins")).toBe("plugins");
240237
expect(routeIdFromPath("/plugins")).toBeNull();
241238
expect(routeIdFromPath("/settings/about")).toBe("about");
@@ -307,8 +304,6 @@ describe("inferBasePathFromPathname", () => {
307304
expect(inferBasePathFromPathname("/settings/general")).toBe("");
308305
expect(inferBasePathFromPathname("/settings/appearance")).toBe("");
309306
expect(inferBasePathFromPathname("/appearance")).toBe("");
310-
expect(inferBasePathFromPathname("/dreaming")).toBe("");
311-
expect(inferBasePathFromPathname("/dreams")).toBe("");
312307
expect(inferBasePathFromPathname("/settings/plugins")).toBe("");
313308
});
314309

@@ -389,6 +384,7 @@ describe("SIDEBAR_NAV_ROUTES", () => {
389384
"worktrees",
390385
"debug",
391386
"logs",
387+
"activity",
392388
"about",
393389
]);
394390
});

‎ui/src/app-navigation.ts‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ type NavigationItem = {
1414
// list and Settings/Docs live in the sidebar footer, so neither is listed here.
1515
export const SIDEBAR_NAV_ROUTES = [
1616
"overview",
17-
"activity",
1817
"workboard",
1918
"sessions",
2019
"usage",
@@ -25,7 +24,6 @@ export const SIDEBAR_NAV_ROUTES = [
2524
"plugins",
2625
"skill-workshop",
2726
"nodes",
28-
"dreams",
2927
] as const satisfies readonly NavigationRouteId[];
3028

3129
export type SidebarNavRoute = (typeof SIDEBAR_NAV_ROUTES)[number];
@@ -78,7 +76,7 @@ export const SETTINGS_NAVIGATION_GROUPS = [
7876
},
7977
{
8078
labelKey: "nav.settingsGroupSystem",
81-
routes: ["infrastructure", "worktrees", "debug", "logs", "about"],
79+
routes: ["infrastructure", "worktrees", "debug", "logs", "activity", "about"],
8280
},
8381
] as const satisfies readonly SettingsNavigationGroup[];
8482

@@ -93,7 +91,7 @@ const NAVIGATION_ICONS: NavigationItem = {
9391
worktrees: "folder",
9492
channels: "link",
9593
sessions: "fileText",
96-
usage: "barChart",
94+
usage: "coins",
9795
cron: "calendarClock",
9896
tasks: "listChecks",
9997
skills: "zap",
@@ -113,7 +111,6 @@ const NAVIGATION_ICONS: NavigationItem = {
113111
"model-providers": "plug",
114112
debug: "bug",
115113
logs: "scrollText",
116-
dreams: "moon",
117114
plugin: "puzzle",
118115
"new-session": "plus",
119116
};
@@ -211,7 +208,6 @@ const NAVIGATION_COPY: Record<NavigationRouteId, { titleKey: string; subtitleKey
211208
},
212209
debug: { titleKey: "tabs.debug", subtitleKey: "subtitles.debug" },
213210
logs: { titleKey: "tabs.logs", subtitleKey: "subtitles.logs" },
214-
dreams: { titleKey: "tabs.dreams", subtitleKey: "subtitles.dreams" },
215211
plugin: { titleKey: "tabs.plugin", subtitleKey: "subtitles.plugin" },
216212
"new-session": { titleKey: "newSession.title", subtitleKey: "newSession.hint" },
217213
};

‎ui/src/app-route-paths.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ const APP_ROUTE_DEFINITIONS = {
3131
tasks: { path: "/tasks" },
3232
nodes: { path: "/nodes" },
3333
plugin: { path: "/plugin" },
34-
dreams: { path: "/dreaming", aliases: ["/dreams"] },
3534
} as const;
3635

3736
export type RouteId = keyof typeof APP_ROUTE_DEFINITIONS;

‎ui/src/app-routes.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { page as chatPage } from "./pages/chat/route.ts";
1010
import { pages as configPages } from "./pages/config/route.ts";
1111
import { page as cronPage } from "./pages/cron/route.ts";
1212
import { page as debugPage } from "./pages/debug/route.ts";
13-
import { page as dreamsPage } from "./pages/dreams/route.ts";
1413
import { page as logsPage } from "./pages/logs/route.ts";
1514
import { page as modelProvidersPage } from "./pages/model-providers/route.ts";
1615
import { page as newSessionPage } from "./pages/new-session/route.ts";
@@ -62,7 +61,6 @@ const APP_ROUTE_TREE = [
6261
cronPage,
6362
tasksPage,
6463
nodesPage,
65-
dreamsPage,
6664
pluginPage,
6765
] as const;
6866

0 commit comments

Comments
 (0)