Skip to content

refactor(ui): sidebar IA cleanup: Activity to Settings, Dreams into Agents Memory tab, single MCP mutation owner - #104604

Merged
steipete merged 5 commits into
mainfrom
claude/sidebar-item-organization-c90f62
Jul 11, 2026
Merged

steipete merged 5 commits into
mainfrom
claude/sidebar-item-organization-c90f62

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Closes #104590

What Problem This Solves

The Control UI sidebar exposes 14 top-level routes, several of which are workflow stages or debug views of existing domain objects rather than destinations of their own:

  • Activity is a browser-local tool-event stream scoped to the current session key (it issues no RPCs) — a debug surface sitting in primary navigation.
  • Dreams is entirely per-agent (dream diary, wiki insights, consolidation controls); as a top-level sibling of Agents it splits the agent mental model.
  • MCP servers were mutable from two places with two different write flows: the Plugins page patches config.mcp.servers directly, while Settings › MCP toggled enablement through the config-editor save/publish flow.
  • Overview and Usage shared the same barChart icon, making the entries visually indistinguishable.

Why This Change Was Made

One concept, one owner: the Agents page owns per-agent surfaces (Dreams becomes its Memory tab; the standalone route is deleted with no compat redirect, per repo policy), Settings › System owns observability/debug surfaces (Activity joins Logs and Debug there), and the Plugins page becomes the single interactive mutation surface for config.mcp.servers (Settings › MCP keeps diagnostics, operator commands, read-only server rows, and the raw config editor, with a link to Plugins for management). Stale sidebar pins for moved routes drop automatically via normalizeSidebarPinnedRoutes. The now-orphaned setMcpServerEnabled/updateMcpServerEnabled config helpers and the dreams-only session-options.ts helper are deleted.

User Impact

The sidebar loses two low-signal entries and gains nothing to relearn: Activity lives in Settings › System next to Logs, and each agent's memory/dreaming controls live on the agent itself under a new Memory tab (full feature parity: enable/disable with restart confirmation, diary backfill/dedupe/reset, grounded short-term reset, artifact repair, memory-wiki palace when that plugin is enabled). MCP server enable/disable now happens in exactly one place. Usage gets a distinct coins icon.

Evidence

  • Remote pnpm check:changed on Blacksmith Testbox: exit 0 (lease tbx_01kx94brw9x0hc98x2xzcfdc2r, https://github.com/openclaw/openclaw/actions/runs/29162098458).
  • Structured Codex review (gpt-5.6-sol, xhigh) of the hand-written commit: clean, no accepted/actionable findings.
  • Focused suites green during development (nav/agents/config/memory: 189 tests). Full ui/src suite running on Testbox; result will be posted before merge.
  • Commit structure keeps review tractable: a verbatim rename-only move of the five dreams modules (0 insertions/deletions), the hand-written IA change, and regenerated locale bundles (pnpm ui:i18n:sync; new keys fall back to English until the translation pass, which is the pipeline's normal state).
  • New/updated tests: memory tab rendering scoped to the selected agent, activity-in-settings navigation + stale-pin dropping, settings-sidebar ordering (Activity after Logs), MCP page management link instead of toggle.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XL maintainer Maintainer-authored PR labels Jul 11, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be7b7b25a3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

configSaving: configState.configSaving,
configApplying: configState.configApplying,
connected: configState.connected,
pluginsHref: pathForRoute("plugins", this.context.basePath),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve disabled-only MCP override cleanup

When an existing config has a disabled-only MCP override such as mcp.servers.openclaw = { enabled: false }, this redirect makes Plugins the only enable/disable UI. The removed Settings helper used to delete that empty override when enabling, but the Plugins toggle only merge-patches enabled: null (ui/src/pages/plugins/plugins-page.ts:780-785), leaving {}; because configured servers with enabled !== false override bundled defaults (src/agents/bundle-mcp-config.ts:64-83), re-enabling a disabled bundled server can replace the real server definition with an enabled empty server instead of restoring it. Carry the empty-entry cleanup into the Plugins mutation before making it the sole owner.

Useful? React with 👍 / 👎.

@openclaw-barnacle openclaw-barnacle Bot added the docs Improvements or additions to documentation label Jul 11, 2026
@clawsweeper

clawsweeper Bot commented Jul 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 11, 2026, 5:22 PM ET / 21:22 UTC.

Summary
The PR moves Activity into Settings, embeds Dreams as an agent-scoped Memory tab, makes Plugins the sole interactive MCP-server mutation surface, assigns Usage a distinct icon, and updates related docs and i18n tooling.

Reproducibility: yes. at source level. A disabled-only bundled MCP override remains as an empty configured entry after re-enable, and the Memory controls are enabled while initial config loading is still pending.

Review metrics: 1 noteworthy metric.

  • MCP mutation ownership: 1 interactive path removed, 1 retained. The retained Plugins path becomes the sole writer and therefore must preserve every cleanup semantic of the removed Settings path.

Stored data model
Persistent data-model change detected: migration/backfill/repair: docs/concepts/dreaming.md, persistent cache schema: ui/src/i18n/.i18n/ar.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/de.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/es.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/fa.tm.jsonl, persistent cache schema: ui/src/i18n/.i18n/fr.tm.jsonl, and 18 more. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #104590
Summary: This PR is the explicit implementation candidate for the linked issue's four-part Control UI IA cleanup.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦐 gold shrimp
Result: blocked until real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Preserve empty-override cleanup in the Plugins MCP mutation and add regression coverage.
  • [P1] Gate Memory actions until initial config/status loading completes and add delayed-load coverage.
  • Attach redacted real-browser proof for Activity, Memory, and MCP management.

Proof guidance:

  • [P1] Needs real behavior proof before merge: Tests and CI are supplemental only; no after-fix browser screenshot, recording, live output, or linked artifact shows Activity in Settings, the selected agent's Memory tab, and Plugins-only MCP management. Add redacted evidence, update the PR body to trigger review, or ask a maintainer to comment @clawsweeper re-review.

Risk before merge

  • [P1] Existing /dreaming and /dreams bookmarks stop resolving because both route definitions are removed without a redirect.
  • [P1] The sole retained MCP writer changes persisted configuration semantics for disabled-only bundled-server overrides.
  • [P1] First-load latency can expose Memory controls before their required config hash and status are available.

Maintainer options:

  1. Repair retained paths (recommended)
    Preserve disabled-only MCP cleanup and disable Memory actions until initial config and status loading complete.
  2. Pause the consolidation
    Retain the current Dreams route and Settings mutation path until behavioral equivalence and browser proof are established.

Next step before merge

  • [P1] The contributor should fix the two line-level blockers and add browser proof, while a likely owner confirms the no-redirect route compatibility decision.

Maintainer decision needed

  • Question: Should existing /dreaming and /dreams bookmarks intentionally stop resolving when Memory moves under Agents?
  • Rationale: The patch deletes a user-visible route without a redirect, and the linked protected-label issue records that compatibility choice as maintainer-owned product direction.
  • Likely owner: steipete — Recent merged history most directly owns the affected navigation and memory direction.
  • Options:
    • Remove without redirect (recommended): Make the Agents Memory tab the sole canonical destination and accept that old Dreams bookmarks no longer resolve.
    • Add temporary redirect: Redirect the old Dreams URLs to Agents Memory for a bounded deprecation window.

Security
Cleared: The focused patch adds no dependency, permission, secret-handling, download, publishing, or third-party execution change that creates a concrete security or supply-chain concern.

Review findings

  • [P1] Preserve disabled-only MCP override cleanup — ui/src/pages/config/config-page.ts:795
  • [P2] Gate Memory controls during initial config loading — ui/src/pages/agents/memory/memory-panel.ts:414
Review details

Best possible solution:

Keep the single-owner IA design, but preserve disabled-only MCP override cleanup, gate Memory actions through initial config/status loading, explicitly approve or redirect the retired Dreams URLs, and attach redacted real-browser proof before merge.

Do we have a high-confidence way to reproduce the issue?

Yes at source level. A disabled-only bundled MCP override remains as an empty configured entry after re-enable, and the Memory controls are enabled while initial config loading is still pending.

Is this the best way to solve the issue?

No in the current head. Consolidating each concept under one owner is the right architecture, but the retained paths must preserve the removed cleanup and loading guards before the solution is safe.

Full review comments:

  • [P1] Preserve disabled-only MCP override cleanup — ui/src/pages/config/config-page.ts:795
    Removing the Settings writer makes Plugins the sole enable path, but Plugins only merge-patches enabled: null. For a bundled server represented solely by { enabled: false }, that leaves {}; configured entries override bundle defaults, so re-enabling can replace the bundled definition with an empty server. Delete the whole entry when no fields remain and retain the existing regression coverage.
    Confidence: 0.98
  • [P2] Gate Memory controls during initial config loading — ui/src/pages/agents/memory/memory-panel.ts:414
    loadAll() waits for runtimeConfig.ensureLoaded() before starting status loaders, so the current loading value stays false during that wait and enables refresh/toggle against an empty snapshot. A slow first visit can reach updateDreamingEnabled without a config hash. Include initial runtime-config loading in this guard and cover the delayed-load interaction. This was equally visible on the earlier reviewed head and is a late discovery.
    Confidence: 0.96
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 6082a0c6ef23.

Label changes

Label justifications:

  • P1: The current head introduces failures in ordinary MCP re-enable and first-load Memory workflows that affect real Control UI users.
  • merge-risk: 🚨 compatibility: The patch removes existing Dreams routes and changes the only UI writer for persisted MCP server state.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Tests and CI are supplemental only; no after-fix browser screenshot, recording, live output, or linked artifact shows Activity in Settings, the selected agent's Memory tab, and Plugins-only MCP management. Add redacted evidence, update the PR body to trigger review, or ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed

What I checked:

  • MCP cleanup contract: The removed Settings helper deleted a disabled-only server entry after removing enabled, while the retained Plugins path only sends enabled: null; an empty configured entry then overrides the bundled server definition. (ui/src/lib/config/index.test.ts:619, 1c576a271310)
  • MCP resolution behavior: Current main treats enabled configured MCP entries as owner-managed overrides of bundled defaults, so a leftover empty entry replaces rather than restores the bundled definition. (src/agents/bundle-mcp-config.ts:63, 6082a0c6ef23)
  • Memory initial-load race: loadAll() waits for runtime config before starting status loaders, but the render-time loading state does not include that initial wait, leaving refresh and enable controls active against an empty config snapshot. (ui/src/pages/agents/memory/memory-panel.ts:414, 29804dadd88f)
  • Late-finding continuity: The Memory panel file is unchanged between the earliest reviewed head and the current head, confirming that the initial-load finding was equally visible in the earlier review cycle. (ui/src/pages/agents/memory/memory-panel.ts:414, 0b63432e2efd)
  • Exact-head CI: The exact PR head has green UI, type, lint, build, security, and focused CI checks, but those checks do not exercise the identified persisted-config and initial-load interaction states. (29804dadd88f)
  • Real behavior proof: The PR body contains remote checks and test counts but no after-fix browser screenshot, recording, live output, or linked artifact showing the moved Activity, Memory, and MCP workflows. (29804dadd88f)

Likely related people:

  • steipete: Recent merged commits own sidebar consolidation, moving Worktrees into Settings, and the full-page Settings navigation used by this PR. (role: recent navigation and memory-area contributor; confidence: high; commits: 89f911f322c9, 161e66f7bdb7, 9269a27f18c3; files: ui/src/app-navigation.ts, ui/src/pages/agents/view.ts, ui/src/pages/plugins/plugins-page.ts)
  • shakkernerd: The broad page-module architecture containing navigation, Agents, Dreams, Plugins, and Settings dates to the merged Control UI architecture refactor. (role: Control UI architecture contributor; confidence: medium; commits: 65e12328aa20; files: ui/src/app-navigation.ts, ui/src/pages/dreams/dreams-page.ts, ui/src/pages/config/mcp.ts)
  • vincentkoc: Recent merged work repaired navigation exports, localized UI declarations, and removed stale internal exports across the affected surfaces. (role: recent adjacent UI contributor; confidence: medium; commits: 55a0012c44b5, aaf5ddd83255, 6418e196b123; files: ui/src/app-navigation.ts, ui/src/pages/dreams/dreams-page.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (4 earlier review cycles)
  • reviewed 2026-07-11T18:14:07.137Z sha 0b63432 :: needs real behavior proof before merge. :: [P1] Preserve disabled-only MCP override cleanup | [P3] Update the remaining Dreams-scene documentation
  • reviewed 2026-07-11T20:58:53.637Z sha 41c6287 :: needs real behavior proof before merge. :: [P1] Preserve disabled-only MCP override cleanup
  • reviewed 2026-07-11T21:07:50.688Z sha 41c6287 :: needs real behavior proof before merge. :: [P1] Preserve disabled-only MCP override cleanup
  • reviewed 2026-07-11T21:14:56.274Z sha 29804da :: needs real behavior proof before merge. :: [P1] Preserve disabled-only MCP override cleanup

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 11, 2026
@steipete
steipete force-pushed the claude/sidebar-item-organization-c90f62 branch from 0b63432 to 41c6287 Compare July 11, 2026 20:53
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Jul 11, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jul 11, 2026
steipete added 5 commits July 11, 2026 17:04
…gents 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
…ys 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.
@steipete
steipete force-pushed the claude/sidebar-item-organization-c90f62 branch from 41c6287 to 29804da Compare July 11, 2026 21:09

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29804dadd8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 410 to +414
const dreamingOn =
dreaming.dreamingStatus?.enabled ??
resolveConfiguredDreaming(currentConfigObject(configState)).enabled;
const loading =
this.awaitingRouteData || dreaming.dreamingStatusLoading || dreaming.dreamingModeSaving;
const refreshLoading =
this.awaitingRouteData || dreaming.dreamingStatusLoading || dreaming.dreamDiaryLoading;
const selectedAgentId = dreaming.selectedAgentId ?? this.resolveSelectedAgentId();
const loading = dreaming.dreamingStatusLoading || dreaming.dreamingModeSaving;
const refreshLoading = dreaming.dreamingStatusLoading || dreaming.dreamDiaryLoading;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate Memory controls while config is still loading

On a first visit to the new Memory tab, loadAll() awaits runtimeConfig.ensureLoaded() before it starts loadDreamingStatus, so dreamingStatusLoading remains false while config.get is still in flight. With this loading calculation, the tab renders the fallback dreamingOn from an empty config as Off and enables the toggle/refresh; on a slow config load, clicking the toggle hits updateDreamingEnabled with no config hash and shows Config hash missing instead of waiting for the real config/status. Include the runtime config loading or an initial-load flag in this disabled/loading state, like the removed awaitingRouteData guard did.

Useful? React with 👍 / 👎.

@steipete
steipete merged commit 1b1a41d into main Jul 11, 2026
86 checks passed
@steipete
steipete deleted the claude/sidebar-item-organization-c90f62 branch July 11, 2026 21:24
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 12, 2026
…gents Memory tab, single MCP mutation owner (openclaw#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 openclaw#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. scripts Repository scripts size: XL status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Control UI sidebar IA cleanup: demote Activity to Settings, fold Dreams into Agents, single MCP mutation owner

1 participant