fix(desktop): use relay presence for remote agent Deploy control - #5967
Draft
olympusbuildz wants to merge 2 commits into
Draft
fix(desktop): use relay presence for remote agent Deploy control#5967olympusbuildz wants to merge 2 commits into
olympusbuildz wants to merge 2 commits into
Conversation
Provider-backed agents stay status=deployed while backend_agent_id exists, so profile and sidebar primary actions treated dead pods as live Shutdown with no Deploy path. Prefer relay presence for provider liveness; keep infrastructure status for local agents. Fixes block#5938 Signed-off-by: Olympusbuildz <Olympus.roots@outlook.com> Co-authored-by: Olympusbuildz <Olympus.roots@outlook.com> Signed-off-by: Olympusbuildz <Olympus.roots@outlook.com>
themiguelamador
suggested changes
Aug 16, 2026
themiguelamador
left a comment
There was a problem hiding this comment.
Two issues need correction before merge:
resolveManagedAgentDisplayPresenceignores itsagentargument and uses relay presence for every managed agent. A running local agent with no presence row therefore regresses from online to offline in the profile, contradicting the intended local/infrastructure behavior. The helper should use infrastructure status for local agents and relay presence only for provider-backed agents.- The added prop line pushes
UserProfilePanel.tsxbeyond the repository file-size ratchet (1,000 → 1,001 by the gate’s count), sopnpm checkfails on the PR as submitted.
I prepared a signed fix for both findings: https://github.com/Complear/buzz/commit/ef7eebad0
Verification on the fix:
- focused managed-agent control tests: 10 passed
- full desktop unit suite: 4,959 passed
- Biome/file-size/text/pubkey checks pass (only unrelated pre-existing warnings/info)
- TypeScript typecheck passes
- git diff whitespace check passes
Address review on block#5967: - resolveManagedAgentDisplayPresence uses infrastructure status for local agents and relay presence only for provider-backed agents. - Keep the presenceStatus wire without growing UserProfilePanel past the 1000-line file-size ratchet. Signed-off-by: Olympusbuildz <Olympus.roots@outlook.com> Co-authored-by: Olympusbuildz <Olympus.roots@outlook.com> Signed-off-by: Olympusbuildz <Olympus.roots@outlook.com>
Author
|
Addressed review (new commit
Mini: Thanks @themiguelamador. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Remote (provider-backed) agents whose process has exited still show online in the profile panel and keep a primary remote-halt control, so there is no UI path to Deploy again. Channel members sidebar already shows the correct offline presence.
Root cause
Two axes exist and are documented:
Profile avatar, primary action label, and lifecycle start-vs-halt all read the infrastructure axis for managed bots. For provider agents that axis never clears when the pod exits.
Fix
Why it matters
Kubernetes/provider agents that idle-exit become unreachable from the UI until managed-agents.json is hand-edited. Deploy is already idempotent and replaces terminated pods.
Test plan
cd desktop node --import ./test-loader.mjs --experimental-strip-types --test \ src/features/agents/lib/managedAgentControlActions.test.mjs10 passed @
b26c74a779634dd78800b3685fa85481e6a8415bNamed cases:
Manual verify
Risk / blast radius
Desktop UI only. Delete-with-confirm already used presence; bulk active filters still use infrastructure status intentionally.
Closest work
none found (open PR search for #5938 / remote agent presence Deploy)
Fixes
Fixes #5938
Peer-review harden
Addressed @themiguelamador review @
d0ab6fa1a:resolveManagedAgentDisplayPresenceuses infrastructure status for local agents; relay presence only for provider-backedUserProfilePanel.tsxstays at 999 lines (≤1000 ratchet) by co-locating thepresenceStatusprop