Skip to content

fix(cli): show configured project in list when uncredentialed (#1003)#1010

Merged
phernandez merged 2 commits into
basicmachines-co:mainfrom
rudi193-cmd:fix/issue-1003-config-project-list
Jul 15, 2026
Merged

fix(cli): show configured project in list when uncredentialed (#1003)#1010
phernandez merged 2 commits into
basicmachines-co:mainfrom
rudi193-cmd:fix/issue-1003-config-project-list

Conversation

@rudi193-cmd

@rudi193-cmd rudi193-cmd commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Why

bm project list could render an empty table for a cloud-mode project that is present in config.json when the machine has no cloud credentials. At the same time, bm project add reports that project already exists (#1003).

The cloud query is credential-gated, and the forced-local query does not surface a cloud-mode project, so neither live result seeded a display row.

What changed

  • Seed missing configured projects into the default combined bm project list view.
  • Keep explicit --local, --cloud, and --workspace listings strictly scoped to their requested live results.
  • Rebase the contributor branch onto current main.

Tests

  • Added a regression proving an uncredentialed configured cloud project remains visible in the default list.
  • Added the complementary regression proving project list --local --json excludes that config fallback when the local API returns no projects.
  • uv run pytest -q tests/cli/test_project_list_and_ls.py — 15 passed
  • uv run ruff format --check src/basic_memory/cli/commands/project.py tests/cli/test_project_list_and_ls.py
  • uv run ruff check src/basic_memory/cli/commands/project.py tests/cli/test_project_list_and_ls.py
  • uv run ty check src/basic_memory/cli/commands/project.py tests/cli/test_project_list_and_ls.py
  • just fast-check

Fixes #1003

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@phernandez

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 59844d1224

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/basic_memory/cli/commands/project.py Outdated
rudi193-cmd and others added 2 commits July 14, 2026 21:35
…achines-co#1003)

`bm project list` seeded its table rows only from live query results — the
cloud query (skipped when no credentials are present) and the local query.
`config.projects` was used only to enrich existing rows, never to create one,
so a cloud-mode project with no cloud credentials on the machine was surfaced
by neither query and rendered an empty table. Meanwhile `bm project add` reads
the DB and reports the same project already exists, so the two commands
disagreed about whether the project existed.

Seed a local-keyed row from `config.projects` for any configured project not
already surfaced, scoped to the local-inclusive view so a `--cloud` or
`--workspace`-filtered listing stays deliberately narrow. Adds a regression
test covering the cloud-mode-without-credentials case.

Fixes basicmachines-co#1003

Signed-off-by: rudi193-cmd <rudi193@gmail.com>
Signed-off-by: phernandez <paul@basicmachines.co>
@phernandez phernandez force-pushed the fix/issue-1003-config-project-list branch from 59844d1 to 7ddcaf4 Compare July 15, 2026 02:38
@phernandez

Copy link
Copy Markdown
Member

@codex review

@phernandez

Copy link
Copy Markdown
Member

recheck

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 7ddcaf476b

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@phernandez phernandez merged commit b16ddff into basicmachines-co:main Jul 15, 2026
7 checks passed
@rudi193-cmd rudi193-cmd deleted the fix/issue-1003-config-project-list branch July 15, 2026 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] bm project list shows empty table while bm project add reports the project already exists (configured/cloud-mode project never rendered)

2 participants