fix(desktop): show externally managed owned agents - #3556
Conversation
Signed-off-by: Ali Madad <ali@scty.org>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 144276cbad
ℹ️ 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".
| &state, | ||
| &[ | ||
| serde_json::json!({ "kinds": [10100] }), | ||
| serde_json::json!({ "kinds": [0], "#auth": [&owner_pubkey] }), |
There was a problem hiding this comment.
Paginate the owner-tagged profile scan
In communities with more than 1,000 current kind-0 profiles, this can silently omit valid externally managed agents. I checked the query_relay /query catchall path: only kinds is pushed into EventQuery, while #auth is applied by filters_match after buzz-db has capped the candidate query at the newest 1,000 rows. Therefore, an owner's agent profile outside that window is never returned unless it also has a kind-10100 event. Push the auth-tag constraint into the database query or paginate the kind-0 candidates until the scan is exhausted.
Useful? React with 👍 / 👎.
Summary
Fixes #3054.
Ownership boundary
The relay/profile layer remains the owner of identity discovery. The local managed-agent store remains the sole owner of process lifecycle, keys, configuration, logs, and sessions.
An externally managed card therefore does not import an nsec, create a local record, or expose Start/Edit/Delete controls. Provider-backed agents already present in the managed store retain their existing controls. This also keeps the change complementary to #3449 rather than introducing a second remote deployment path.
Verification
cd desktop && pnpm checkcd desktop && pnpm test— 3,771 passedcd desktop && pnpm build:e2ecd desktop && pnpm exec playwright test agents.spec.ts --project=integration --grep "owner-attested external agents"— 1 passedcargo test --manifest-path desktop/src-tauri/Cargo.toml— 1,850 passed; 14 ignored; diagnostic tests 3 passedcargo clippy --manifest-path desktop/src-tauri/Cargo.toml --all-targets -- -D warningscargo fmt --manifest-path desktop/src-tauri/Cargo.toml -- --check