Skip to content

fix(memory): retain overview controls across status updates - #182290

Merged
steipete merged 1 commit into
mainfrom
solid2/w-s2-memory
Oct 24, 2026
Merged

steipete merged 1 commit into
mainfrom
solid2/w-s2-memory

Conversation

@steipete

@steipete steipete commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Memory overview updates can replace the Refresh and Test buttons and discard keyboard focus even when their visibility has not changed.

User Impact

The same controls remain mounted across unrelated status or callback updates, retain focus, and dispatch the current refresh and embedding-test callbacks. Markup, styling, routes, and plugin SDK contracts are unchanged.

Why This Change Was Made

The conditional branches read booleans directly from spread props, so unrelated props invalidated and recreated those branches. Two equality memos narrow that dependency; stable click dispatchers read the current callback after a retained button receives new props. The existing host still owns agent/engine/Gateway lifetime, and the plugin's imperative settings-component bridge remains the sole adapter for SDK-owned DOM.

Evidence

Check Result
Overview regression on base Fails on lost button identity after callback update
pnpm test extensions/memory-core/browser/overview.test.tsx --maxWorkers=1 22 passed; 4.74 s Vitest / 8.03 s wrapper
pnpm tsgo:ui Passed
Focused oxlint and oxfmt Passed
Isolated autoreview Clean through P2
Plugin build, base and head on same Mac Passed; asset limits enforced by builder
JavaScript raw / gzip 210,814 / 55,763 B → 210,552 / 55,664 B
CSS raw / gzip 3,115 / 1,094 B → unchanged
Total raw / gzip 213,929 / 56,857 B → 213,667 / 56,758 B
Production TSX LOC 1,041 → 1,041; regression test file 427 → 471
pnpm deadcode:knip Reports unused src/gateway/assistant-human-mentions.ts; same finding reproduced on exact base 23db299b15b
Visual proof Nonvisual lifecycle/callback fix; markup and CSS unchanged; regression asserts retained focus

The memory-core census covered all four production TSX files and their three i18n TypeScript modules. Controller patterns, createRenderEffect, raw listeners, DOM queries, classList, hand-written createComponent, untrack, component onCleanup, flush, and manual loaders are all zero before and after. The one createEffect, one getOwner, and one runWithOwner remain in the SDK component adapter, which mounts and updates host-owned DOM. Native prop-bound callbacks fall from two to zero; equality memos rise from ten to twelve. Three admitted async reads already use four Loading and three Errored boundaries. No mutation/optimistic state, copied owner state, snapshots/clones, or lazy-loader changes were needed. Three semantic-keyed overview lists remain; memory search deliberately remounts its result scope for each new search response.

Plugin assets stay below the 4 MiB per-asset, 8 MiB per-build, and 128-asset limits. The plugin remains outside the startup graph. Full UI CI is requested because the regression protects focus retention.

@steipete steipete added the ci:full Keep ordinary native-locale CI selection on the next PR run. label Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-24T06:06:52.076048Z 8273761 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui extensions: memory-core Extension: memory-core size: S labels Oct 24, 2026
@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. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 24, 2026
@clawsweeper

clawsweeper Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR preserves Memory overview buttons across unrelated updates and makes them invoke the current callbacks.

Example: Agent main has unchecked embeddings, and Refresh status is focused when callback props update.

  • Before: The buttons can be replaced, losing keyboard focus.
  • After: The same buttons remain mounted, Refresh retains focus, and both buttons invoke their replacement callbacks.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, correct patch with useful regression coverage and green exact-head CI; changed-behavior evidence remains limited to a DOM test.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its reported base-red/head-green JSDOM regression exercises the production overview with synthetic host components, while no shipped-browser capture of the changed interaction is supplied.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Keyboard users can lose focus when Memory overview updates recreate controls whose visibility has not changed.
Reason: Preserving existing controls and current callback dispatch restores expected interaction behavior with no new setting, public contract, or product-direction choice.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR addresses a concrete keyboard-focus defect with a small, coherent fix; no actionable correctness or security findings remain, and exact-head CI passes.

Priority: P2
Reviewed head: 8273761a318f44aa207a3d344c0f7f0ca5de33ac

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied evidence does not demonstrate retained keyboard focus and current callback dispatch through the shipped browser Settings route.
Agent review details

How this fits together

The Memory Core Settings presentation receives host snapshots and Doctor status results, renders overview controls, and dispatches refresh, embedding-test, and navigation callbacks through existing owners.

flowchart LR
  A[Settings host] --> B[Memory Core view]
  B --> C[Overview presentation]
  C --> D[Refresh and Test buttons]
  D --> B
  B --> E[Doctor status request]
  E --> C
Loading

Technical review

Best possible solution:

Retain this focused fix in the existing overview components, with host lifecycle and request authority unchanged.

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

The source and focused regression identify callback replacement as a concrete trigger; the PR reports failure on the base and passing tests on the head, but this read-only review did not execute that reproduction.

Is this the best way to solve the issue?

The patch is the smallest complete repair: equality memos isolate branch visibility, and stable native handlers read current callbacks without adding another owner or rendering path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 2924588f01c1.

Provenance checked

  • Overview branch visibility and callback bindings keeps the original intent (dbd0a21: The Memory Core extraction preserved overview behavior while moving presentation out of core Settings; blame identifies the extraction as the source of these current lines, without establishing their earliest origin.)
  • Overview regression suite keeps the original intent (7f6d2b7: The earlier test cleanup consolidated fixtures while retaining distinct behavior; the new case reuses that suite and adds a previously uncovered interaction failure.)

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Introduced change: The pinned introduction replaces two boolean accessors with equality memos and two native handler bindings with dispatchers that read current props; no SDK, styling, configuration, or persistence changes are introduced. (extensions/memory-core/browser/overview.tsx:54, 8273761a318f)
  • Focused regression: The added test mounts the production overview, replaces callback props, asserts both button identities and retained focus, and verifies dispatch reaches the replacement callbacks rather than the initial callbacks. (extensions/memory-core/browser/overview.test.tsx:160, 8273761a318f)
  • Current-main behavior: Fetched main retains the original accessors and direct callback bindings; its two affected files match the introduction base, so the central repair is still absent there. (extensions/memory-core/browser/overview.tsx:122, 2924588f01c1)
  • Ownership and original intent: The extraction in refactor(memory): move overview presentation into Memory Core #174452 assigns overview presentation to Memory Core while preserving host-owned scope and request authority; this patch respects that division. (extensions/memory-core/browser/index.tsx:39, dbd0a216b2bd)
  • Exact-head validation: The current head has successful openclaw/ci-gate, UI unit, browser E2E, real-Gateway E2E, type, lint, performance, and security checks; the two cancelled auto-response runs are automation jobs, not failing product checks. (8273761a318f)
  • Review policy and local limits: Root and extension policies were applied, along with the Solid and test guidance; no maintainer-notes directory exists. The installed Solid cheatsheet and an older pre-extraction blob were unavailable locally; current and introduction-base modules were readable. No target code or tests were executed, and the checkout remains clean. (AGENTS.md, 8273761a318f)

Likely related people:

  • Peter Steinberger: Raw commit c4c89c1 adds extensions/memory-core/browser/overview.test.tsx:15 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: c4c89c1c3c31; files: extensions/memory-core/browser/overview.test.tsx)

PR surface

Source 0, Tests +44. Total +44 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 4 4 0
Tests 1 45 1 +44
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 49 5 +44

Review metrics

Metric Value Why it matters
Production versus regression code Production +4/-4; tests +45/-1 Production size is unchanged; the added test protects distinct DOM identity, focus, and callback-freshness failures without new production scaffolding.

Labels

Label changes:

  • add P2: Losing keyboard focus during Memory overview updates is a bounded interaction defect with a narrow repair.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Losing keyboard focus during Memory overview updates is a bounded interaction defect with a narrow repair.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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.

Reviewed October 24, 2026, 2:22 AM ET / 06:22 UTC.

@steipete
steipete merged commit f6ded32 into main Oct 24, 2026
115 of 117 checks passed
@steipete
steipete deleted the solid2/w-s2-memory branch October 24, 2026 06:44
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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 ci:full Keep ordinary native-locale CI selection on the next PR run. extensions: memory-core Extension: memory-core P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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.

1 participant