fix(cli): show configured project in list when uncredentialed (#1003)#1010
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
There was a problem hiding this comment.
💡 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".
…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>
59844d1 to
7ddcaf4
Compare
|
@codex review |
|
recheck |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Why
bm project listcould render an empty table for a cloud-mode project that is present inconfig.jsonwhen the machine has no cloud credentials. At the same time,bm project addreports 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
bm project listview.--local,--cloud, and--workspacelistings strictly scoped to their requested live results.main.Tests
project list --local --jsonexcludes that config fallback when the local API returns no projects.uv run pytest -q tests/cli/test_project_list_and_ls.py— 15 passeduv run ruff format --check src/basic_memory/cli/commands/project.py tests/cli/test_project_list_and_ls.pyuv run ruff check src/basic_memory/cli/commands/project.py tests/cli/test_project_list_and_ls.pyuv run ty check src/basic_memory/cli/commands/project.py tests/cli/test_project_list_and_ls.pyjust fast-checkFixes #1003