Skip to content

Memories tab project filter returns zero results when any project is selected #87

@chrisolszewski

Description

@chrisolszewski

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions