Repository navigation
fix(memory): retain overview controls across status updates - #182290
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe 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
Technical reviewBest 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
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +44. Total +44 across 2 files. Added test files: 0. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 24, 2026, 2:22 AM ET / 06:22 UTC. |
|
Merged via squash.
|
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
pnpm test extensions/memory-core/browser/overview.test.tsx --maxWorkers=1pnpm tsgo:uipnpm deadcode:knipsrc/gateway/assistant-human-mentions.ts; same finding reproduced on exact base23db299b15bThe memory-core census covered all four production TSX files and their three i18n TypeScript modules. Controller patterns,
createRenderEffect, raw listeners, DOM queries,classList, hand-writtencreateComponent,untrack, componentonCleanup,flush, and manual loaders are all zero before and after. The onecreateEffect, onegetOwner, and onerunWithOwnerremain 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 fourLoadingand threeErroredboundaries. 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.