fix: Complete Settings Dialog wiring for Memory Extraction#364
Conversation
Complete Phase 3 (Settings UI) of Memory Extraction feature: - Add settings button to VaultSelect header (gear icon) - Wire SettingsDialog to open from header button - Integrate MemoryEditor as memoryEditorContent prop - Integrate ExtractionPromptEditor as promptEditorContent prop - Update progress tracking (12/14 tasks complete) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All 14 tasks across 4 phases are now complete: - Phase 1 (Foundation): State model, extraction prompt, protocol messages - Phase 2 (Pipeline): Transcript reader, fact extractor, memory writer, scheduler - Phase 3 (Settings UI): WebSocket handlers, Settings dialog, Memory/Prompt editors - Phase 4 (Integration): Pipeline startup, E2E acceptance tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove hardcoded "America/New_York" timezone from cron job. Now uses EXTRACTION_TIMEZONE env var, defaulting to server local time when not set. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 8 new tests covering: - Settings button visibility and styling in header - Opening SettingsDialog on button click - Memory and Extraction Prompt tabs rendering - Dialog close behavior - MemoryEditor and ExtractionPromptEditor content wiring - Keyboard accessibility Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
c4bcec7 to
5c26ceb
Compare
The user-customizable prompt now focuses solely on WHAT to extract (categories, format, merge behavior, security), while the server code handles HOW to operate (tools, paths, process steps). Changes: - Rename extraction-prompt.md to durable-facts.md - Move operational instructions to buildExtractionPrompt() - Update user override path to ~/.config/memory-loop/durable-facts.md - Update tests and frontend path display Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5c26ceb to
cb15dc8
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
- Add "Run Extraction" button to ExtractionPromptEditor for manual extraction - Handle extraction_status server messages with running/complete/error states - Show status feedback with auto-clearing success messages - Fix test isolation: tests no longer write to real ~/.claude/rules/memory.md - Add getMemoryFilePath() that respects MEMORY_FILE_PATH_OVERRIDE env var - Add beforeAll/afterAll hooks in tests to use temp directories - Fix settings button visibility in VaultSelect Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR completes the Memory Extraction feature by wiring up the Settings Dialog to the VaultSelect UI, enabling users to access memory management and extraction prompt editing capabilities.
Changes:
- Added a gear icon button to VaultSelect header that opens the Settings Dialog
- Wired SettingsDialog component to render MemoryEditor and ExtractionPromptEditor as tab content
- Renamed extraction prompt file from
extraction-prompt.mdtodurable-facts.mdto better reflect its purpose - Refactored prompt structure to separate user-customizable categories from operational instructions
- Added extraction trigger UI with status display and run button
- Improved test isolation by using MEMORY_FILE_PATH_OVERRIDE environment variable
- Added configurable timezone support for extraction scheduling
- Updated comprehensive test suites for all new functionality
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/components/VaultSelect.tsx | Added settings button to header and wired SettingsDialog with MemoryEditor and ExtractionPromptEditor components |
| frontend/src/components/VaultSelect.css | Added styles for settings button with proper sizing (44x44px), positioning, hover states, and accessibility focus indicators |
| frontend/src/components/ExtractionPromptEditor.tsx | Added extraction trigger functionality with status tracking, run button, and status message display; updated file path reference to durable-facts.md |
| frontend/src/components/ExtractionPromptEditor.css | Added styles for extraction section including button, status indicators (running/complete/error), and responsive mobile layout |
| frontend/src/components/tests/VaultSelect.test.tsx | Added 8 comprehensive tests for settings dialog integration covering button display, dialog opening/closing, tab switching, content rendering, and accessibility |
| frontend/src/components/tests/ExtractionPromptEditor.test.tsx | Added 7 tests for extraction trigger including button states, status messages, error handling, and proper disabling during operations; updated file path assertion |
| backend/src/prompts/extraction-prompt.md | Removed old extraction prompt file (renamed to durable-facts.md) |
| backend/src/prompts/durable-facts.md | Added new concise prompt file containing only the user-customizable category definitions |
| backend/src/extraction/fact-extractor.ts | Updated to use durable-facts.md filename; refactored buildExtractionPrompt to combine user categories with operational instructions programmatically |
| backend/src/extraction/memory-writer.ts | Added getMemoryFilePath() function that respects MEMORY_FILE_PATH_OVERRIDE for testability; updated all functions to use the new path getter |
| backend/src/extraction/extraction-manager.ts | Added configurable timezone support via ENV_EXTRACTION_TIMEZONE for flexible scheduling across time zones |
| backend/src/handlers/tests/memory-handlers.test.ts | Added global test isolation setup using MEMORY_FILE_PATH_OVERRIDE to prevent tests from modifying real user files |
| backend/src/extraction/tests/memory-writer.test.ts | Added global test isolation and updated tests to verify memory file operations using the override path |
| backend/src/extraction/tests/fact-extractor.test.ts | Updated test assertions to match new durable-facts.md filename and new prompt structure with absolute paths |
| .sdd/progress/2026-01-18-memory-extraction-progress.md | Updated progress tracking to reflect 100% completion of all 14 tasks across all 4 phases |
| export const USER_PROMPT_PATH = join( | ||
| homedir(), | ||
| ".config", | ||
| "memory-loop", | ||
| "extraction-prompt.md" | ||
| "durable-facts.md" | ||
| ); |
There was a problem hiding this comment.
The extraction prompt filename has been renamed from extraction-prompt.md to durable-facts.md, but this creates a breaking change for users who have already customized their extraction prompt at ~/.config/memory-loop/extraction-prompt.md. When the system starts up, it will no longer recognize their custom prompt and will use the default instead. Consider adding migration logic to copy/rename the old file to the new location, or add a fallback check to load from the old path if the new one doesn't exist.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Context
The Memory Extraction feature was mostly implemented but the Settings Dialog wasn't accessible from the UI. This PR completes the wiring by:
memoryEditorContentproppromptEditorContentpropTest plan
🤖 Generated with Claude Code