Skip to content

Improve Memory Hub loading, navigation, and question readers - #3236

Merged
Hillary Mutisya (hillary-mutisya) merged 4 commits into
mainfrom
dev/hillarym/memory-hub-loading-and-readers
Oct 28, 2026
Merged

Hillary Mutisya (hillary-mutisya) merged 4 commits into
mainfrom
dev/hillarym/memory-hub-loading-and-readers

Conversation

@hillary-mutisya

@hillary-mutisya Hillary Mutisya (hillary-mutisya) commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Make Memory Hub responsive and consistent when browsing populated long-conversation memory collections.

  • Fix agent RPC callback ownership so nested execution contexts do not leave requests waiting indefinitely.
  • Return compact question/view inventories and conflict summaries; defer evidence/detail fetches and preserve bounded pagination.
  • Simplify entity/topic graph pages, trim unused graph payloads, and use compact Font Awesome graph controls.
  • Organize Inbox attention into counted categories with bounded previews and detail panels; align tabs, list cards, totals, loading indicators, pagination, and accessible icon actions across destinations.
  • Add option B synopsis/metadata sidecards to Knowledge Wiki and Project Brief readers, with compact icon toolbars and overflow menus.
  • Add dedicated corpus/view/slot question routes, a responsive two-column inventory, full-page question readers with metadata sidecards, and guarded Back/history/edit behavior. Remove the duplicate Questions tab from Views.
  • Exclude question/schema views from Views gallery queries before pagination and totals, without changing dedicated Questions or exact schema-view readers.
  • Use consistent review, list, build-status, and maintenance icons.

This PR contains the focused Memory Hub follow-up work. The previous integration work from #3233 is already in main and is not resubmitted.

Validation

  • Full TypeScript workspace build passes on Node 24.22.1 with pnpm, using installed dependencies and a process-local verifyDepsBeforeRun=false override to avoid an unrelated package-feed auto-install.
  • 603 targeted tests pass: 424 browser-client tests, 117 browser-gateway tests, 49 schema-view/inventory-concurrency tests, 5 RPC-context tests, and 8 protocol tests. These cover question routes, off-page direct loads, Back/history, unsaved edits, loading/error/retry races, sidecards, graph payloads, optimistic concurrency, retained-panel focus, direct/post-edit/repeated discovery, and gallery filtering/pagination.
  • Pinned Prettier passes for the PR files. Lint, complexity, circular-dependency and debt ratchets pass against current main on the committed PR diff.
  • Live populated-store checks passed at desktop/tablet/mobile widths (1440 through 390px), with no application exceptions or failed RPC responses.
  • Direct question reload verified one exact question request plus one corpus/view summary request with page size 1, without scanning other collections.
  • Latest live populated-store query check: 42 unfiltered views include 5 schema views; the gallery query returns exactly 37 non-question views. Explicit schema lookup still returns one view, and the dedicated Questions inventory retains all 5 questions.

Existing source evidence, question review/assertion/discovery behavior, publication/edit safeguards, and maintenance warnings remain intact.

Review follow-up

Addressed all six initial Copilot review threads in 741a986 and 667d6ab:

  • Replace stale question controls before every slot load and on failure.
  • Refresh reader-specific edit heads independently of the inventory scope; verify two successive cross-collection edits.
  • Reject navigation during pending question operations.
  • Preserve unsaved drafts without confirmation dialogs during background polling.
  • Preserve unchanged Inbox details across count refreshes using stable identities and state fingerprints.
  • Restore keyboard/screen-reader graph selection with an on-demand native item picker using the already-loaded graph, without restoring graph-page clutter or extra inventory requests.

The follow-up passes all 43 client suites (419 tests), client type-checking, pinned formatting and all four PR ratchets. Live checks verified draft retention across a real 65-second polling interval, stale-editor removal after a forced detail failure, and keyboard-only evidence inspection on both graph types.

Addressed both subsequent review threads in ae2993d:

  • Retained Inbox panels update their return-focus target when Review buttons are reconstructed.
  • Reader discovery shares the selected-reader head guard with edits and refreshes exact reader metadata before subsequent mutations.

Also addressed the gallery follow-up: every gallery summary query carries excludeKinds: ["schemaView"], including pagination. Filtering is performed by the service before totals and cursors are calculated. Default inventory queries and explicit schema-view reads preserve their previous behavior. The latest client suite passes 424 tests.

The current-head Copilot re-review published a nonempty summary with no new unresolved threads. CI for ae2993d is complete: all reported checks pass or are intentionally skipped. The isolated Ubuntu/Node 24.22.1 webpack-loading failure passed on a failed-job-only retry; no source changes were needed. Windows/Linux smoke tests and the full build matrix pass.

Add compact inventory projections and reliable RPC callback ownership, simplify graph payloads, and unify Inbox, Views, Questions, and source layouts. Add dedicated question routes, responsive cards, synopsis sidecards, and consistent accessible icon actions.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

🟡 Changes recommended

Question navigation can leave the previous question’s edit controls active under a new URL after a failed load, allowing edits to the wrong question.

6 open issues
What changed in this PR

This PR improves Memory Hub browsing for populated collections, building on the earlier integration work without resubmitting it.

Changes:

  • Retain agent RPC option callbacks per context and expose compact conflict summaries with versioned read projections.
  • Add dedicated question readers, metadata sidecards, counted Inbox categories, and consistent list navigation.
  • Simplify graph previews and expand regression coverage for loading, routing, editing, and accessibility.
File Description
ts/​packages/​memory/​service/​test/​viewIndexConcurrency.spec.ts Tests projection upgrades and compact conflict state.
ts/​packages/​memory/​service/​test/​schemaViews.spec.ts Tests blocked reconciliation reporting and recovery.
ts/​packages/​memory/​service/​src/​viewStore.ts Upgrades outdated read projections.
ts/​packages/​memory/​service/​src/​viewReadProjection.ts Versions projections and adds conflict state.
ts/​packages/​memory/​service/​src/​inventoryTypes.ts Extends build summaries with conflict metadata.
ts/​packages/​memory/​service/​src/​fileMemoryService.ts Reports schema maintenance failures and distinguishes shutdown blockers.
ts/​packages/​memory/​service/​README.md Documents projection upgrades and maintenance behavior.
ts/​packages/​memory/​client/​test/​schemaViewProtocol.spec.mjs Tests conflict-state protocol compatibility.
ts/​packages/​memory/​client/​src/​inventoryProtocol.ts Accepts optional conflict state in summaries.
ts/​packages/​agents/​browserControlRpc/​src/​memoryGraphViewTypes.ts Defines compact graph responses.
ts/​packages/​agents/​browser/​test/​memoryHubGraph.test.mjs Tests graph payload trimming and evidence identity.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubViews.ts Updates view tabs, loading states, sidecards, and actions.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubViews.test.ts Tests view navigation, loading races, and reader controls.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubViewActivity.ts Uses conflict summaries and compact Inbox presentation.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubViewActivity.test.ts Tests conflict attention and partial counts.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubUsability.test.ts Adapts the question accessibility audit to the reader layout.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubUi.ts Adds icon tab labels and menu focus restoration.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubUi.test.ts Tests tab labels and menu focus.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubTimeline.test.ts Supports accessible icon-button lookup.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubQuestionsModel.ts Allows question identity from minimal route data.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubQuestions.ts Adds slot readers, sidecards, lazy panels, and bounded attention.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubQuestions.test.ts Tests direct links, editing, Back navigation, and lazy loading.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubProjectBrief.test.ts Tests brief sidecards and preserved evidence controls.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubModel.ts Adds corpus/view/slot question routes.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubModel.test.ts Tests question route roundtrips.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubMaintenance.ts Standardizes maintenance action icons.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubMaintenance.test.ts Verifies maintenance icons.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubInbox.ts Adds counted categories, bounded previews, and detail panels.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubInbox.test.ts Tests Inbox previews, actions, keyboard navigation, and errors.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubGraph.ts Simplifies graph pages and adds compact icon controls.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubGraph.test.ts Updates graph interaction and evidence tests.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubGraph.css Positions graph controls inside the viewport.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubExplore.ts Removes the separate Overview refresh control.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubExplore.test.ts Verifies the simplified Overview controls.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHubEditorial.test.ts Opens the overflow menu before checking editorial actions.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHub.ts Integrates Inbox categories and question routes.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHub.test.ts Extends shell tests for Inbox actions and question navigation.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHub.html Groups Inbox operations for category mounting.
ts/​packages/​agents/​browser/​src/​views/​client/​library/​memoryHub.css Styles responsive tabs, lists, sidecards, and readers.
ts/​packages/​agents/​browser/​src/​agent/​memoryHubGraph.mts Trims graph responses while retaining generation identity.
ts/​packages/​agents/​browser/​README.md Documents updated Memory Hub navigation and readers.
ts/​packages/​agentRpc/​test/​actionContext.spec.ts Tests callback survival across context lifecycles.
ts/​packages/​agentRpc/​src/​client.ts Reference-counts initialization option callbacks.
ts/​packages/​agentRpc/​README.md Documents callback ownership and cleanup.

Review effort: Balanced

Comment thread ts/packages/agents/browser/src/views/client/library/memoryHubQuestions.ts Outdated
Comment thread ts/packages/agents/browser/src/views/client/library/memoryHubInbox.ts Outdated
Comment thread ts/packages/agents/browser/src/views/client/library/memoryHubQuestions.ts Outdated
Comment thread ts/packages/agents/browser/src/views/client/library/memoryHubQuestions.ts Outdated
Clear stale question controls before route loads, keep reader concurrency heads independent of list scope, block navigation during mutations, and preserve drafts during polling. Retain unchanged Inbox details using stable identities and state fingerprints. Add a lazy keyboard-accessible graph item picker without restoring graph-page clutter.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reader metadata now refreshes independently of the landing inventory; remove the unused previous edit-time helper caught by the committed-diff lint ratchet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

🔵 Needs a closer look

The coordinated RPC lifetime, persisted-projection upgrades, and asynchronous navigation changes warrant final human validation.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@hillary-mutisya

Copy link
Copy Markdown
Collaborator Author

CI follow-up: every check except the Ubuntu/Node 24.22.1 build passed, including all Windows/Linux smoke tests and the other eight build-matrix entries. The lone failure is webpack loading the unchanged knowledge-visualizer configuration: a dependency reports that ./cli.js does not export runCli. The full local Node 24.22.1 build passes. Reran only the failed job to distinguish a transient module-loading/build-order issue from a reproducible failure; monitoring the retry. Latest published Copilot review has no unresolved threads.

@hillary-mutisya

Copy link
Copy Markdown
Collaborator Author

CI follow-up complete: the isolated Ubuntu/Node 24.22.1 job passed on the failed-job-only retry, including build and tests. No source changes were needed for that failure. Verified current head ae2993d has no failing or pending checks (30 reported checks, all passing or intentionally skipped), no unresolved review threads, and no Git merge conflicts.

@hillary-mutisya
Hillary Mutisya (hillary-mutisya) merged commit be99055 into main Oct 28, 2026
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants