feat: memory dashboard redesign and AI tool integration#236
Merged
Conversation
Redesign the Memory module from scratch: **Phase 1 — UI Restructure** - Replace old dashboard (mixed facts + graph) with card-based hub layout - Separate "Memories" (personal, about the user) from "Knowledge" (file-derived) - Connections as derived graph lens, conditionally rendered - Side panel navigation for Memories/Knowledge, full-screen for Connections/Search - IPC: add sourceType, factScope to MemoryFact for future-proof domain separation - IPC handler: enrichFact/enrichSearchFactItem compute factScope from kind - Workspace-scoped state via scopeKey binding, reset on switch - Design system compliant: Lucide icons, destructive confirmations, no toast/emoji **Phase 2 — AI Tool Integration** - memory_search: semantic search via Memory API, returns editable personal facts - memory_save: save personal facts with metadata.origin='agent_tool' provenance - memory_update: update existing memories, session-scoped workspace - knowledge_search: semantic search across workspace files - System prompt: inject top 30 personal memories on conversation start - Tool instructions in prompt encourage proactive use - Write tools require session-bound workspace (no active-profile fallback) - Per-workspace memory block cache with 1-minute TTL + agent invalidation **Also includes**: fix storage download endpoint signature verification (#403 fix) Testing: 26 new tests across 4 suites (memory-tools, memory-prompt, use-memory-page, memories-panel), 209 files / 939 tests all passing
- Reset memoryBlockCachedAt and memoryBlockWorkspaceId when workspace context throws, preventing stale empty cache within TTL window - Add loadMorePersonalFacts with page tracking for >30 memories - Reset page counter on workspace switch
Owner
Author
|
Addressed both review comments in 30ad83e: Cache staleness fix (both @devin-ai-integration and @chatgpt-codex-connector):
Personal facts pagination (@chatgpt-codex-connector):
|
|
To use Codex here, create a Codex account and connect to github. |
…ial load with undefined scopeKey - refreshMemoryBlock: only overwrite cache if fresh result is non-empty or workspace changed; transient API failure no longer wipes valid cache - useMemoryPage: use Symbol sentinel for prevScopeKeyRef so the effect fires on first mount even when scopeKey is undefined
…es in-app - refreshMemoryBlock now accepts chatId, resolves workspace from session first via memoryToolDeps.getWorkspaceId (prevents cross-workspace leakage) - Search overlay file results now use openFileFromTree (in-app navigation) instead of desktopAPI.files.openPath (OS shell)
…er on overlay close - buildMemoryPromptBlock now accepts chatId, resolves workspace from session scope (fixes cross-workspace memory injection) - Connections overlay resets graph filter via onQueryGraph() on close
… on overlay close - isEmpty now checks overview.facts/graph counts instead of overview nullity - Connections overlay cancels pending debounced query on close
- MemoryToolDeps adds onMemoryMutated callback - memory_save and memory_update call it after successful writes - Runtime resets memoryBlockCachedAt=0 so next turn refreshes
…esPanel - Reset memoryBlockCachedAt/WorkspaceId unconditionally on workspace error - Pass hasMore + onLoadMore to MemoriesPanel with "Load more" button
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c651f8fa28
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Data Layer
MemoryFactIPC type: addsourceType,factScopefieldsServerMemoryFactraw type separation in API clientenrichFact/enrichSearchFactItemcomputefactScopeUI (42 files, zero backward compat)
scopeKey, reset on switchbatchDeleteFactsAPImetadata.origin='agent_tool', shown as "Saved by AI"AI Tools
memory_search: semantic search, returns editable personal facts onlymemory_save: saves with AI provenance, session-scoped workspace (write fails without session)memory_update: session-scoped, update existing memoriesknowledge_search: semantic search across workspace filesStorage Fix
@Query('contentType')and@Query('filename'), causing HMAC signature mismatch (all sync downloads returned 403)Test plan
tsc --noEmitpass (node + renderer)eslint0 errors 0 warningselectron-vite buildpass