Skip to content

refactor(memory): move overview presentation into Memory Core - #174452

Merged
vincentkoc merged 7 commits into
mainfrom
refactor/memory-overview-plugin-20261016
Oct 16, 2026
Merged

vincentkoc merged 7 commits into
mainfrom
refactor/memory-overview-plugin-20261016

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Closes #174428

What Problem This Solves

Memory overview/status presentation still lives in core Settings even though Memory Core owns the feature.

User Impact

The Memory overview keeps its current status, explicit embedding test, and navigation behavior, including when the engine is off, disabled, offline, or supplied by another plugin. There is no configuration migration or runtime plugin activation requirement.

Why This Change Was Made

Move the overview, controller, styles, and translated strings into Memory Core through a packaged Settings view. Core retains agent selection, engine/config writes, routing, and shared visual primitives. The additive Settings contract retires RPC/navigation authority when the agent, engine, connection, route, or plugin generation changes; normal plugin activation remains unchanged.

This is the smallest complete slice after #173210. Indexed-memory search and other panels are separate work.

Evidence

  • Native build passed, including canonical plugin distribution copying, UI build, SDK declarations/exports, and performance budgets. The final affected plugin/UI rebuild also passed.

  • UI-only production builds and ui:dev prepare declared Settings presentations through the canonical plugin builder. Development delivery serves the same validated generation; selected preparation preserves sibling distributions. The actual dev-server Memory route and seven artifact inventory regressions pass.

  • Actual production-bundled browser coverage passes for delivered JS/CSS, custom/off/disabled engines, explicit probes, offline behavior, navigation remount and stylesheet cleanup, and shared row separators. No browser page errors.

  • Focused controller, plugin presentation, actual Memory page, host lifetime, Settings runtime, existing activation runtime, manifest, builder/check, and Gateway catalog tests passed. Retained callbacks and in-flight replies are rejected across boot/client/generation changes before the Solid flush.

  • UI and core production typechecks, the affected chat/Gateway/extension test typechecks, targeted lint/format, assertion/mock ratchets, extension import boundaries, and SDK export checks passed. The moved catalog verifies 55 keys across 20 locales with no unused translations.

  • Four real-WebSocket transport regressions use the unmocked Gateway browser client and a synthetic protocol responder: allowed requests reach the server; unauthorized and retained callbacks after agent, connection-epoch, or runtime retirement send no request before an acknowledged socket barrier; a held successful reply is rejected after retirement. This qualifies Settings lifetime fencing, not backend authorization policy.

  • Independent review found one later-update exception path that did not retire the presentation. The fix now aborts its signal, disposes view/assets exactly once, rejects retained callbacks and pending replies, and renders the error; the dedicated regression passes.

  • Native SDK API comparison from a09c26b193b4 to 9b849bda7f8c completed: six added types on the existing control-ui subpath, no new/removed entrypoints, and no removed exports. Reachable declaration changes reflect the shared placement metadata and Doctor DTO. The subsequent CI accounting, fixture, and delivery corrections leave these SDK declarations unchanged.

  • The public-export budget accounts for exactly those six types: ControlUiSettingsComponents, ControlUiSettingsContext, ControlUiSettingsPlacement, ControlUiSettingsSnapshot, ControlUiSettingsView, and DoctorMemoryStatusPayload. The budget preserves main’s other 18 added exports. Native surface validation on rebased head f38762cff184 passes at 3,798 public exports, with no unauthorized shipped removals.

The Memory-dependent mobile layout and agent-selector scenarios pass with the delivery correction. Two inherited E2E assumptions were aligned in separate test-only commits: the catalog clock now matches the two-minute interval from #174404, and the optional-hover fallback runs on the real About Docs link because Chat eagerly loads that component since #173652. Both named scenarios pass, preserving their behavioral assertions. A subsequent hosted build-progress assertion counted only top-level assets; its disk observations now include nested plugin assets, and its fixture explicitly emits nested files. All 13 Vite build tests pass with the exact cadence, paired-sidecar and failure-path assertions preserved. Targeted native lint and formatting pass. Explicit UTF-8 filename encoding also passes the exact UI-app test typecheck lane. Required hosted CI passed on exact head c766a305faaa: https://github.com/openclaw/openclaw/actions/runs/38945637150. The current-head review reports no actionable findings.

Before: frozen pre-extraction overview rendered with the same sanitized data, viewport, theme, and host primitives. After: the actual Memory route loading the packaged plugin. Both use Chromium 153.0.8010.12 at 1440×1000. The standalone baseline lacks the app-shell background; the lobster appearance may vary by its existing random seed. The comparison verifies layout and behavior, not pixel identity.

Before

Memory overview before extraction

After

Memory overview delivered by Memory Core

Scope and size

The old core overview renderer, status/probe effects, and overview stylesheet are removed. The host keeps only the Settings placement and authority boundary. The production feature/page/controller portion is approximately 47 lines smaller after separating the new generic capability adapter cost; the whole change grows because this is the first packaged static Settings capability.

Category Added Removed Net
Production 1,744 760 +984
Tests/support 1,521 431 +1,090
Translation catalogs 1,751 63 +1,688
Documentation 48 0 +48
Package/manifest/config/lock metadata 28 0 +28
Whole change 5,092 1,254 +3,838

Counts treat moved files as full removals/additions; Git rename detection reduces the gross additions/deletions without changing the net. The reusable capability and lifetime tests are intentional growth. Existing translated values move to the plugin-owned catalog; generated translation memory is not part of this PR.

@vincentkoc vincentkoc self-assigned this Oct 16, 2026
@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime extensions: memory-core Extension: memory-core cli CLI command changes size: XL labels Oct 16, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review October 16, 2026 16:57
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: c766a305faaa52c3c2987ab1f5cae33abfff00e9
  • Maintainer: @vincentkoc
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-lock.yaml
  • extensions/memory-core/package.json

Carefully review these changes before merging.

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Moves Memory overview rendering, status requests, styles, and translations into Memory Core through a packaged Settings presentation.

Example: Open Memory Settings with custom-memory selected and embeddings not yet checked.

  • Before: Core renders the overview and sends an embedding probe only when Test is clicked.
  • After: Memory Core supplies the same overview and explicit Test behavior through host-bound callbacks.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) Complete ownership cutover with inspected visual proof, focused transport coverage, and no actionable finding; broad exact-head CI remains pending.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after Chromium images show the packaged overview preserving its controls and layout; supplied production/dev browser results cover delivered assets, explicit probes, offline/off/disabled engines, and teardown, while the real browser-client WebSocket path covers allowed and forbidden dispatch plus stale replies.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Memory feature presentation remains split between Memory Core and the core Settings host.
Reason: Maintainer direction authorizes the ownership cutover, and the implementation preserves the established experience through a narrow SDK seam.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-directed PR open: the ownership cutover is coherent, prior findings are addressed, and no new actionable defect was found.

Priority: P3
Reviewed head: c766a305faaa52c3c2987ab1f5cae33abfff00e9

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Settings host supplies agent, engine, connection, navigation, and shared visual primitives; the packaged Memory Core view requests existing Gateway diagnostics and renders their results.

flowchart LR
  A[Memory Settings route] --> B[Host Settings lifetime]
  C[Packaged asset inventory] --> D[Memory Core overview]
  B --> D
  D --> E[Bound request callback]
  E --> F[Gateway memory diagnostics]
  F --> D
Loading

Technical review

Best possible solution:

Complete the plugin-owned overview cutover while preserving host authority, existing activation behavior, and the normal exact-head CI gate.

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

No malfunction is alleged; current-main source confirms the split ownership, and supplied browser evidence exercises the extracted presentation.

Is this the best way to solve the issue?

The narrow packaged presentation fits repository ownership policy, removes the replaced renderer, and keeps routing and configuration writes with their existing owners.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 1b9731a20f3b.

Provenance checked

  • Memory overview presentation and status requests keeps the original intent (8574853: The Memory destination page made live engine health and Dreaming state its landing view; later work added explicit probes and neutral unsupported-search reporting.)
  • Solid Settings rendering keeps the original intent (b8d31e9: The Solid migration preserved routes, host classes, configuration owners, and existing behavior.)
  • Native plugin activation and asset loading keeps the original intent (6a97159: Native UI uses typed plugin contracts and lifecycle-bound host authority; the PR retains ordinary activation and shares its asset loader.)
  • Packaged UI-origin delivery keeps the original intent (7aa077a: Matching packaged plugin assets load from the UI origin using validated immutable generations and package identity.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

  • Pinned change and current main: Reviewed the introduced merge-base-to-head changes; fetched main retains the core overview and lacks this packaged Settings contract. (ui/src/pages/config/memory-page.tsx:614, c766a305faaa)
  • Prior delivery finding addressed: UI-only builds prepare presentations before cache capture, and the Vite adapter prepares and serves the validated packaged inventory during development. (scripts/ui.mts:392, c766a305faaa)
  • Additive SDK contract accounted for: Six types are added through the existing control-ui subpath, existing runtime activation remains intact, and the export budget explicitly accounts for the additions; the maintainer-authored direction accepts this expansion. (scripts/plugin-sdk-surface-report.mts:285, c766a305faaa)
  • Callback authority and transport evidence: The production presentation checks live lifetime and operator access before dispatch and lifetime again after replies; supplied real-WebSocket regressions exercise allowed dispatch, denial before transport, and retirement of pending replies. (ui/src/plugins/control-ui-settings-view.solid.tsx:105, c766a305faaa)
  • Visual proof inspected: Inspected the downloaded before/after overview images: status, explicit Test control, navigation rows, and separators are preserved; the documented shell-background difference is visible. (c766a305faaa)
  • Exact-head CI remains pending: Live REST reads confirm the reviewed head and pending openclaw/ci-gate; no failing check was returned, but broad validation is incomplete. (c766a305faaa)

PR surface

Source +2595, Tests +1090, Docs +48, Config +11, Other +94. Total +3838 across 60 files. Added test files: 5.

View PR surface stats
Area Files Added Removed Net
Source 31 3290 695 +2595
Tests 19 1299 209 +1090
Docs 2 48 0 +48
Config 2 11 0 +11
Generated 0 0 0 0
Other 6 130 36 +94
Total 60 4778 940 +3838

Review metrics

Metric Value Why it matters
Public SDK expansion 6 additive types on the existing control-ui subpath The first packaged Settings consumer adds a documented reusable contract without removing existing exports.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is an ownership refactor with no reported user-visible malfunction or intended behavior change.
  • merge-risk: 🚨 compatibility: The PR expands the public plugin contract and manifest metadata; the additive scope is documented and accepted by its maintainer author.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-16T17:14:04.259Z sha 9b849bd :: needs real behavior proof before merge. :: [P2] Preserve Memory overview loading outside packaged production builds | [P2] Reconcile the six added exports with the enforced SDK budget
  • reviewed 2026-10-16T17:57:02.485Z sha 2ade433 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-16T18:09:09.817Z sha f16c25e :: needs maintainer review before merge. :: none

Reviewed October 16, 2026, 2:19 PM ET / 18:19 UTC (Revision 4).

@vincentkoc
vincentkoc force-pushed the refactor/memory-overview-plugin-20261016 branch from 9b849bd to 23c010d Compare October 16, 2026 17:16
@openclaw-barnacle openclaw-barnacle Bot added the scripts Repository scripts label Oct 16, 2026
@vincentkoc
vincentkoc force-pushed the refactor/memory-overview-plugin-20261016 branch from 23c010d to f38762c Compare October 16, 2026 17:21
Match the two-minute refresh contract introduced by #174404 (fb6a79a). Keep the existing cursor replay, retained-host, and history assertions.
Chat eagerly imports the hover provider since #173652 (8e95a76). Use the real About Docs link to retain the failed-download, reload, title fallback, no-card, and no-preview-RPC assertions.
@vincentkoc

vincentkoc commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

Addressed the review findings on current head c766a305faaa52c3c2987ab1f5cae33abfff00e9:

  • UI-only build and dev now use the existing native producer and the same validated packaged Settings inventory. Selected preparation preserves sibling distributions; no source fallback or runtime activation dependency. Inventory tests 7/7 and actual Memory production/dev browser tests 4/4 pass.
  • Four real WebSocket tests exercise the unmodified GatewayBrowserClient request path. They prove allowed dispatch, denial before transport after agent/epoch/runtime retirement, and rejection of a held successful reply after retirement. A same-socket acknowledged barrier verifies denied requests never reach the server. This is Settings lifetime/transport proof with a synthetic protocol responder, not complete backend authorization coverage.
  • The six reviewed public Settings types are explicitly accounted for in the SDK budget; no shipped exports were removed or hidden.
  • Two inherited E2E contract mismatches were corrected in separate test-only commits: polling clock alignment after perf(ui): reduce idle native session catalog polling #174404, and optional hover loading on the real About Docs link after feat(control-ui): keep link readers scoped to their pane session #173652 made the Chat chunk mandatory. Both exact named scenarios pass; the hover test preserves abort/reload/title-hint/no-card/no-RPC assertions and verifies the provider is unregistered before hover.

The subsequent compression-progress failure counted only top-level assets. Both disk observations now recurse, and the fixture emits nested assets; all 13 Vite build tests, native targeted lint and formatting pass with exact cadence and failure assertions unchanged.

Explicit UTF-8 encoding fixes the filename overload; the exact UI-app test typecheck lane also passes.

Final net change is +3838 lines (GitHub rename-aware +4778/-940 across 60 files). Native review records and the PR body now match this exact head. Required hosted CI is still running: https://github.com/openclaw/openclaw/actions/runs/38945637150. Preparation and merge remain gated on required green.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 16, 2026
steipete added a commit that referenced this pull request Oct 16, 2026
…174639)

* test: repair standalone loader and private UI server fixtures

Advance the runtime loader generator in the standalone metadata fixture,
matching the synchronous loader after a99f797 (#172750). Preserve
missing-source, boundary, hard-link, and import-count assertions.

Register memory-overview-plugin.e2e.test.ts with the existing private
Control UI server owner after dbd0a21 (#174452), retaining serial
execution and complete inventory checks.

Main a1c6b9e reproduced both failures. Focused affected proof: 51
passed; root test typechecks, touched type-aware lint and format passed.
Independent P2 review found no actionable findings. No CI reruns.

* fix: preserve Doctor capture placement and group GitHub App settings

Forward the resolved capture placement into the preparation worker's
existing root owner. Doctor's temporary read-only inspection must not
create state/tmp/plugin-captures. Keep native image custody and cleanup
unchanged; the direct worker regression fails before this correction.

The GitHub App schema introduced in 4579af0 (#173668) inherited
common tiers from ordinary GitHub identity. Signing keys, installation
and repository permissions are specialized administrative settings, so
place both App subtrees under Advanced. Retain the common-leaf snapshot
unchanged and keep ordinary GitHub identity common.

The real Doctor native-capture test and all six worker lifetime/recovery
tests pass under Node. Schema quality (3), native synthetic UI (1), and
the previously reviewed fixture checks (51) pass. P2 review found no
actionable findings. No config/schema migration or timeout changes.

Core production and selected test types, touched type-aware lint,
formatting and whitespace checks passed.

* test(ui): preserve packaged Memory overview fixture ownership

The initial private-server registration put the mixed Memory suite into a project without bundled setup. Natural PR CI 38962681715 exposed the resulting source-Vite index.js?import response in the packaged asset assertion. Move the unchanged source case to its own registered private-server file and keep the packaged cases on the shared production preview. All four browser cases and 14 ownership cases pass; selected type graphs, type-aware lint, formatting and P2 review pass. No assertion, timeout or test coverage change.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…aw#174452)

* refactor(memory): move overview into Memory Core

* fix(memory): qualify Settings contract integration

* fix(memory): prepare Settings presentation for UI-only delivery

* test(ui): align catalog refresh clock with polling interval

Match the two-minute refresh contract introduced by openclaw#174404 (bd43f1f). Keep the existing cursor replay, retained-host, and history assertions.

* test(ui): exercise optional hover loading outside Chat

Chat eagerly imports the hover provider since openclaw#173652 (adbbb40). Use the real About Docs link to retain the failed-download, reload, title fallback, no-card, and no-preview-RPC assertions.

* test(ui): count nested assets in compression progress

Include nested packaged plugin assets in the observed sidecar totals and emit nested fixture assets so the exact cadence and failure assertions cover this layout.

* test(ui): type recursive compression filenames as UTF-8
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
…penclaw#174639)

* test: repair standalone loader and private UI server fixtures

Advance the runtime loader generator in the standalone metadata fixture,
matching the synchronous loader after ce27c34 (openclaw#172750). Preserve
missing-source, boundary, hard-link, and import-count assertions.

Register memory-overview-plugin.e2e.test.ts with the existing private
Control UI server owner after f9ffe38 (openclaw#174452), retaining serial
execution and complete inventory checks.

Main 5d76018 reproduced both failures. Focused affected proof: 51
passed; root test typechecks, touched type-aware lint and format passed.
Independent P2 review found no actionable findings. No CI reruns.

* fix: preserve Doctor capture placement and group GitHub App settings

Forward the resolved capture placement into the preparation worker's
existing root owner. Doctor's temporary read-only inspection must not
create state/tmp/plugin-captures. Keep native image custody and cleanup
unchanged; the direct worker regression fails before this correction.

The GitHub App schema introduced in f9a4f5e (openclaw#173668) inherited
common tiers from ordinary GitHub identity. Signing keys, installation
and repository permissions are specialized administrative settings, so
place both App subtrees under Advanced. Retain the common-leaf snapshot
unchanged and keep ordinary GitHub identity common.

The real Doctor native-capture test and all six worker lifetime/recovery
tests pass under Node. Schema quality (3), native synthetic UI (1), and
the previously reviewed fixture checks (51) pass. P2 review found no
actionable findings. No config/schema migration or timeout changes.

Core production and selected test types, touched type-aware lint,
formatting and whitespace checks passed.

* test(ui): preserve packaged Memory overview fixture ownership

The initial private-server registration put the mixed Memory suite into a project without bundled setup. Natural PR CI 38962681715 exposed the resulting source-Vite index.js?import response in the packaged asset assertion. Move the unchanged source case to its own registered private-server file and keep the packaged cases on the shared production preview. All four browser cases and 14 ownership cases pass; selected type graphs, type-aware lint, formatting and P2 review pass. No assertion, timeout or test coverage change.
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 cli CLI command changes dependencies-changed PR changes dependency-related files docs Improvements or additions to documentation extensions: memory-core Extension: memory-core gateway Gateway runtime merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: move Memory overview presentation into Memory Core

1 participant