Skip to content

fix: clarify empty-state message in Activate Agent picker @W-22497097@#209

Merged
marcelinollano merged 1 commit into
mainfrom
ml/w-22497097-activate-agent-empty-message
May 15, 2026
Merged

fix: clarify empty-state message in Activate Agent picker @W-22497097@#209
marcelinollano merged 1 commit into
mainfrom
ml/w-22497097-activate-agent-empty-message

Conversation

@marcelinollano
Copy link
Copy Markdown
Collaborator

Summary

@W-22497097@

The Command Palette "SFDX: Activate Agent" picker reported "No deactivated agents found in the org." even when freshly published agents (with only an Inactive v1, never previously Active) were eligible to activate. The filter logic was already correct (an agent is activatable when it has no version with Status === 'Active', matching @salesforce/plugin-agent src/agentActivation.ts:52-70); only the empty-state message wording was misleading.

Before

Picker shows "No deactivated agents found in the org." regardless of why no agents are eligible — even when fresh-publish Inactive agents should appear, and when all agents are simply already active.

After

Two accurate messages:

  • No agents at all in the org → "No published agents found in the org."
  • Agents exist but all have an Active version → "No published agents are available to activate."

(The picker itself was always correctly listing fresh-publish Inactive agents; the broken piece was the wording shown when nothing matched.)

Testing

Automated

npx jest test/commands/activateAgent.test.ts

Expected: 14 passed. Covers the new "no agents in org" and "all already active" branches plus the existing fresh-publish/Inactive picker behavior.

Manual

  1. Against an org with at least one published agent whose only version is Inactive (never Active): in VS Code, run Command Palette → SFDX: Activate Agent. Expected: the agent appears in the picker; selecting it lets you choose a version and activates it.
  2. Against an org where every published agent has an Active version: run SFDX: Activate Agent. Expected: info toast No published agents are available to activate.
  3. Against an org with no published agents: run SFDX: Activate Agent. Expected: info toast No published agents found in the org.

…497097@

The "Activate Agent" command palette picker said "No deactivated agents
found in the org." even when freshly published agents (with only an
Inactive v1, never previously Active) were eligible to activate. The
filter logic was correct; only the message wording was misleading.

Replace with two accurate branches: "No published agents found in the
org." (no agents) and "No published agents are available to activate."
(all already have an active version).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@marcelinollano marcelinollano changed the title W-22497097: fix: clarify empty-state message in Activate Agent picker fix: clarify empty-state message in Activate Agent picker @W-22497097@ May 14, 2026
@marcelinollano marcelinollano requested a review from npiccolo May 14, 2026 22:03
Copy link
Copy Markdown
Contributor

@npiccolo npiccolo left a comment

Choose a reason for hiding this comment

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

Review ✅

Minimal, correct fix. The filter logic was already right — only the empty-state copy needed updating. Two accurate messages now cover the two distinct cases: no agents at all vs. all agents already active.

npm run test:backend — 386/386 ✅
npm run test:frontend — 434/434 ✅

LGTM ✅

@marcelinollano marcelinollano merged commit 1faade0 into main May 15, 2026
11 checks passed
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.

2 participants