Conversation
Peers were stored with port 5554 (Vite dev server) instead of 5555 (Express API), causing health probes to fail when Vite wasn't proxying. - handleAnnounce now updates existing peer port from announcement data - AddPeerForm fallback port corrected from 5554 to 5555
Add a new "memories" brain category for journal entries, daily notes, and personal experiences (e.g. "played DnD tonight"). Full CRUD with validation, storage, API routes, and UI support including form, display, and classifier prompt update. Also fix Cmd+K search: correct field names (capturedText, context, notes, oneLiner), route results to proper pages (/brain/memory, /brain/links) instead of always /brain/inbox, and add admin + memories to search. Add text search filter to MemoryTab. Alphabetize memory sub-tabs.
Replaces linear-scan JSON file storage with PostgreSQL + pgvector for scalable vector search (HNSW), full-text search (tsvector), and federation sync between PortOS instances. Auto-falls back to file-based JSON when Docker is unavailable — zero breaking changes.
The browser server uses Chrome directly via CDP, not Playwright. The npx playwright install was downloading an unused Chromium binary and producing warnings about missing project dependencies.
There was a problem hiding this comment.
Pull request overview
Release v1.26.0 introduces a PostgreSQL + pgvector-backed memory system (with backend auto-detection/fallback), adds federation sync + migration tooling, and expands Brain UI/search to include “Memories” plus fixes to instance peer port defaults.
Changes:
- Add PostgreSQL memory backend (pgvector + tsvector hybrid search), DB init/migration scripts, and Docker Compose + setup automation.
- Add memory federation sync endpoints (
GET/POST /api/memory/sync) andpg_dumpintegration in backups. - Expand Brain “Memory” UI/search to include admin items + memory entries; fix peer probe port default.
Reviewed changes
Copilot reviewed 32 out of 33 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| server/services/search.js | Extends Brain search to include admin + memory entries; updates field mappings and result URLs/take count. |
| server/services/memorySync.js | Adds federation sync pull/apply logic based on sync_sequence and updated_at. |
| server/services/memoryRetriever.js | Switches memory retrieval to use backend switcher module. |
| server/services/memoryExtractor.js | Switches memory creation to use backend switcher module. |
| server/services/memoryEmbeddings.js | Switches config import to backend switcher module. |
| server/services/memoryDB.js | Implements PostgreSQL-backed memory CRUD + vector/FTS/hybrid search and related ops. |
| server/services/memoryBackend.js | Adds lazy backend selection between JSON and PostgreSQL. |
| server/services/instances.js | Fixes peer announce handling to update stored port from announcement. |
| server/services/brainStorage.js | Adds JSON storage for Brain “memories” destination and summary counts. |
| server/services/brain.js | Adds “memories” destination wiring for filing/extraction + exports CRUD helpers. |
| server/services/backup.js | Adds pg_dump snapshot alongside rsync backups (health-gated). |
| server/scripts/migrateMemoryToPg.js | Adds JSON→Postgres migration script (dry-run + execute + optional clear). |
| server/scripts/init-db.sql | Adds PostgreSQL schema for memories + indexes + trigger(s). |
| server/routes/memory.js | Switches to memoryBackend; adds backend status + federation sync endpoints. |
| server/routes/brain.js | Adds Brain memories CRUD routes. |
| server/package.json | Adds pg dependency. |
| server/lib/db.js | Adds PostgreSQL pool + query helpers + health checks. |
| server/lib/brainValidation.js | Adds “memories” destination and schemas for memory entries + extraction validation. |
| scripts/setup-db.js | Adds Docker Compose-based DB bootstrap (skip gracefully if Docker unavailable). |
| scripts/setup-browser.js | Removes Playwright install and ensures browser profile directory exists. |
| scripts/dev-start.js | Runs DB setup before starting PM2 in dev. |
| package.json | Bumps version to 1.26.0 and integrates setup-db into setup/start flows. |
| package-lock.json | Updates lockfile for v1.26.0 + new deps. |
| ecosystem.config.cjs | Documents/exports Postgres port (5561) into server env. |
| docs/PORTS.md | Documents Postgres port 5561. |
| docker-compose.yml | Adds pgvector container on port 5561 with init SQL mount + healthcheck. |
| client/src/services/api.js | Adds Brain memories API functions. |
| client/src/pages/Instances.jsx | Fixes AddPeerForm fallback port to 5555. |
| client/src/components/brain/tabs/MemoryTab.jsx | Adds Brain “memories” CRUD UI and record search filter; defaults to memories tab. |
| client/src/components/brain/tabs/InboxTab.jsx | Adds “memories” as routable destination from Inbox. |
| client/src/components/brain/constants.js | Adds “Memories” destination/tab metadata and icon. |
| PLAN.md | Notes PG + pgvector memory storage addition. |
| .changelog/v1.26.0.md | Adds release notes for v1.26.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…bedding format, Node-native delay
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 33 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ch, remove config export duplication
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 33 changed files in this pull request and generated 9 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…idation, config dedup, add tests - Fix brain search URLs to deep-link with destination type (?type=people, etc.) - Use backend-aware memory search (postgres: tsvector, json: BM25) - Add Zod validation for POST /api/memory/sync items - Optimize getChangesSince with limit+1 pattern instead of COUNT(*) - Add source_* fields to applyRemoteChanges ON CONFLICT UPDATE - Deduplicate DEFAULT_MEMORY_CONFIG into shared memoryConfig.js - Add route tests for memory backend/status and sync endpoints - Add brain memories CRUD tests
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 38 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… helpers - Wrap createMemory insert+links in transaction to prevent partial writes on FK violations - Wrap updateMemory relatedMemories delete+insert in transaction - Fix updateMemory early return to allow relatedMemories-only updates - Ensure updateMemory always returns relatedMemories in response - Add ?type=X&id=Y query params to all Brain search results for deep-linking - Extract generateSummary and decrementAgentPendingApproval to memoryConfig.js
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 37 out of 38 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…o_tsquery - Use ensureBackend() instead of getBackendName() in searchMemory to avoid null backend before initialization - Clamp sync limit to minimum of 1 to prevent negative/zero SQL LIMIT - Replace to_tsquery with websearch_to_tsquery for safe user input handling in hybrid search (no more crashes on punctuation or special chars)
Brain captures (projects, ideas, admin, journal, digests, reviews, people) are now mirrored into the CoS memory table with embeddings so agents can semantically search user-captured thoughts alongside learned memories. - Add brainMemoryBridge service listening to brainEvents for real-time sync - Add appId filtering to memory list/search routes and both backends - Add source filter toggle (All/CoS/Brain) and badges in Memory UI - Add migration script for existing brain data
Brain Graph tab (/brain/graph) with 3D force-directed visualization of brain entities. Nodes colored by entity type (people, projects, ideas, admin, memories) with edges from semantic similarity (via CoS embeddings through bridge map), shared tags (Jaccard >= 0.3), and explicit CoS memory links. Includes type filter checkboxes, text search, detail panel, and legend. Extract shared force simulation into client/src/lib/graphSimulation.js so both CoS MemoryGraph and BrainGraph reuse the same physics code. Fix brain memory tag input eating commas on every keystroke by storing raw string in form state and splitting to array only at save time.
Convert Brain from single sidebar link to collapsible section with routable children for all tabs (alphabetical). Add POST /api/brain/sync endpoint exposing syncAllBrainData for UI-triggered sync. Brain Graph no-embeddings banner now shows a Sync Now button that runs the sync and reloads graph data. Add test mocks for brainGraph and brainMemoryBridge services.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 54 out of 55 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 54 out of 55 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
- Correct misleading "Semantic search disabled" banner to mention PG-only features - Update setup-browser.js log message to match actual behavior - Archive mapped CoS memories when brain records are archived
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 54 out of 55 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (5)
server/services/search.js:1
- getInboxLog
previously appeared to return an object with anentriesarray (the old implementation filteredinboxResult.value.entries). This updated code assumes the fulfilled value is the entries array itself, which will produce zero matches if the return shape is still{ entries: [...] }. Adjust this to read frominboxResult.value.entries` (or support both shapes) to keep Cmd+K inbox search working.
server/scripts/init-db.sql:1 - nextval('memories_sync_sequence_seq')
hardcodes a sequence name that may not exist on upgraded/legacy installs (e.g., if the column/sequence was created under a different name). Consider deriving the sequence viapg_get_serial_sequence('memories','sync_sequence')` or explicitly creating/ensuring a known sequence name and attaching it, so updates don’t fail at runtime.
server/services/brainGraph.js:1 - hasEmbeddings
is set to true whenever any edge is remapped from the CoS graph, but CoS edges can be purely explicitlinkedrelationships (which do not imply embeddings exist). This can incorrectly suppress the “No embeddings found” banner. SethasEmbeddingsonly when a semantic/similarity edge is present (e.g.,edge.type === 'similar'`), or compute embedding presence via a dedicated backend signal.
server/services/brainGraph.js:1 - hasEmbeddings
is set to true whenever any edge is remapped from the CoS graph, but CoS edges can be purely explicitlinkedrelationships (which do not imply embeddings exist). This can incorrectly suppress the “No embeddings found” banner. SethasEmbeddingsonly when a semantic/similarity edge is present (e.g.,edge.type === 'similar'`), or compute embedding presence via a dedicated backend signal.
server/routes/brain.js:1 - This endpoint performs a potentially long-running, sequential bulk sync (including embedding generation) within the request/response lifecycle, which can tie up a server worker and risk request timeouts. Consider making this asynchronous (e.g., enqueue/background job + return 202 with a job id, or run-and-return with progress via events) to avoid blocking the HTTP request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 54 out of 55 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 54 out of 55 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 54 out of 55 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Release v1.26.0
Released: 2026-03-02
Added
GET/POST /api/memory/sync) for incremental memory replication between PortOS instances via sync_sequenceserver/scripts/migrateMemoryToPg.js) to move existing JSON memories into PostgreSQLpg_dumpintegration in backup service for database snapshots alongside rsyncsetup-db.jsscript integrated into setup, start, dev, and update flows — gracefully skips if Docker is not availabledocker-compose.ymlfor PostgreSQL + pgvector container on port 5561GET /api/memory/backend/statusendpoint to check active backend and DB healthFixed
handleAnnounceto sync port from peer announcements, fix AddPeerForm fallback porttext→capturedText,description→notes, etc.) and incorrect result URLsFull Diff: v1.25.1...v1.26.0