The Memories tab project filter is broken. Picking any project returns zero results, even though "All projects" works and the same projects filter fine in the History tab.
It's an identity vs. path mismatch. enumerate_memory_projects pulls memories.project_path values and resolves them into identities (git:<hash> or dir:<sha256>), which the frontend then sends as the project argument. But get_memories and get_memory_stats filter using m.project_path = ? against the raw stored path. They never match. History works because it uses project_identity for both the filter and the rows.
A few ways to fix this:
- Frontend: Send
primary_path instead of identity. It's a one-line fix that matches the current SQL, though you'll want to make sure the labels stay friendly (resolving git: hashes via the OpenCode DB).
- Backend: Update the memory queries to resolve the incoming identity to paths before filtering. This is more consistent with how History works.
- Schema: Add a
project_identity column to the memories table.
Option 2 feels like the cleanest way to align the APIs without a migration. I'm happy to open a PR for either direction if that's helpful, but also fine if you'd rather just take it from here.
The Memories tab project filter is broken. Picking any project returns zero results, even though "All projects" works and the same projects filter fine in the History tab.
It's an identity vs. path mismatch.
enumerate_memory_projectspullsmemories.project_pathvalues and resolves them into identities (git:<hash>ordir:<sha256>), which the frontend then sends as theprojectargument. Butget_memoriesandget_memory_statsfilter usingm.project_path = ?against the raw stored path. They never match. History works because it usesproject_identityfor both the filter and the rows.A few ways to fix this:
primary_pathinstead ofidentity. It's a one-line fix that matches the current SQL, though you'll want to make sure the labels stay friendly (resolvinggit:hashes via the OpenCode DB).project_identitycolumn to the memories table.Option 2 feels like the cleanest way to align the APIs without a migration. I'm happy to open a PR for either direction if that's helpful, but also fine if you'd rather just take it from here.