logseq / logseq/db-test

CLI sync remote-graphs unnecessarily requires an existing local graph

Open
#1,056 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
28
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Search first
  • I searched open and closed issues and found no report for this command requirement.
What happened?

sync remote-graphs is an account-level listing operation, but the CLI requires an existing local graph and db-worker context.

Running the command without --graph returns:

{
  "status": "error",
  "error": {
    "code": "missing-graph",
    "message": "graph name is required",
    "hint": "Use --graph <name>"
  }
}

The workaround is to create or select an unrelated local graph and pass it only so the CLI can start a worker. That local graph must not use the same name as a remote graph intended for download, because the name collision then blocks download.

Reproduce
  1. Configure valid authentication and sync endpoints.
  2. Ensure no default graph is set.
  3. Run logseq --output json sync remote-graphs.
  4. Run the same command with an unrelated local graph and observe that the remote account graph list is returned.
Expected behavior

sync remote-graphs should require only authentication and sync configuration. It should use a global or temporary runtime rather than require an unrelated local graph.

Platform
  • Current CLI repository build
  • macOS arm64

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Trace the CLI entry point for sync remote-graphs and compare its startup path with the documented reproduction, focusing on where the local graph and db-worker context become required. Verify the change using the JSON command with valid authentication and sync configuration but no default graph; done means remote graphs are listed without an unrelated local graph.

Written by the indexing model from the issue text.

Assessment

Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.