mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
221221ce8d
Fixes two related bugs in `bm project list` (issue #820): 1. Workspace column was always empty when no `--workspace` flag or `default_workspace` config was set. The workspace name was only resolved when `effective_workspace` was truthy, so the column stayed blank for every row in the common case. 2. Only the single default/specified workspace was queried. Projects in any other workspace the user had access to were silently omitted. The fix introduces `_fetch_cloud_workspace_results()`, an inner helper that calls `get_available_workspaces()` and iterates every reachable workspace (or just the specified one if `--workspace` / `default_workspace` is set). Each fetch returns a `(WorkspaceInfo, ProjectList)` pair so the workspace name and type are available directly when building table rows, without a separate resolution pass. Graceful fallback is preserved: if `get_available_workspaces()` fails, an un-scoped fetch is used and the Workspace column is empty rather than crashing. Adds two regression tests: - workspace column populated without `default_workspace` set - projects from all workspaces appear in the listing Co-authored-by: Drew Cain <groksrc@users.noreply.github.com> Signed-off-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>