feat: Add display_name and is_private to ProjectItem#574
feat: Add display_name and is_private to ProjectItem#574
Conversation
Add optional cloud-injected metadata fields to ProjectItem schema so the cloud proxy can enrich project list responses with friendly names and privacy indicators for per-user private projects. - display_name: Optional friendly name (e.g. "My Notes") shown instead of the internal slug (e.g. "private-fb83af23") - is_private: Boolean flag indicating the project is private to the user Update list_memory_projects MCP tool to show "display_name (name)" format when display_name is present, so MCP clients see friendly names while still knowing the actual project slug to use in API calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Joe P <joe@basicmemory.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fedcbff3b1
ℹ️ 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".
|
|
||
| for project in project_list.projects: | ||
| result += f"• {project.name}\n" | ||
| label = f"{project.display_name} ({project.name})" if project.display_name else project.name |
There was a problem hiding this comment.
Keep project labels resolvable by resolve endpoint
When display_name is set, this tool now publishes display_name (name) as the project label, but project resolution only accepts external ID, permalink, or raw name (see /v2/projects/resolve lookup in project_router.py), so using the displayed label (or the display name alone) as a project argument will fail with “Project not found”. For private cloud projects this breaks the normal list→select→use workflow unless callers manually parse the slug back out of the label.
Useful? React with 👍 / 👎.
ConfigManager.add_project() and ProjectService.move_project() unconditionally called mkdir on the project path. In cloud mode (BASIC_MEMORY_PROJECT_ROOT set), paths resolve under root (/) which is read-only on macOS, crashing local dev. Production Fly.io containers have writable /, so this was never caught there. Skip mkdir when project_root is set since cloud mode uses S3 for file storage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Joe P <joe@basicmemory.com>
Summary
display_nameandis_privateoptional fields toProjectItemschema for cloud proxy enrichmentlist_memory_projectsMCP tool to show"My Notes (private-fb83af23)"format whendisplay_nameis presentNone/False, no impact on non-cloud usageContext
Basic Memory Cloud is adding per-user private projects ("My Notes") in team workspaces. The cloud proxy enriches the project list API response with
display_nameandis_privatemetadata, but these fields were being silently dropped during Pydantic deserialization becauseProjectItemdidn't declare them.Changes
schemas/project_info.pydisplay_name: Optional[str] = Noneandis_private: bool = FalsetoProjectItemmcp/tools/project_management.pylist_memory_projectsuses"display_name (name)"format whendisplay_nameis settests/schemas/test_schemas.pyProjectItemschema with cloud-injected fieldstests/mcp/test_tool_project_management.pylist_memory_projectsTest plan
🤖 Generated with Claude Code